We've toughened up on the distinction between HTML and XHTML

In the early days of XHTML many sites had problems where code was declared as HTML or XHTML when in fact there was a mixture of the two in both cases.  If Sitemorse had reported every infringement then most sites would have been reported as having thousands of errors under the Code Quality category and people would have felt overwhelmed by the volume of errors we were reporting.  As most browsers coped well with these errors and rendered the pages OK we didn't want to be in a position where either people gave up on Code Quality or were spending ages clearing problems that had no real impact on their sites.  With the volume of errors that would have been reported there was a definite possibility of being in a situation where people "couldn't see the wood for the trees."

 

We've kept an eye on this and now feel we can be more picky about the differences between HTML and XHTML.  Having previously been fairly relaxed about the use of XHTML features in HTML, and vice versa, we're now making a proper distinction between the two as most sites seem to have got the distinction correct nowadays.

 

An example of what might typically come up in reports is to do with "empty" tags, e.g. "<br>". These tags do not contain any content, and in HTML they should not have close-tags. In XHTML, all tags should have close-tags, so they must be written "<br />".

So in short:
HTML: <br>
XHTML: <br />

 

Other tags that this issue often crops up with include, for example, <link>, <meta>, <img>, <input> and <hr>.

 

 

The bottom line is if you declare that the code is HTML make sure it is, likewise for XHTML.

0 TrackBacks

Listed below are links to blogs that reference this entry: We've toughened up on the distinction between HTML and XHTML.

TrackBack URL for this entry: http://blog.sitemorse.com/mt/mt-tb.cgi/102

Leave a comment

Recent Entries

Big is not necessarily good when it comes to websites...
Big is definitely not best when it comes to corporate websites - or at least that's what latest research from…
Embarrassing website own goal could have been avoided
A job ad that ended with the words "Usual rubbish about equal opportunities employer etc" had staff at a Liverpool…
It's not about throwing money at the problem.....
An interesting view of the Sitemorse survey of the top global 500 retailers comes from Retail Blogger, Bill Brown.  "Many…
More protection and an iphone app coming...
Sitemorse subscription clients will soon be getting an upgrade that will mean all their web pages will be checked every…
Now anyone can audit a web page in seconds
Sitemorse has made its innovative snapshot tool available to all, so any user can now carry out a quick…