Forum Moderators: mack

Message Too Old, No Replies

HTML Check

not sure what this means

         

Gary_Numan

4:34 pm on Feb 14, 2004 (gmt 0)

10+ Year Member



Can anyone explain this line to me please?

Error: missing </font> end tag before <h1> tag

Hint: <h1> element NOT allowed in <font>...</font> element.

I think I understand it, but as soon as I put a </font> tag in front of my <h1> then the whole page goes nuts.

GN

victor

5:05 pm on Feb 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Pretty much what it says.

You can't nest a h1 inside a font.

(Of course, you can if you want, and many browsers may make a good show of rendering it. It's just not valid HTML, and not really a good idea).

You can nest a font in a h1

And you can do away with fonts by using CSS.

Gary_Numan

5:59 pm on Feb 14, 2004 (gmt 0)

10+ Year Member



I see, in other words 'it does exactly what it says on the tin'

So does this harm me in any way? Search engine wise, or when viewed from other browsers?

The trouble is, I am using 'Site Build it' to construct my site and the H1 tag and font mix up is at their end. I just type in my heading into a box.

Of course, I am playing about with other html codes in the body, but that is my responsibility to get right.

So should I be contacting them about this or, on a grand scale of things, is it not that important?

GN

g1smd

8:25 pm on Feb 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It is a bug that they should put right.

Valid: <h1><font> ... </font></h1>

Not valid: <font><h1> ... </h1></font>

However, as hinted above, you should try to use CSS to style the heading instead. It makes for much leaner code.

gregor

4:46 pm on Feb 17, 2004 (gmt 0)

10+ Year Member



However, as hinted above, you should try to use CSS to style the heading instead. It makes for much leaner code.

CSS also makes site wide changes ridiculously easy as well. By editing 1 or 2 lines in a .CSS file you can accomplish in minutes what may take you hours "the old way". Say you wanted to change all of your <h1> tags to the colour blue ... a simple process using CSS but long and tedious if you had to find and then edit each instance of <h1> on each web page over your entire site.

thehittmann

7:16 am on Feb 18, 2004 (gmt 0)

10+ Year Member



you should look into which tags have been deprecated. <font> <b> <i> <center> are just a few, there are many other tags that are no longer needed or valid these days. A read of w3's deprecated tags could help you make some improvments to your html, site rankings and cross browser compatability.