- I could simply go for HTML 4.01 transitional, but I would like to start using XHTML, or the strict variant of HTML 4.01. I wonder what's the best to do.
Strict - the "real" HTML 4
Transitional - HTML 4 with legacy stuff that should be done with CSS or JavaScript instead (avoid this)
Loose - the filename of the DTD for Transitional
Frameset - for framesets (avoid)
- I've read that XHTML specs are going to change, and that it's not widely supported. But I suppose IE6 and FF do support it, and Opera and Safari as well.
XHTML 1.0 has Appendix C which (sort of) makes it compatable with HTML (meaing it looks a lot like HTML and you can serve it with a text/html content type). In this case browsers will treat it as malformed HTML and you gain no advantage over HTML 4.01.
XHTML as XHTML is not supported by some major clients - e.g. GoogleBot and Internet Explorer. So its not very useful on the WWW.
For the time being, for the vast majority of uses, switching to XHTML is pointless and just introduces problems.
XHTML 2.0 is a long way off and is pretty much an entirely new markup language. I'm guessing it might be usable on the web by about 2020AD.
- What variant of XHTML is the best to use and why?
XHTML 1.0 Strict (has Appendix C, doesn't have legacy junk), but for the average website HTML 4.01 Strict is a better choice.
- What happens if I start using divs instead of tables to layout a page? What browsers will get into trouble?
Don't use DIVs to layout a page - use CSS to do the layout. You might apply that to div elements, but the div is the element of last resort - use it only if there isn't an element which better describes the semantics of the data.
What browsers get into trouble depends a great deal on your skill with CSS.
- What's the case with IE5 or IE5.5? I heard that it can be a problem and does things very differently.
IE 5.x has significant bugs when it comes to CSS. You can work round most of them though (given time, Google, and CSS mailing lists). However, they also have a very very small market share - so you might well decide that they are not worth bothering with.
Main Topics
Browse All Topics





by: flow79Posted on 2005-07-12 at 05:06:37ID: 14420536
here are my suggestions as one humble web designer to you:
l1/DTD/xht ml1-strict .dtd">
(1) DEFINATELY switch from legacy table-based layouts to div/css. div/css layouts allow your page to be liquid, and your content/layout are as seperated as they can be (always a good thing).
(2) i would use XHTML. XHTML is simply HTML that follows the rules of XML (if you open a tag, you must close it, proper tag nesting, etc). As XHTML 1.1 is expanded upon, browsers will still support XHTML 1.0. The DOCTYPE to use for this is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtm
(3) XHTML is supported by all normal browsers: IE, NN, FF, Opera, Avant, Safari, etc.
(4) IE is definately the hardest browser to code for (because it rarely follow web-standards and such). However, any div/css design can look good cross-browser, you just need to keep track of any IE-hacks that are neccessary for your layout. For example: IE and FF display margin and padding in different ways. To rectify this, you should never put a width and padding or margin on an element. You set the width on the container, and padding/margin on child elements. It takes some getting used to, but is definately workable.