Name
STYLE — NN 4 IE 3 HTML 4
Synopsis
STYLE=”styleSheetProperties"Optional
This attribute lets you set one or more style sheet rule property assignments for the current element. You may use the CSS or JavaScript syntax for assigning style attributes. But if you are designing the page for cross-browser deployment, use only the CSS syntax, which both Navigator and Internet Explorer support.
For use in Version 4 browsers, style sheets are recommended over
dedicated attributes where applicable, but due to the implementation
in Navigator 4, you need to wrap IMG elements with
DIV or SPAN elements that
contain border and margin-related style sheet rules to make them work
with IMG elements. The following example with the
embedded STYLE attribute works only in Internet
Explorer.
Example
<IMG STYLE="padding-left:5px" SRC="surferDude.gif" HEIGHT=150 WIDTH=250>
Value
An entire CSS-syntax style sheet rule is enclosed in quotes. Multiple style attribute settings are separated by semicolons. Style sheet attributes are detailed in Chapter 10.
Default
None.
Object Model Reference
- IE
[window.]document.images[i].style
[window.]document.imageName.style
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access