Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
frames [2023/02/15 02:34] melonframes [2023/02/15 02:48] (current) melon
Line 2: Line 2:
  
 There are two kinds of frames, [[iframes|iframes]] and frameset, this page is dedicated to frameset: for [[iframes|iframes head over here]]! There are two kinds of frames, [[iframes|iframes]] and frameset, this page is dedicated to frameset: for [[iframes|iframes head over here]]!
 +
 +Notable frameset sites are melonking.net and the [[https://www.spacejam.com/1996/|spacejam website]]!
  
 This is a short guide on how to use frameset to make a homepage: This is a short guide on how to use frameset to make a homepage:
Line 9: Line 11:
   * To use frameset on a page, you need to use the <frameset> tag instead of the <body> tag. The <frameset> tag tells the browser how to split up the window into frames, using the rows and cols attributes. The rows attribute says how many and how big the horizontal frames are, and the cols attribute says how many and how big the vertical frames are. You can use pixels, percentages, or asterisks to say the size of each frame.   * To use frameset on a page, you need to use the <frameset> tag instead of the <body> tag. The <frameset> tag tells the browser how to split up the window into frames, using the rows and cols attributes. The rows attribute says how many and how big the horizontal frames are, and the cols attribute says how many and how big the vertical frames are. You can use pixels, percentages, or asterisks to say the size of each frame.
  
-  * For example, <frameset rows="100,*,50" cols="25%,75%"> means that the window will be split into three horizontal frames, with the first one being 100 pixels tallthe second one taking up the rest of the space, and the third one being 50 pixels tall. The window will also be split into two vertical frames, with the first one being 25% wide, and the second one being 75% wide.+  * For example, <frameset rows="10%,*" cols="150,*"> means that the window will be split into three horizontal frames, with the first one being 10% pixels tall and the second one taking up the rest of the space. The window will also be split into two vertical frames, with the first one being 150px wide, and the second one being the rest of the space.
  
   * Each frame is marked by the <frame> tag, which says which HTML page will show up in the frame. The <frame> tag has a src attribute, which says the URL of the page to show. The <frame> tag can also have a name attribute, which can be used to make links open in a specific frame.   * Each frame is marked by the <frame> tag, which says which HTML page will show up in the frame. The <frame> tag has a src attribute, which says the URL of the page to show. The <frame> tag can also have a name attribute, which can be used to make links open in a specific frame.
  
   * For example, <frame src="nav.html" name="nav"> means that the frame will show the page nav.html, and it will have the name nav. This name can be used to make links open in this frame, by using the target attribute of the <a> tag. For example, <a href="home.html" target="nav">Home</a> means that the link will open the page home.html in the frame named nav.   * For example, <frame src="nav.html" name="nav"> means that the frame will show the page nav.html, and it will have the name nav. This name can be used to make links open in this frame, by using the target attribute of the <a> tag. For example, <a href="home.html" target="nav">Home</a> means that the link will open the page home.html in the frame named nav.
- 
-  * You can also use the <noframes> tag to give some other content for browsers that don’t like frames. The <noframes> tag should go inside the <frameset> tag, and it should have a <body> tag with the other content. For example, <noframes><body>Your browser doesn't like frames.</body></noframes> means that the browser will show the message “Your browser doesn’t like frames.” if it can’t show the frameset. 
  
 Here is an example of a homepage that uses frameset to make a layout with a header, a menu, a main area, and a footer: Here is an example of a homepage that uses frameset to make a layout with a header, a menu, a main area, and a footer:
 <code html> <code html>
 <html> <html>
-<head> +  <head> 
-<title>My Homepage</title> +    <title>My Homepage</title> 
-</head> +  </head> 
-<frameset rows="100,*,50" cols="25%,75%"> +  <frameset rows="10%,*" cols="150px,*"> 
-<frame src="header.html" name="header"> +    <frame src="logo.html" name="header"> 
-<frameset cols="25%,75%"> +    <frame src="header.html" name="header"> 
-<frame src="nav.html" name="nav"> +    <frame src="nav.html" name="nav"> 
-<frame src="home.html" name="main"> +    <frame src="home.html" name="main"> 
-</frameset> +  </frameset>
-<frame src="footer.html" name="footer"> +
-<noframes> +
-<body> +
-Your browser doesn't like frames. +
-</body> +
-</noframes> +
-</frameset>+
 </html> </html>
 </code> </code>