Question about html code.

Place to discuss anything, almost. No politics, religion, Microsoft, or anything else that I (the nazi censor) deem inappropriate.
Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Question about html code.

Post 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?

Doogee
administrator
administrator
Posts: 261
Joined: Fri Jan 10, 2003 1:40 am

Post by Doogee »

yes

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post 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"?

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post 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.

Panos
user
user
Posts: 45
Joined: Mon Feb 03, 2003 12:54 pm
Location: Florence, Italy
Contact:

Post 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]

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post 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:

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post 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.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post 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!).

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post 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. :)

Panos
user
user
Posts: 45
Joined: Mon Feb 03, 2003 12:54 pm
Location: Florence, Italy
Contact:

Post 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.

X11
guru
guru
Posts: 676
Joined: Sun Jan 19, 2003 11:09 pm
Location: Australia
Contact:

Post 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!!!

ThePreacher
scripter
scripter
Posts: 61
Joined: Tue Jan 28, 2003 4:43 am
Location: Kansas City
Contact:

Post 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">

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post 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.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post 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.

Panos
user
user
Posts: 45
Joined: Mon Feb 03, 2003 12:54 pm
Location: Florence, Italy
Contact:

Post 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:

Post Reply