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?
learnAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HooliganCommented:
A frameset does not have a body tag, cause it is just a template kind of page, in a round about 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.
0
boycey19Commented:
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


0
boycey19Commented:
Frameset pages dont 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


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

boycey19Commented:
Sorry posted it twice.
0
chewymonCommented:
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/
0
learnAuthor Commented:
Hi boycey19,

Thank you. Do you think <frame src="page1.html"> may avoid poeple from reading the code in page1.html?
0
boycey19Commented:
Not likely, after all the html document is downloaded to cache. Therefore allowing them to read it.

Boycey
0
boycey19Commented:
Not likely, after all the html document is downloaded to cache. Therefore allowing them to read it.

Boycey
0
boycey19Commented:
Why are my posts sending twice?
0
chewymonCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.