noframe Tag in HTML

0
104

The <noframes> tag is an HTML tag that is used to provide an alternative content for browsers that do not support frames. Frames are a deprecated feature of HTML, but they are still used on some websites, so it’s important to understand how the <noframes> tag works and how to use it.

Here’s a step-by-step tutorial on how to use the <noframes> tag:

Step 1: Open your HTML document
Open your HTML document in a text editor or an integrated development environment (IDE) such as Visual Studio Code or Atom.

Step 2: Create a <frameset> tag
Create a <frameset> tag to define the layout of your frames. The <frameset> tag should contain one or more <frame> tags to specify the content that should be displayed in each frame.

Example:

<frameset cols=”25%,75%”>
<frame src=”menu.html”>
<frame src=”content.html”>
</frameset>

Step 3: Add a <noframes> tag
Add a <noframes> tag inside the <frameset> tag to provide alternative content for browsers that don’t support frames. The <noframes> tag should contain the same content as the <body> tag.

Also Read:  rt Tag in HTML

Example:

<frameset cols=”25%,75%”>
<frame src=”menu.html”>
<frame src=”content.html”>
<noframes>
<body>
<h1>Alternative content for non-frame supporting browsers</h1>
<p>This website requires a browser that supports frames.</p>
<ul>
<li><a href=”menu.html”>View the menu</a></li>
<li><a href=”content.html”>View the content</a></li>
</ul>
</body>
</noframes>
</frameset>

Step 4: Save and test your document
Save your HTML document and test it in a web browser that supports frames, such as Internet Explorer or Firefox. If your document is displayed correctly, test it in a browser that doesn’t support frames, such as Lynx or Mosaic. The alternative content inside the <noframes> tag should be displayed instead of the frames.

That’s it! You’ve successfully added an <noframes> tag to provide alternative content for non-frame supporting browsers. Remember, frames are a deprecated feature of HTML, so it’s a good idea to avoid using them whenever possible. If you must use frames, make sure to provide alternative content using the <noframes> tag.

Leave a Reply