HTML5 and CSS3

<3> HTML Basics </3>


According to Wikipedia, HyperText Markup Language (HTML) is... the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages.

HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> and </h1>, although some tags, known as empty elements, are unpaired, for example <img>. The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tags, comments and other types of text-based content.

HTML is a standard defined by the World Wide Web Consortium (W3C).

Screenshot of The World Wide Web Consortium website

The first publicly available description of HTML was a document called "HTML Tags", first mentioned on the Internet by Berners-Lee in late 1991. From then, the HTML specification has beeing in a continous evolution. Since 1996, the HTML specifications have been maintained, with input from commercial software vendors, by the W3C. Moreover, in 2000, HTML also became an international standard (ISO/IEC 15445:2000).

HTML5 timeline, from 1990 to 2009

HTML 4.01 Specification was published in December 1999. According to this specification:

To publish information for global distribution, one needs a universally understood language, a kind of publishing mother tongue that all computers may potentially understand. The publishing language used by the World Wide Web is HTML (from HyperText Markup Language).

HTML 4.01 offers three variations:

Screenshot of the HTML 4.01 Specification web page

HTML syntax diagram

Here is a simple example of an HTML document extracted from 3 On SGML and HTML:

      <TITLE>My first HTML document</TITLE>
      <P>Hello world!

XHTML 1.0 The Extensible HyperText Markup Language was first published in January 2000, and then revised in August 2002. According to this specification:

This specification defines the Second Edition of XHTML 1.0, a reformulation of HTML 4 as an XML 1.0 application, and three DTDs corresponding to the ones defined by HTML 4. The semantics of the elements and their attributes are defined in the W3C Recommendation for HTML 4. These semantics provide the foundation for future extensibility of XHTML. Compatibility with existing HTML user agents is possible by following a small set of guidelines.

Screenshot of the XHTML 1.0 Specification web page

Here is a simple example of an XHTML document extracted from 3.1.1. Strictly Conforming Documents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
    <title>Virtual Library</title>
    <p>Moved to <a href=""></a>.</p>

Validating a website is the process of ensuring that the pages of the website conform to the standards defined by various organizations, mainly the W3C.

The W3C freely provides the Markup Validation Service.

Screenshot of The World Wide Web Consortium Markup Validator web page

Validation is very important, because it ensures that web pages are interpreted in the same way by different software.