With the number of visual tools available to help you whip up a snazzy webpage in next to no time, you could be forgiven for thinking that you don’t need to know how the underlying code behind every page works. However, the HTML (hypertext markup language) specification was never really pinned down at the beginning of its evolution, and as a result some aspects of it were left largely open to interpretation. Combine that with a time when over-eager browser developers were keen to show that their platform offered more features than the competitors’, and you end up with a bit of a mess. Pages designed for one browser should look the same in another, but you couldn't be sure until you loaded them up.
The W3C (World Wide Web Consortium, www.w3.org) has gone to great lengths to implement HTML standards. By understanding and adhering to current web standards, you can look under the bonnet at the pages you create and make sure they’re correctly formatted and accessible to as wide an audience as possible.Introduction to HTML
The World Wide Web was created by Tim Berners-Lee in 1990, and used the concept of hypertext to link documents together. In order to create pages, Berners-Lee needed a language that could specify how documents linked to one another and also provide rudimentary formatting. He created HTML for this purpose and based it on SGML (standard generalised markup language). Both are text-based standards that use tags to assign meaning to elements of text documents so a computer can make sense of them. An HTML document is simply a text file, but with the file extension HTM or HTML, so the system knows to open it in a browser.
Tags in HTML are enclosed in the characters “<” and “>”, so they can be recognised by the browser. For example, using the tag <em> tells the browser to emphasise the text, usually by rendering it in italics. An end tag, which is signified by placing a forward slash “/” in front of the tag name, tells the browser when to stop applying the effect. So, in order to emphasise a phrase in HTML, the code would simply be:
The quick brown fox <em>jumps over
</em> the lazy dog.
This would result in “jumps over” being shown in italics when the HTML page is opened by the browser and displayed onscreen. Tags can be used to define the structure of text, such as <br>, which specifies a line break. If you were to write the following text, it would be displayed over two lines by the browser, even though it’s written as one:
This is line one<br>This is line two.
Tags can also have attributes that define how they behave. The font tag, for example, allows you to specify how big the text should be and which typeface should be used. For example:
<font size=7 color=”red”>This text is large and red</font>.
Berners-Lee’s original HTML spec covered 22 tags (of which only 13 are still in use today). Interpretation of early HTML was also fairly loose, which helped speed its introduction, but created problems further down the line, as there was no official standard to adhere to.
This was further exacerbated during the browser-war years in the 1990s, as Microsoft and Netscape battled it out to gain (or retain) most users by adding new features. Non-standard tags were added to increase the appeal of one browser over the other, but this resulted in web developers having to create pages for a specific browser rather than pages that worked fully in both.
The first standard version of HTML was published by the IETF (Internet Engineering Task Force) in 1994. The development and implementation of HTML standards was taken over by the W3C in 1996, and the last published version was HTML 4.01 in 1999.
The worlds first ever webpage, created by Tim Berners-Lee when he worked at CERN.