iframe width Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:iframe

Description

The width attribute specifies the width of an <iframe>, in pixels.

Attribute Values

Value Description
pixels The width in pixels (like "100px" or just "100")

An <iframe> with a specified height and width of 200 pixels:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<iframe src="http://java2s.com" width="200" height="200">
<p>Your browser does not support iframes.</p>
</iframe><!-- w  ww.  jav a  2  s. co  m-->

</body>
</html>

Related Tutorials