开发者

Is it considered more professional to write a website in strict rather than transitionl html?

I wa开发者_Python百科s wondering if it was considered more professional to write a website in strict xhtml rather than transitional.

Is it something that should be done as you advance as a web developer, or is it irrelevant?


With the possible exception of the (rarely needed) start attribute, the difference between Strict and Transitional boils down to "Things you should not have used since Netscape 4 stopped being a dominant browser".

So, the question is a tricky one as, if you learned HTML this side of the millennium, you shouldn't have been using Transitional in the first place (now let us have a minutes silence as we lament the poor quality of over-popular tutorials (such as one from an organization that gets a lot of glory reflected off the W3C due to its similar name … and I'm ranting, so I'll stop now).


On the marketing side, you might get a slightly better response for saying that you right in strict XHTML, but really, the choice doesn't matter. Transitional has some quirks that improve backwards compatibility with elements from HTML4 and older, but which have since been disfavoured and thus deprecated in the strict flavours (e.g., frames). If you're learning how to write markup these days, you're learning all XHTML anyway, so you can feel free to use strict.

Short answer: it doesn't matter.


It doesn't make much of a difference which you use - just try to be as consistent as possible with your mark-up. If nothing else, it makes search+replace much easier.


If you want to be "professional" and up-to-date use <!DOCTYPE html>. This won't break anything and it's as modern as you can get.


I write HTML 4.01, either traditional or strict.

The truth is XHTML is broken and a correct rendering on a HTML 4.01 browser will litter your page with right angle brackets.

If you think you know how <br/> is defined in the HTML 4 standard, think again.

 This sentence is <br/> across two lines.

When read by a strict parser becomes

 This sentences is
 > across two lines.

The SGML language form which HTML is built on has a shorttag feature known as NET. The transformation is "<br /" -> "<br></br>". So, "<br/>" burns.


Here is an article I found yesterday. Read the markup part, its the first part :D http://davidwalsh.name/get-over-it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜