learn
asked on
No <body>?
I tried to learn HTML by read the page source code :-)
I thought every page must has <BODY>, but some page not! Only has <RAMESET>.....
Can you explain something to me?
I thought every page must has <BODY>, but some page not! Only has <RAMESET>.....
Can you explain something to me?
Thats not true framesets can have a body. But they only have body, when they want to show the page when the clients browser doesnt support frames. For instance.
<html>
<frameset cols="100, *">
<frame src="page1.html">
<frame src="page2.html">
<frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</html>
The html within the body would show up if the clients browser doesnt support frames. But if it wasnt there, then the page would be blank.
So Id actually put a body tag in just for those people who have browsers that dont support frames. But its not compulsary to have a body.
Boycey
<html>
<frameset cols="100, *">
<frame src="page1.html">
<frame src="page2.html">
<frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</html>
The html within the body would show up if the clients browser doesnt support frames. But if it wasnt there, then the page would be blank.
So Id actually put a body tag in just for those people who have browsers that dont support frames. But its not compulsary to have a body.
Boycey
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry posted it twice.
Here is a better way to learn HTML. An excellent tutorial that you can download to your machine for free or read it off the web.
http://junior.apk.net/~jbarta/
http://junior.apk.net/~jbarta/
ASKER
Hi boycey19,
Thank you. Do you think <frame src="page1.html"> may avoid poeple from reading the code in page1.html?
Thank you. Do you think <frame src="page1.html"> may avoid poeple from reading the code in page1.html?
Not likely, after all the html document is downloaded to cache. Therefore allowing them to read it.
Boycey
Boycey
Not likely, after all the html document is downloaded to cache. Therefore allowing them to read it.
Boycey
Boycey
Why are my posts sending twice?
This is just the way browsers render framesets. People often ask how to hide HTML code, and the answer is there is no surefire way.
All a frameset page does is define the area on the browser window that will display a page. In otherwords, in a <frameset> tag, lets say you define 2 frames, which means you are seperating the browser window into 2 distinct sections, each section capable of displaying its own html page, both of which are displayed at the same time.
A <frameset> tag inside of a bodytag will not work, so you have to leave the body tag out. Since theres no formatting tags (like <b> or <h1> or <img src> ) on the frameset page, there is no need for a body tag.