hemanthjava
10-05-2006, 09:18 PM
I downloaded a free CSS template which I am using for my Website namely Java Swing Tutorial (http://www.java-swing-tutorial.com) .
Now I ran the HTML Validator for my site using the Validator located at
http://validator.w3.org/
I am getting huge number of errors with respeck to font and font attributes that are not present in the css which is giving me hell lot of errors.
How do I include them in my css. Please let me know what changes I need to make in my css file. I am hereby attaching the css file as a ref.
Regards,
Hemanth
jtillwick
10-05-2006, 10:41 PM
# Error Line 21 column 12: there is no attribute "align".
<h1 align="right"> </h1>
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.
✉
# Error Line 26 column 16: there is no attribute "size".
<p><font size="2" color="#800000">Java swing tutorial and source code giving y
✉
# Error Line 26 column 26: there is no attribute "color".
<p><font size="2" color="#800000">Java swing tutorial and source code giving y
✉
# Error Line 26 column 35: element "font" undefined.
<p><font size="2" color="#800000">Java swing tutorial and source code giving y
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.
✉
# Error Line 32 column 8: there is no attribute "colors".
colors="#B3D1F0,#000000,#000000,#1822CD,#3568C7,#F06157,#FF9218,#CCCCCC" />
Basically css attributes should not be referenced in the html element. For example: You have...
<h1 align="right"> </h1>
xhtml says there is no align attribute because there isn't. This is not css. css goes in a file.css file.
I would suggest learning xhtml and css