vijayjoshi.org - php | javascript | ajax | and all things web

Posts Tagged ‘Css’

Setting style/css class of html elements from javascript

January 24th, 2009 | Posted by Vijay Joshi | 8 Comments
Style of an html element can be set in 2 ways. Specify a css class name for the element. Set the style inline for the element. //Method 1: <p class="boldText">Some text</p> //Method 2: <p style="font-weight:bold;">Some text</p> Therefore ...