Вы находитесь на странице: 1из 8

Learn HTML Basics

Lesson No : 08

Publisher : Attitude Academ


HTML iframe Tag
Tag Description

<iframe> Defines an inline frame

Iframe Syntax
The syntax for adding an iframe is:

<iframesrc="URL"></iframe
>
Thesrcattribute specifies the URL (web address) of the
iframe page.
Iframe - Set Height and Width

Use theheightandwidthattributes to specify the size.


The attribute values are specified in pixels by default, but
they can also be in percent (like "80%").

<body>
<iframe src="ani.gif"
width="200"
height="200"></iframe>
</body>
Use iframe as a Target for a Link
An iframe can be used as the target frame for a link.
Thetargetattribute of the link must refer to thenameattribute of
the iframe:

<body>
<iframe width="100%"
height="150px" src="ani.gif"
name="iframe_a"></iframe>
<p><a href="url(path of file)"
target="iframe_a">HTML</a><
/p>
<p>When the target of a link
matches the name of an
iframe, the link will open in the
iframe.</p>
</body>
HTMLEntities
Some characters are reserved in HTML.
If you use the less than (<) or greater than (>) signs in your text, the
browser might mix them with tags.
Character entities are used to display reserved characters in HTML.
A character entity looks like this:
&entity_name;
OR
&#entity_number;
To display a less than sign we must write:&lt;or&#60;
Some Other Useful HTML Character
Entities
Result Description Entity Name Entity Number

non-breaking space &nbsp; &#160;


< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
cent &cent; &#162;
pound &pound; &#163;
yen &yen; &#165;
euro &euro; &#8364;
copyright &copy; &#169;
registered rademark &reg; &#174;
PRACTICAL
IMPLEMENTATION
Visit Us : Attitude Academy

Вам также может понравиться