HTML <frameset> Tag

Today we’re here to talk about Tag frameset examples. Wishing it would fulfil the needs of learners.

The HTML <frameset> tag is used to define a set of frames within a web page. A frameset is a container for one or more <frame> or <iframe> elements, which are used to display different HTML documents within the same window.

The <frameset> tag is typically used in conjunction with one or more <frame> tags to define the content of each frame within the frameset. The <frameset> tag can contain attributes such as “cols” or “rows” to specify the dimensions of each frame within the frameset.

HTML <frameset> Tag Disappearance ?

The HTML <frameset> tag was abandoned because it had several issues and limitations, such as:

  • Frames made it difficult for visually impaired users to navigate a web page because screen readers would have trouble interpreting the content of multiple frames.
  • Search engines had trouble indexing the content of web pages with frames because they would only index the main frameset page and not the content of each frame.
  • Bookmarks or links to specific frames within a frameset were not possible, as they would only link to the frameset page.
  • Frames could be used to inject malicious content into a web page.
  • Frames were not supported by all web browsers and mobile devices.
Additional Information: The <frameset> tag was included in HTML 4 to specify frames.


Frameset Alternative

To embed the other document in your HTML document, use the <iframe> tag:

Example: 

<!DOCTYPE html> <html> <body> <iframe src="https://mrexamples.com"></iframe> </body> </html>

Here’s another example of using the <iframe> tag:

Example: 

<!DOCTYPE html> <html><body><br><br><br> <title>My Website</title><br><br><br> <h1>Welcome to Mr.Examples</h1><br> <p>Here is an overview of my website.</p><br> <br> <!-- Embedding another web page using the <iframe> tag --><br> <iframe src="https://mrexamples.com/html/" width="600" height="400" frameborder="0"></iframe><br> <br><br><br> </body></html>

Advantages of <iframe> over <frameset>

Both <iframe> and <frameset> are HTML tags used for creating frames or sections of a web page. However, <iframe> has several advantages over <frameset>:

  1. <iframe> is supported by all modern browsers, while <frameset> is not supported by some mobile and tablet devices.
  2. <iframe> can be used to embed any HTML document, regardless of its structure, while <frameset> can only be used to divide a page into separate frames.
  3. <iframe> allows you to add an accessibility title and description to the frame for screen readers to understand the content better. On the other hand, <frameset> is less accessible because it creates multiple pages with separate URLs, which can create confusion for users and search engines.
  4. <iframe> allows you to embed content from another website while protecting your website from any malicious code or vulnerabilities that the embedded content might have. In contrast, <frameset> allows content from another website to have access to your website’s cookies and session data, which can pose a security risk.
  5. <iframe> allows you to embed content from another website without affecting your website’s SEO, while <frameset> creates multiple pages with separate URLs that can cause duplicate content issues and negatively affect your website’s SEO.

Overall, <iframe> is a more versatile and modern approach to creating frames or sections of a web page that offers better compatibility, accessibility, security, and SEO advantages than <frameset>.

Do leave your reaction below in order to appreciates our efforts or to provide us feedback for the betterment of this site.
We value your feedback.
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Subscribe To Our Newsletter
Enter your email to receive a weekly round-up of our best posts. Learn more!
icon

Leave a Reply

Your email address will not be published. Required fields are marked *