Ok, the debate about using <b> and <i> is kinda confusing. I'm not even sure I understand all of it. Here's what I can sum up:
A big idea behind (x)html and css is removing presentation (how things look) from content. The <b> tag is saying text is bold. That is presentation, but it is placed within the (x)html, which should only be content. Instead of <b> use <strong> because the reason you make text bold is to make it "stronger" then the text around it. To make it stand out.
The same goes with <i> and <em>. <i> means use italics (presentation), <em> means the text is emphasized. More semanticly correct.
Also, lets say you want to style a <b> element. If, in styling, you take away the font's weight, the tag isn't approprait annymore. If you use <strong> you don't have to make it bold, just make it "strong" in some way (like making it larger, or another color).
Edit:
Adding something on the centering issue, for the margin: auto; to work you need to specify a width.
(x)html: <html> // put the whole doctype thing here, not gonna bother right now <head> // whatever </head> <body> <div id="wrap"> // all the content within this </div> </body> </html>
css: body { text-align: center; // good for IE }
#wrap { width: 750px; // or whatever margin: auto; text-align: left; // re-sets it to normal }
And yah, I'm using // for comments, not css or xhtml, but some other programming languages, I find it quicker to write that way.
If you want to see tags that you should not use, look at the xhtml 1.1 tags and compare them with xhtml 1.0. But don't use xhtml 1.1 because it has to be sent as text/application+xml or something like that and Explorer does not support it.
The W3C recommends that XHTML 1.1 content be served with the application/xhtml+xml MIME type, which Internet Explorer 6 does not support. At this stage, there is no reason to believe that Internet Explorer 7 will support it either.
You need to change headers in order to send true application/xml+xhtml. Setting the content type in the HTML alone will not do it.
I use PHP but you can send them other ways.
AFAIK, IE7 will not be supporting application/xml+xhtml because M$ doesn't want to "half-support" something so they opted not to support application/xml+xhtml at all.
I think tne main idea for not using <b> and <i> and similar tags, is eliminate any styling tags from the HTML data structure, and using CSS instead.
Why?
Because we don't need meaningless tags in our code. Example: <b> means "bold" text, it jus make text bold, meanng anything, and <strong> means "strong" text, measn something, the same for <i> and >em> (emphasis). etc.
You need to change headers in order to send true application/xml+xhtml. Setting the content type in the HTML alone will not do it.
This page (an excerpt from the Firefox Hacks book) contains instructions for how to go about doing this so that it will server the right mime types for XHTML1.1 to browsers that support them, and degrade them back to text/html for ones that don't.
Is there a point to go through all those masochistic solutions in order to use XHTML 1.1 and make IE behave? Just use XHTML 1.0 Strict with XHTML 1.1 tags only (ie, no presentation tags).
nick1presta, what do you mean by integrated with xml? Why would you want to mix the too, and as far as I know even if you give explorer the text/html, it still does not support the <?xml version="1.0"?> doctype.
XHTML 1.1 is supposed to be used with XML. If you're using XHTML 1.1 in the way in which it's supposed to be used, you will want to browser-sniff for IE and other browsers that can't handle the XHTML and XML.
Otherwise, if you feel that you should mark your HTML with the XHTML doctype, use 1.0 Strict (or any variation of 1.0 although Strict is preferred) for backwards compatibility as XHTML 1.0 is the only variation of XHTML (the only other being 1.1) that can be served as text/html.
Just to expand on Nick's comment: If you're using XHTML 1.1 and sending the correct content-type headers then browsers will parse it as XML.
So, for example, if you've got some code errors in something that's XHTML1.0 (strict or trans) then your page will look strange, things will be out of alignment, etc. But if you've got a code related error in XHTML1.1 (with the correct headers) you get the "invalid XML" error description in firefox instead of a page.