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

Future Markup

Embed Size (px)

DESCRIPTION

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) - PowerPoint PPT Presentation

Citation preview

Page 1: Future Markup

Future Markup

Steven PembertonCWI, AmsterdamChair, W3C HTML Working Group

Page 2: Future Markup

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

Page 3: Future Markup

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)

Page 4: Future Markup

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 presentationHTML is a structure language again

Page 5: Future Markup

Advantages of CSS

Makes HTML easier to write (and read)You can define a house styleCompatible: you can still see the

content on non-CSS browsersPages are much smallerAccessible to sight-impaired...

Page 6: Future Markup

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!

Page 7: Future Markup

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

Page 8: Future Markup

Enter XML

XML is a W3C effort to simplify SGMLIt is a meta-language, a subset of

SGMLOne of the aims is to allow everyone

to invent their own tagsDTD is optional: a DTD can be

inferred from a document

Page 9: Future Markup

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)

Page 10: Future Markup

Consequences 2

CDATA sections must be marked as such (if they contain “<”, “&” etc.):

<SCRIPT><![CDATA[ ... script content ...]]>

</SCRIPT>

Page 11: Future Markup

By the way: <P> is not like <BR>

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>

Page 12: Future Markup

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>

Page 13: Future Markup

So do we still need HTML?

XML is still a meta-languageThere is still a perceived need for a

base-line mark-upHTML has some useful semantics,

both implied and explicit (search engines gladly use it, for instance)

Page 14: Future Markup

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

subsetAdd any required new functionality

(forms, better event handling, Ruby)

Page 15: Future Markup

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”>

Page 16: Future Markup

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>

Page 17: Future Markup

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>

Page 18: Future Markup

Semantics Differences

Presentation use CSSLinks use Xlink or SchemasForms use CSS?Images etc. use Xlink(Natural) language of elements

use xml:lang attribute

Page 19: Future Markup

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

Page 20: Future Markup

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>

Page 21: Future Markup

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

Page 22: Future Markup

The State of Things

New generation of XML+CSS browsers emerging

Many XML applications appearingMajor companies planning XML as output

(Adobe PDF, MS Office 2000)Now: HTML4 as XML, Conversion softwareThis year: Modules, Subsets, Extensions,

Profiles, New Forms

Page 23: Future Markup

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

Page 24: Future Markup