Page 1 of 2

Question about html code.

PostPosted: Wed Feb 05, 2003 3:06 am
by Ice9
I recently started to learn html and put together a little site just to see what cold be done and how to do it - http://users.pandora.be/Ice9

The way I did it is I have an index.htm page (mandatory) which includes two frames - menu_bar.html and main.html.
On the main.html frame I have put a <HEAD></HEAD> section but not on the menu_bar.

Now I ran the site through a site checker to see what kind of errors I could get and it tells me that <HEAD></HEAD> is missing on the menu_bar.
It actually gives me spelling mistakes as well - e.g. I can't put Linux in there, I would have to use Linus or Linum :roll:

Do I have to put it there as well? I mean there's already a <HEAD></HEAD>
on the main frame, is there any point to add one on the menu side as well?

PostPosted: Wed Feb 05, 2003 4:22 am
by Doogee
yes

PostPosted: Wed Feb 05, 2003 5:00 am
by Ice9
Ok, and what about <META> tags?
Do I have to use them on every single page including the "Home" page or can I just use the tags on the relevant sub-pages like "news"?

PostPosted: Wed Feb 05, 2003 6:53 am
by Calum
in my opinion it's best to put them all on the index.html page (it's only abbreviated to *.htm to conform with microsoft's idiotic 8.3 naming structure) and to include relevant ones on the sub pages. not sure what the official w3c word is on that though.

PostPosted: Wed Feb 05, 2003 8:50 am
by Panos
My advice Ice9 is to get HTML Tidy, which I STRONGLY recommend. Now, as for your <HEAD> tags, my suggestion is to include them there also just to comply with the W3C standards and support them as much as possible. As for the spelling mistakes I really don't see why you can't use the word Linux on the title. :shock: This is a first!

Oh, and about those <META> tags, you can use them in as many pages as you like but make sure you include them in your main page. At least that's what I would do. PM me if you need any help. :)

PS I just noticed that you're missing the !DOCTYPE declaration at the beginning of your page and before the <HTML> tag. To put it there type:

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


That is if you want to. :) [/code][/url]

PostPosted: Wed Feb 05, 2003 8:58 am
by Ice9
Ok, thank you all for your advice, I'll add the <META> and the <!Doctype> tags to my main page this evening.

If you have any other suggestions or improvements feel free to post them of course :wink:

PostPosted: Wed Feb 05, 2003 10:49 am
by Void Main
I don't believe any of the HTML standards require <META> tags (maybe XML/XHTML does, not sure). I can understand the need for <HEAD> tags even in framed pages (actually frames are not allowed in many standards, correct me if I am wrong). A frame actually does nothing more than display another HTML page, which can be viewed standalone and must follow normal HTML standards. Some browsers can not handle frames (older browsers and many text based browsers). I do use frames for certain custom web based apps but it is generally a good idea to stay away from them for information you want to get to the masses if at all possible.

PostPosted: Wed Feb 05, 2003 3:36 pm
by Ice9
:( You're right about the frames and older browsers/text only browsers.
I didn't think about that, just thought that the use of frames allowed you to do pretty cool things like non-resizable spots on a page where you can put a menu, or the top/bottom of a page that remains static while you scroll through the page and stuff like that.

Well, there might be other ways to do that, still have a lot to learn.
One option would be to let users chose for a frames or non-frames version on my main page ......

Are there still that many old/text only browsers out there?
With the upcoming of broadband I can't imagine that someone would want to use a text-only browser (I can feel the flames coming!).

PostPosted: Wed Feb 05, 2003 4:13 pm
by Void Main
I periodically use lynx (a text based browser) but not for general web surfing. I don't really care for sites that use frames (at least the ones that have them really badly implemented, overuse them, or use them when they are obviously not necessary). Sometimes they come in handy for things but I wouldn't look at frames as a first choice way of doing something. Same with overuse of JavaScript and I especially hate Flash. It's ok if it's buried somewhere in the back for those who want to see it but I don't believe I am alone when I say using Flash on your main page is a definite no-no.

Of course don't use this site (Void's BS) as a judge for my capabilities. You'll note in the disclaimer it is intentionally ugly. :)

PostPosted: Wed Feb 05, 2003 4:33 pm
by Panos
Well, I don't like frames either (personal opinion) eventhough they're quite practical, mostly because of the lack of compatibility with older browsers. However you could always create your page without frames and redirect browsers that don't support them, to that (a pain in the arse if you ask me :) ). About the <META> tags, it's true that they're not necessary in HTML.

PostPosted: Wed Feb 05, 2003 10:46 pm
by X11
Some basic html
Code: Select all
<html>
<head>
<title>Voidmain is god</title>
</head>
<body>
<h1>Thou shalt not take the lords name in vain</h1>
Or X11s!!!

PostPosted: Thu Feb 06, 2003 1:58 am
by ThePreacher
Void Main wrote:I don't believe any of the HTML standards require <META> tags (maybe XML/XHTML does, not sure). I can understand the need for <HEAD> tags even in framed pages (actually frames are not allowed in many standards, correct me if I am wrong).


Actually, my page was not valid html transitional until I included


<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

PostPosted: Thu Feb 06, 2003 2:53 am
by Void Main
Which version? Click the "HTML 4.01" button at the bottom of my main page, then do a "view source". I have no META tags in most of the pages on this site and they all pass.

PostPosted: Thu Feb 06, 2003 6:16 am
by Calum
Panos wrote:To put it there type:

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


That is if you want to. :) [/url]


Again, unless you have this (or the corresponding similar line with correct version numbers) at the top of all your webpages, your html is not going to be w3c compliant.

PostPosted: Thu Feb 06, 2003 12:30 pm
by Panos
ThePreacher wrote:
Void Main wrote:I don't believe any of the HTML standards require <META> tags (maybe XML/XHTML does, not sure). I can understand the need for <HEAD> tags even in framed pages (actually frames are not allowed in many standards, correct me if I am wrong).


Actually, my page was not valid html transitional until I included


<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


That's true, especially in HTML 4.0 and 4.01 and I forgot about that, sorry. Void Main confused me a bit though, when he wrote that he hasn't included the specific <meta> tag. :roll: