iframe Tag
The iframe
tag is a tag used to display another web page within a web page, often for embedding external videos (e.g., YouTube), maps (e.g., Google Maps), or other external websites.
iframe Tag Example
<iframe src="https://example.com" width="500" height="300"></iframe>
In the example above, using this code will display the example.com
web page within an area of 500x300
size on the current page.
Key Attributes of the iframe Tag
The iframe
tag can utilize the following attributes.
src
The src
attribute specifies the URL of the web page to be embedded.
iframe src Attribute Example
<iframe src="https://example.com"></iframe>
width and height
The width
and height
attributes specify the size of the iframe
.
iframe width & height Attribute Example
<iframe src="https://example.com" width="400" height="250"></iframe>
Mission
0 / 1
Which attribute of the iframe tag is used to specify the URL of a web page?
The attribute of the `iframe` tag specifies the URL of the web page to embed.
src
width
height
style
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help