<frame>
<frame>
Tag
The <frame>
element is used to define sections within a <frameset>
, allowing multiple HTML documents to be displayed in different frames.
Syntax
<frameset cols="percentage,width" rows="percentage,height">
<frame src="url" name="frame_name">
<!-- More frame elements here -->
</frameset>
Example
<h1>The iframe element</h1>
<iframe src="https://institute.qarpeo.com" title="Qarpeo Free Online Web Tutorials">
</iframe>
Attributes
This element supports standard global attributes.
src
: Defines the URL of the document that appears in the frame.name
: Assigns a name to the frame, which can be used for targeted links. If omitted, links open in the closest parent frame.noresize
: Prevents the frame from being resized by users.scrolling
: Determines whether scrollbars appear. If unspecified, the browser adds them as needed.margin-height
: Sets the vertical margin between the frame's content and its border.margin-width
: Sets the horizontal margin between the frame's content and its border.frameborder
: Controls the visibility of the frame's border.
Conclusion
The <frame>
element was used to create sections within a <frameset>
, enabling multiple HTML documents to be displayed in different frames within a browser window. However, it is now considered outdated and not recommended for modern web development due to accessibility and usability concerns. Instead, the <iframe>
tag is commonly used to embed external content within a webpage.
<embed>
The HTML <embed> element integrates external content, like multimedia or interactive applications, directly into a webpage, facilitating the inclusion of media without needing plugins.
<frameset>
The <frameset> tag is used to define a collection of frames within a web page, allowing multiple HTML documents to be displayed simultaneously.