HTML Iframes:
An iframe is used to display a web page within a web page.
Syntax for adding an iframe:
<iframe src="URL"></iframe>
<iframe>:- Define an inline iframe.
An iframe can be used as the target frame for a link.
The target attribute of a link must refer to the name attribute of the iframe
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>IFRAME</title>
</head>
<body bgcolor="#000000">
<iframe src="iframe.html" name="iframe" id="iframe"></iframe>
<p style="color:#FFFFFF;">forms and attributes and its examples</p>
</body>
</html>
To set a target in iframe:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<a href="iframe.html" target="one">LINK</a><br/>
<iframe name="one" id="one"></iframe>
</body>
</html>
Anchor tag:-
The HTML <a> tag is used for creating a hyperlink to either another document, or somewhere within the current document.
Syntax:
<a href=“URL”>name of anchor tag in screen</a>
<a>…..</a>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<a href="iframe.html" target="one">LINK</a><br/>
</body>
</html>
Image tag:-
The HTML <img> tag is used to put an image in an HTML document.
In HTML the <img> tag has no end tag. It’s a self-closing tag.
Syntax:-
<img src=“pathname” alt=“alternate pathname” />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<img src="../../Untitled.png" name="myimage" />
</body>
</html>