Web Science/Part1: Foundations of the web/Web content/HTML for web document structures/script

In the previous lecture we have seen how to structure content using XML. The core idea was that we write down what the content is about, e.g. a record or an artist, and how such content may be structured, e.g. that a record stores something that an artist created. Thus the XML document that we created structured the content in a way that was rather independent of its use. One piece of software may use it to answer database queries. Another piece of software may use it to ship data from one database to another. And, finally our browser may use the structure to display the content. The browser can do so, but the resulting display does not look very nice yet, hence we undertook the effort in the previous lesson to transform the XML document into some HTML document that could be displayed in a much nicer way.

But, how is the resulting HTML document related to XML? Actually, the result is also an XML document. But the result is a document that does not talk about entities like artists, but about entities like headings, lists, list items, emphasized pieces of texts, and so on. Thus, HTML is really a kind of XML subdialect, one also calls it an application of XML, that has standard element names for document structures and not for almost arbitrary content structures.

Minimal HTML document

What are some sample categories are relevant for document structure?
 * headings
 * paragraphs
 * lists
 * emphasizing of text
 * tables

The core idea is that elements define a structure and attributes provide additional information.

This issubscript and superscript

Let's do a table

Some unordered list

 One list item Another list item Yet another list item 

And an ordered, i.e. numbered, list  First list item Second list item</li> <li>Third list item</li> </li> </ol>

You may interactively type the HTML code examples into http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_br and immediately display the result by submitting your HTML code.