XHTML 1.0 STRICT Validation

He has: 1,380 posts

Joined: Feb 2002

Hey...i've been trying to validate my page for XHTML 1.0 Strict...i got some errors i dont understand:

1- there is no attribute "language"
<script language="javascript" type="text/javascript">

2- there is no attribute "align"
...border="0" cellpadding="0" cellspacing="0" align="left">

3- there is no attribute "border"

8- there is no attribute "align"

what happened to all these tags and attributes? what do i use instead? i searched the documentation on the w3c site...didnt' find anything, tried the "explain" buttons, that didn't help either...

thanks

Busy's picture

He has: 6,151 posts

Joined: May 2001

1/ remove language, it now uses type
2/ use CSS to align it (text-align: left, right or center;)
3/ use CSS
4/ make it all lower case
5/ make it all lowercase
6/ make it all lowercase
7/ place the id in the h1 (best method) or place h1 inside div
8/ use CSS to align

dk01's picture

He has: 516 posts

Joined: Mar 2002

For 7 you could also try a span since it is an "inline" tag and not a "block" tag. Block tags usually can contain inline tags but not vice versa. Block tags include tags like , , , etc. Inline tags include tags like ,,, , etc. If you are going to
http://www.sizefactory.com/xhtml/xhtmlbasics.html

The reason is because xhtml strict is meant to be only for the presentation of information and not for the actual design of how it looks. That is supposed to be done using a stylesheet. If you want a more flexible standard you could always move to xhtml 1.0 transitional. Anyways good luck with xhtml.
-dk

He has: 1,380 posts

Joined: Feb 2002

i see, thanks

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.