HTML

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Historical information)
(Other resources)
Line 87: Line 87:
 
* [http://darobin.github.io/after5/ After 5: The future of HTML]
 
* [http://darobin.github.io/after5/ After 5: The future of HTML]
 
* [http://shop.oreilly.com/product/0636920021049.do What Is HTML5? (free e-book)]
 
* [http://shop.oreilly.com/product/0636920021049.do What Is HTML5? (free e-book)]
 +
* [http://www.andreaforte.net/ParkICER2013.pdf Towards a Taxonomy of Errors in HTML and CSS]
  
 
[[Category:Web]]
 
[[Category:Web]]
 
[[Category:W3C]]
 
[[Category:W3C]]

Revision as of 12:42, 30 March 2015

File Format
Name HTML
Ontology
Extension(s) .html, .htm
MIME Type(s) text/html
Released 1990

HTML (hypertext markup language) is one of the three pillars of the Web as originally developed by Tim Berners-Lee, along with HTTP and URLs. It is the markup language normally used for Web documents (although many other formats can also be used for material on the Web). It originally was an SGML based markup language. XHTML is HTML redeveloped using the stricter XML rules. Disagreement over the direction of W3C developments from some of the browser vendors led to the formation of the Web Hypertext Application Technology Working Group (WHATWG). They maintain the spec for the HTML5 or HTML Next or HTML Living Standard, which is not based on SGML any more. The W3C standardisation group will work to formalise the WHATWG specification as a series of standardised 'snapshots' of the living standard. One version of this standard has been "frozen" into a W3C HTML5 recommendation as of October 28, 2014, while the ongoing "living standard" is getting regular updates as what W3C is referring to as "HTML 5.1", perhaps eventually to be frozen into another recommendation with the living standards moving on to HTML 5.2 and so on.

Contents

Specs

HTML vs. XHTML

In HTML versions prior to HTML 5, there was a "fork" between HTML and XHTML, with the former being SGML-based and the latter XML-based. While the features of both are for the most part very similar, there are some syntactic differences which can trap the unwary, usually not causing any actual problems in rendering in common browsers (which are very forgiving of errors), but preventing validation. For instance, any tags not requiring a matching ending tag (e.g., <br>) need an added slash in XHTML to make them self-closing (<br />). This should not be used in HTML. There are some other differences such as HTML tags and attributes being case-insensitive so they can be entered in either uppercase or lowercase, while XHTML is case-sensitive and its standard tags are all lowercase. Some parts of the respective syntaxes won't mix and still validate as either variety, which is a problem when webmasters paste in code from diverse sources (including ad-network and affiliate links and scripts which may have terms-of-service contracts mandating that they be used in an unmodified form). However, HTML 5, which is not directly based on either SGML or XML, is more forgiving of allowing such mixed syntax; its specs say that the underlying HTML document can be expressed in either syntax, and while you're still supposed to pick one or the other, there are very forgiving parsing rules for interpreting the document.

The "forgiving" processing of mixed syntax applies only to documents served with the MIME type "text/html"; if an XML MIME type is used, browsers are supposed to be stricter in interpreting the syntax and rejecting documents which are improper or which are of a form they don't understand.

DOCTYPE

HTML and XHTML documents begin with a doctype declaration, which is of a format that had a specific meaning in SGML. Browsers and validators could recognize different doctypes to determine which version of HTML was being used, and browsers sometimes changed between "standards" and "quirks" parsing modes based on the doctype. HTML 5, since it was intended as a "living standard" and was no longer based on SGML, used a mimimalist doctype <!doctype html> designed to trigger standards mode in all browsers, but no longer giving any indication of which specific variety of HTML5 (and up) is in use.

Nonstandard extensions

The formal specs, of course, do not fully describe the HTML documents in use in the "real world", as quite a number of nonstandard elements, attributes, and other extensions have been implemented in various browsers (including the most popular ones), and also, browsers have tended to be very forgiving of invalid markup, leading to lots of sloppy coding being widespread because "it works in [name of popular browser], so that's all that matters!"

In 2013, the Mozilla organization announced the removal of support for the nonstandard BLINK element, supported in various browsers since being introduced in the 1990s as a Netscape extension, and persisting despite widespread belief that it was annoying. New versions of Firefox and other Gecko-based browsers no longer flash text that is enclosed in this element, as well as in various CSS rules suggesting blinking or flashing.

Software

Viewers

Validators

Conversions to/from HTML

Test suites

Historical information

Other resources

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox