1 / 24

Future Markup

Future Markup. Steven Pemberton CWI, Amsterdam Chair, W3C HTML Working Group. HTML as an SGML Application. SGML: an international standard in 1986 It is a Meta-language that describes data formats, using DTD’s (Document Type Definitions)

maia-dorsey
Download Presentation

Future Markup

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Future Markup Steven Pemberton CWI, Amsterdam Chair, W3C HTML Working Group

  2. HTML as an SGML Application • SGML: an international standard in 1986 • It is a Meta-language that describes data formats, using DTD’s (Document Type Definitions) • Describes structure, not presentation<H1>HTML as SGML Application</H1> • Used for HTML in early 1990’s

  3. HTML • Netscape and Microsoft start adding to HTML: mostly presentation-oriented tags (like <BLINK>) • The World Wide Web Consortium (W3C) started effort to: • Keep HTML Pure • Do presentation via Cascading Style Sheets (CSS)

  4. CSS • CSS is a separate language from HTML that allows you to specify how an HTML document, or set of documents, should look • Separates content from presentation • HTML is a structure language again

  5. Advantages of CSS • Makes HTML easier to write (and read) • You can define a house style • Compatible: you can still see the content on non-CSS browsers • Pages are much smaller • Accessible to sight-impaired • ...

  6. By the way... • Check your logs: more than 90% of people browsing now use a CSS-enabled browser • You never need to use the <FONT> and <FONTFACE> elements again!

  7. Documents • HTML was designed for just one sort of document (scientific reports), but is now being used for all sorts of different documents • You could use SGML to define other sorts of document, but SGML is notoriously hard to fully implement

  8. Enter XML • XML is a W3C effort to simplify SGML • It is a meta-language, a subset of SGML • One of the aims is to allow everyone to invent their own tags • DTD is optional: a DTD can be inferred from a document

  9. Consequences • The requirement of being able to infer a DTD from a document has an effect on the languages you can define: • Closing tags are now required<LI>....</LI> <P>....</P> • Empty tags are marked specially <IMG SRC=”pic.gif”/> <BR/> <HR/> (or <HR></HR> etc)

  10. Consequences 2 • CDATA sections must be marked as such (if they contain “<”, “&” etc.): <SCRIPT> <![CDATA[ ... script content ... ]]> </SCRIPT>

  11. Not Like This <H1>XML</H1> An underlying problem with HTML is that ... <P> You could use SGML to define ... But Like This <H1>XML</H1> <P> An underlying problem with HTML is that … </P> <P> You could use SGML to define ...</P> By the way: <P> is not like <BR>

  12. Consequence of XML • Anyone can now design a (Web-delivered) language • CSS makes it viewable <address> <name>Steven Pemberton</name> <company>CWI</company> <street>Kruislaan 413</street> <postcode>1098 SJ</postcode> <city>Amsterdam</city> <speaker/> </address>

  13. So do we still need HTML? • XML is still a meta-language • There is still a perceived need for a base-line mark-up • HTML has some useful semantics, both implied and explicit (search engines gladly use it, for instance)

  14. HTML as XML application • Clean up (get rid of historical flotsam) • Modularise – split into separate parts • Allows other XML applications to use parts • Allows special purpose devices to use subset • Add any required new functionality (forms, better event handling, Ruby)

  15. Differences HTML:XHTML • Because of the difference between SGML and XML, there are some necessary differences, for instance: • Use lower case: <p> not <P> • Attributes are always quoted: <th colspan=”2”> • Anchors use id attribute not name (and not just on <a> by the way):<a id=”index”> <p id=”top”>

  16. Example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>Virtual Library</title></head> <body> <p>Moved to <a href="http://vlib.org/">vlib.org</a>. </p> </body> </html>

  17. Namespaces <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>A Math Example</title></head> <body> <p>The following is MathML markup:</p> <math xmlns="http://www.w3.org/TR/REC-MathML"> <apply><log/><logbase><cn> 3 </cn> </logbase> <ci> x </ci> </apply> </math> </body> </html>

  18. Semantics Differences • Presentation  use CSS • Links  use Xlink or Schemas • Forms  use CSS? • Images etc.  use Xlink • (Natural) language of elements  use xml:lang attribute

  19. Transition • XHTML 1.0 has been carefully designed to make use of ‘quirks’ in existing HTML browsers • Use of a small number of guidelines allows XHTML to be served to HTML browsers

  20. Examples of Guidelines • Use space before / of empty elements: <br /> <hr /> <img src=”foo.gif” /> • Use name= and id= on <a>: <a name= ”index” id= ”index”> … </a>

  21. Conclusions • XML with related technologies gives you the freedom to define and deliver your own document types • HTML is still needed as a base-line markup • The new HTML gives a transition path to the future

  22. The State of Things • New generation of XML+CSS browsers emerging • Many XML applications appearing • Major companies planning XML as output(Adobe PDF, MS Office 2000) • Now: HTML4 as XML, Conversion software • This year: Modules, Subsets, Extensions, Profiles, New Forms

  23. To Find Out More • All XHTML developments are made public at www.w3.org/Markup • Members of W3C can also look at www.w3.org/Markup/Group

More Related