Forum Moderators: open

Message Too Old, No Replies

what is wrong with this code?

what is wrong with this code?

         

seven777

4:22 am on Oct 7, 2005 (gmt 0)

10+ Year Member


This is just an example of the top of my site
<body>
<div id="toptabs">
<p style="text-align: center;"><font color="white">

<b>widgets and more &nbsp; &nbsp; &nbsp; &nbsp; </b> </font>

<a class="toptab" href="http://www.mydomain.biz"> widgets and more </a><span class="hide"> ¦ </span>
<a class="toptab" href="http://www.mydomain.biz"> widgets and more </a>
</p>
</div>

When I run it through w3c i get

"Line 33 column 43: there is no attribute "color".
...le="text-align: center;"><font color="white"><b>Casino-Ratings.BIZ - Online C
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute" and

Line 33 column 50: element "font" undefined.
...t-align: center;"><font color="white"><b>Casino-Ratings.BIZ - Online Casino R
You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:

incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case.

I don't really understand or know how to fix this? Any ideas?

willybfriendly

4:37 am on Oct 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<font> is now deprecated in favor of styles. Try something like <p style="text-align:center;color:white;"><strong>widgets...</strong></p>

WBF

seven777

4:57 am on Oct 7, 2005 (gmt 0)

10+ Year Member


Thank you for the help. That advice worked well in the body except I cannot figure out change the color on a h2 tag. How would I go about that?

Robin_reala

8:34 am on Oct 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



h2 { color: whatever; }

That should be put either in an <style> element in the head or in a seperate stylesheet.