HTML frame tag and element

1. HTML frame element defines a subwindow.

2. frame element starts with <frame> tag and ends with </frame> tag which is forbidden.

3. The value of the src attribute of the frame element sets the initial value of the document the frame will contain.

4. A number of frames (subwindows) can be defined within frameset element.

5. Usage of frame element is largely replaced by iframe element in modern design techniques.


<frame src="document">

Whether both start and end tags are required

The start tag is required but the end tag is forbidden.

Can contain

HTML frame element can contain a web document.

Can reside within

HTML frame element can reside within frameset element.


name, longdesc, src, noresize, scrolling, frameborder, marginwidth, marginheight.


id, class.





Supported doctypes

HTML 4.01 frameset.

Example of using HTML frame element

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/framset.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>HTML frame tag example - HTML tutorial | w3resource</title>
<frameset rows="33%,*,33%">
<frame src="../../html/attributes/header.html">
<frame src="../../html/attributes/content.html">
<frame src="../../html/attributes/footer.html">


htnl frame element

View this example in a separate browser window

HTML frame tag example.

Previous: HTML hr tag and element
Next: HTML frameset tag and element

Test your Programming skills with w3resource's quiz.