youngros Posted January 7, 2009 Report Posted January 7, 2009 When I first got to grips with hand coding and being told it had to validate, I used XHTML. Well that was what I was told to use, and it is also the default of DW8. My sites now all validate XHTML transitional, but I want them to validate strict. I figure it is probably easier to go with XHTML strict than HTML strict. Some of the errors are easy enough to correct, removing "target". But how do I go about changing the "align" attribute within a table? Quote
Susie Posted January 7, 2009 Report Posted January 7, 2009 I would just put all table styles in the CSS. Here are some good examples to view. Tables and CSS Quote
lwsimon Posted January 7, 2009 Report Posted January 7, 2009 figure it is probably easier to go with XHTML strict than HTML strict. You should read this post. Quote
youngros Posted January 8, 2009 Author Report Posted January 8, 2009 (edited) Thanks Susie, that should help. I have read the article before, and so wish I had stuck to HTML, but maybe easier to carry on as I am, but make it strict or go for XHTML1.1 To get the strict on my site (or some of it) I had to remove the border "0" from the weather link. ww w.holy trinity-mad eira.org/ It has now put a purple border on the link. Can this be removed using CSS? Edited January 8, 2009 by youngros Quote
Wickham Posted January 8, 2009 Report Posted January 8, 2009 XHTML 1.1 is just Strict (no transitional) and should use content="application/xhtml+xml" instead of content="text/html", but then IE6 has serious problems. If you use XHTML 1.0 with content="text/html" then that's tag soup and back to plain HTML. For your purple image border, put in img { border: none; } to get rid of link state border colors in the whole website. Quote
LSW Posted January 8, 2009 Report Posted January 8, 2009 ...but maybe easier to carry on as I am, but make it strict or go for XHTML1.1 XHTML 1.1 is just Strict (no transitional) and should use content="application/xhtml+xml" instead of content="text/html", but then IE6 has serious problems. Wickham is of course right... but to qualify it... Not just IE6 has problems, no version of IE supports XHTML, nor has I seen claims that IE8 will. This means you will have to use content negotiation (see my article) in order to serve XHTML to all browsers but IE and HTML to IE, otherwise IE will try to download the page. Also, if you or the owner/maintainer of the web site makes one little mistake like forgetting to encode an ampersand (&) or your editor transforms it when you update a page... the page will not load, the user will see a while sheet with a cryptic red XML error message telling them you screwed up. Of course more things can sink the site than just an "&". If it is a site page it is irritating, but if it happens on a category or worse case, the index page, your sunk. It happened often to me on LSW, a small mistake in a new feed page, well that mistake would be inserted into the index page slice of the latest articles and the index page would not open. I could not even enter to correct the problem and had to jump through hoops trying to correct it. XHTML 1.1 is not worth it because it must be served as content="application/xhtml+xml" Quote
youngros Posted January 9, 2009 Author Report Posted January 9, 2009 So what you are really saying is, that I should use HTML strict and forget about XHTML. Looks like that will be February's job, after I have returned from the snowy and cold north. Well England anyway. Quote
Wickham Posted January 9, 2009 Report Posted January 9, 2009 Use just HTML 4.01 (soon to be upgraded to HTML 5.0). The problem is that major browsers are so forgiving and flexible, they guess when they meet a problem. There's another post on this forum which I answered today which used XHTML 1.1 (and didn't have any content type meta tag) and it worked without the XHTML 1.1 having any effect, and no effect when I added content="text/html", because it just treats it all as HTML, but it's not correct! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.