JavaScript Tutorial

HTML Frames

HTML frames were used in the past to divide a web page or a web browser into multiple sections that could load differently. Each frame had a frame tag that indicated its position. The row attribute of the frame tag defined the horizontal frame, and the column attribute defined the vertical frame in the HTML document. A single window in a frame could display a static banner, a navigation menu, and so on.

However, the frame tag has been deprecated in HTML5, and CSS properties are used instead.

Syntax of Frames

In HTML, there is no end tag for the <frame> tag. Instead, we use the <frameset> tag to divide a webpage into frames. The <frame> tag defines which HTML document should open as a frame.

<frame src = "URL">

The attribute cols specifies the number and size of columns in a frameset, and its value is in pixels. Similarly, the attribute rows specifies the number and size of rows in a frameset, and its value is in pixels.

<cols ="10%, 80%, 10%">

<rows ="10%, 80%, 10%">

There are a few important attributes of the <frameset> and we discuss it in the next lesson.

Go back to Previous Course