search
HomeWeb Front-endHTML TutorialFrameset tag design page considerations

Frameset tag design page considerations

Jun 27, 2017 am 10:02 AM
Labeldesignpage

Important: You cannot place the tag inside in the label. And HTML5 no longer supports the use of frameset tags! ! !

#1. The frameset element can define a frameset, which is used to organize multiple windows (frames). Each framework has separate documentation. With the use of the frame, we can split the page and refresh it partially. Reasonable use will bring a very good experience to users.

2. Several attributes of frameset:

①, cols:Define the number and size of columns in the frameset . Cut the screen vertically (for example, into two left and right screens), accept integer values ​​and percentages, * means occupying the remaining space. The number of values ​​represents the number of divided windows and is separated by commas. For example, COLS="30,*,50%" can be divided into three windows. The first window has a width of 30 pixels and is an absolute division. The second window is what remains after the first and third windows are allocated. The space below, the third window occupies 50% of the entire window screen, and the width is a relative split. You can adjust the numbers yourself.

②、rows:Define the number and size of rows in the frame set. This is a horizontal cut, which separates the top and bottom of the screen. The value settings are the same as above. Try not to put the COLS and ROWS parameters in the same tag, because Netacape sometimes cannot display this type of frame, so try to use multiple splits.

③、frameborder:Set the border of the frame, its value is only 0 and 1, 0 means no border, 1 means to display the border.

④、border:Set the border thickness of the frame.

⑤、bordercolor:Set the border color of the frame.

⑥, framespacing: represents the distance between frames and the remaining blank space.

3. Attributes of the frame tag:

①, name: Set the frame name. This property must be set.

②, src: Set the name or path of the web page to be displayed in this frame. This property must be set.

③, scrolling: Set whether to display scroll bars. The setting values ​​are auto, yes, no.

④, bordercolor: Set the border color of the frame.

⑤、frameborder:Set whether to display the frame border. The setting values ​​are only 0 and 1; 0 means no border, 1 means to display the border.

⑥, noresize: Set whether the frame size can be adjusted manually.

⑦、marginwidth:Set the width between the frame boundary and the content inside it.

⑧, marginhight: Set the height between the frame boundary and the content within it.

⑨, width: Set the frame width.

⑩, height: Set the frame height.

4. Frameset usage example:

If you want to achieve the following effect

## The page is divided into three parts, top, left and right. Click the

hyperlink on the left, and the frame page on the right will change accordingly.

Overall page: main.html


1 <frameset>2         <frame>3         <frameset>4             <frame>5             <frame>6         </frameset>7 </frameset>
top.html, right.html is an empty page, left.html is as follows:


1 <!-- 左边菜单栏显示-->2     <p>3         </p>
9     The hierarchical display of the page is mainly the use of cols and rows in the frameset tag, combined with the nesting of the frame tag. If you want to click the menu bar on the left and the frame on the right changes accordingly, you must know the attribute

target: stipulates where to open the linked document. The browser will load and display the document in the frame or window named with this tag's href attribute and whose name matches this target. That is, in main.html,

,What is the value of the name attribute here, then in left.html, here Be equal.

5. How to get the elements in other frames in the frameset where the parent page is located in the child page?

That is, how to get the attribute value of the tag in left.html in right.html, etc.

$(parent.parent.mainFrame.

document).contents().find("body").html(); //manFrame refers to the id of the frame you want to view

For example, in the left.html page above ,The ID of task creation is taskCreat, then we can get it like this: and change its class attribute.

$(parent.parent.left.document).contents().find("#taskCreat").attr("class","list-group-item");



6. Advantages and disadvantages of frameset

We know that the current HTML5 standard no longer supports frameset. Although using it reloading does not require reloading the entire page, only one frame page in the page needs to be reloaded (reducing data transmission, speeding up web page download speed). But it also has many shortcomings, such as the browser's back button is useless; it will generate many pages, which is difficult to manage; the code is complex and difficult to be searched by search engines; small mobile devices are not fully displayed; multi-frame pages Will increase server http requests and so on. Therefore, we need to be careful about the use of frameset, and the current p+CSS can also be used to implement this function.

The above is the detailed content of Frameset tag design page considerations. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What is the difference between an HTML tag and an HTML attribute?What is the difference between an HTML tag and an HTML attribute?May 14, 2025 am 12:01 AM

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The Future of HTML: Evolution and TrendsThe Future of HTML: Evolution and TrendsMay 13, 2025 am 12:01 AM

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

Why are HTML attributes important for web development?Why are HTML attributes important for web development?May 12, 2025 am 12:01 AM

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

What is the purpose of the alt attribute? Why is it important?What is the purpose of the alt attribute? Why is it important?May 11, 2025 am 12:01 AM

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.