style attribute
Sets an inline style associated with an element.
With the style attribute you can assign inline CSS properties to an object. If you want to use the same style settings for several elements, create a style rule and assign it with the class attribute. The style attribute is useful for assigning unique styling rules for the object. To retrieve a style definition in an inline style use the style object.
Possible values:
String that sets the style definition.
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the STYLE attribute:
|
||||
<a style="background-color:red">Background-color:red</a> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, applet, area, b, baseFont, bdo, big, blink, blockQuote, body, br, button, caption, center, cite, code, col, colGroup, dd, del, dfn, dir, div, dl, dt, em, embed, fieldSet, font, form, frame, frameSet, H1, H2, H3, H4, H5, H6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:hidden, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isIndex, kbd, keygen, label, legend, li, link, listing, map, marquee, menu, nobr, noFrames, noScript, object, ol, optGroup, option, p, plainText, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, tBody, td, textArea, tFoot, th, tHead, tr, tt, u, ul, var, xmp
Related pages:
External links:
User Contributed Comments