Web Markup Languages: HTML, XML & CSS (Part 1)

Markup Languages vs Scripts vs Programs

The concept of markup languages is thought to have evolved from editorial instructions added to documentation. Markup is added to describe how information is displayed and laid out. The end-user never sees the markup instructions – as they only exist to alter the way the data is presented.

HTML is perhaps the most well-known example of a markup language, and it uses markup tags to affect how the various components of a web-page are displayed and handled. Markup languages are not programming or scripting languages – they exist purely to annotate data or text and provide processing instructions.

Full programming languages such as C, Java or Visual Basic have an enormous amount of control and allow for a wide variety of programs to be written. These are traditionally 'compiled' languages, where a compiler translates the written lines of code into a faster and more efficient machine code executable file. The file will also be compiled for a specific operating system or environment.

Scripting languages such as PHP, ASP, JavaScript, VBScript, AJAX and PERL are 'interpreted' languages - meaning that they're interpreted real-time, line by line by the server - as it paces through the code. Scripting languages tend to be more focused on a particular subject or area, and many are aimed purely at the web.

Web programs or scripts can be client-side or server-side. Client-side programs run locally – normally from within an HTML page on a browser. JavaScript and AJAX are good examples. Server side programs and scripts can use a variety of languages including PHP, ASP, JSP & PERL.

HTML (HyperText Markup Language)

HTML is the markup language of the web, and forms the basic building blocks of a webpage. It has evolved heavily over the years into a more complex and capable language. HTML version 4 has been around since 1997 with a variety of tweaks and improvements, and version 5 was released as a 'working draft' by the W3C in January 2008.

All HTML specifications and recommendations are governed by the standards body called the World Wide Web Consortium (W3C), whose goal is complete standardisation across all web browsers - although we're still some way off.

HTML files are essentially flat text files that incorporate elements such as tags, and the data they control. An HTML document is made up of two parts: The head and the body. The 'head' contains the definitions of the page and its standards and possibly scripts, and the 'body' contains what you actually see on the web page.

A simple example could be:

<!DOCTYPE html>
      <title>HTML Hello Page</title>
      <p><strong>Hello there</strong> everyone!</p>

...In this example, we've declared the document to be an HTML one and defined the page title (as part of the header) to be 'HTML Hello Page'.

We've then given instructions to output a text paragraph in the main body of the document with 'Hello there' in bold type, and 'everyone' in standard type.

You'll notice that the tags are encased in greater-than and less-than – which is standard syntax for all XML tags (and HTML has now become XML based.) The ending or 'closing' tag has a '/' preceding the tag word – so it’s easy to distinguish between opening and closing tags.

WikiLinks for additional research: http://en.wikipedia.org/wiki/HTML