width attribute (embed, iframe, img, table, ...)
Specifies the default width of the element.
This attribute is deprecated. Use the width style property instead.
JavaScript page for this attribute: width. You can find other example(s) there. |
Possible values:
String that sets the width of the object.
One of the following values:
Integer that specifies the width of the object, in pixels. | |||||||
Integer in the range 0-100 followed by a %. |
Default: this attribute has no default value.
Example HTML code 1:
This example illustrates the use of the width attribute:
|
||||
<img id="myImage" src="picture.gif" height="100px" width="100px" /> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
Recommendation:
|
||||
<img id="myImage" src="picture.gif" style="height:100px; width:100px" /> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
External links:
width (MSDN)
width (Mozilla Developer Center)
width (Safari Reference Library)
width (HR) (W3C)
width (IFRAME) (W3C)
width (IMG) (W3C)
width (TABLE) (W3C)
width (TH) (W3C)
width (APPLET) (W3C)
width (COL) (W3C)
width (COLGROUP) (W3C)
width (Mozilla Developer Center)
width (Safari Reference Library)
width (HR) (W3C)
width (IFRAME) (W3C)
width (IMG) (W3C)
width (TABLE) (W3C)
width (TH) (W3C)
width (APPLET) (W3C)
width (COL) (W3C)
width (COLGROUP) (W3C)
User Contributed Comments