The framework allows you to open two or even multiple pages in a browser window. You can understand this way that <frameset> is actually a big <table>, but the entire page is the main body of <table>, and the content of each cell is an independent web page.
Column the framework structure (cols and rows properties)Since we say that the framework structure can be understood as a table with a web page as a cell, we must divide the columns. Where the cols attribute divides the page into several columns, while the rows attribute divides the page into several rows. Let’s take a look at an example below.
<html>
<framesetrows=25%,75%>
<framesrc=1.html/>
<framesrc=3.html/>
</frameset>
</html>
where rows=25%, 75% means that the page is divided into two rows because it has two attribute values, and their sizes are 25% and 75% of the page height respectively. Click here to view the display effect of the above code. Frame tag <frame>
The <frame> tag has been used in the above example, and its src attribute is what will be displayed in this framework. In this example, the two frames can be changed by dragging and dropping. If you want them to be fixed in size, you can use the noresize=noresize property.
Note: The <frame> tag is an empty tag, and one/ needs to be added to meet the requirements of XHTML.
About the <noframe> tagThis tag will only work if the browser does not support the framework structure. Since almost all netizens’ browsers now support the framework structure, we will not introduce this tag here. If you want to know about it, you can check the HTML manual on the Internet.
Framework structure and DTDThe DTD of a frame page is different from that of a general web page. The declaration method is as follows:
<!DOCTYPEhtmlPUBLIC-//W3C//DTDXHTML1.0Frameset//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd>