5. Wri ng for the web: HTML and XHTML
Dr. Dave Parker
Informa on and the Web, 2014/15
1 Today
• XML/DTDs (and Assm. 1) – brief recap/ques ons
• Wri ng for the web – XHTML vs HTML; XHTML basics
2 XML/DTDs (and Assm. 1)
• XML/DTDs – general ps – use a clear and sensible document structure – follow good principles • don't mix informa on, avoid redundancy, … – think about: • normalisa on, a ributes vs. child elements – think ahead to larger, more complex data sets
• Assessment 1 – don't forget to validate (XML and DTD) – look at the exercises (and their solu ons)
3 Today
• Wri ng for the web – XHTML vs HTML; XHTML basics
• Good prac ces: – structured documents: seman cs, styling – content vs. presenta on – adding metadata
4 HTML & XHTML
• HTML: Hypertext Markup Language – basic language for wri ng web pages/documents – World Wide Web Consor um (W3C) standard – various versions: 1.1 (early 90s), …, 4.01 (1999), 5 (latest)
• XHTML: Extensible HTML – reformula on of HTML 4 in XML (i.e. same elements, a ributes, …) – cleaner, stricter syntax + addi onal rules – goals: extensibility, interoperability with other formats
5 Example: HTML