[talk]

What comes first on the web
– style or structure?

Håkon Wium Lie

What comes first on the web
– style or structure?

What comes first on the web
– style or structure?

What comes first on the web
– style or structure?

What comes first on the web
style or structure?

What comes first on the web
– style or structure?

The Web

answers.com: The complete set of documents residing on all Internet servers that use the HTTP protocol, accessible to users via a simple point-and-click system.
Wikipedia: The World Wide Web ("WWW" or simply the "Web") is a global information space which people can read and write via computers connected to the Internet.

The web foundation

What comes first on the web
– style or structure?

Structure

<h1>Headline</h1>

Structure

<h1>Headline</h1>

Structure

<body>
   <h1>Headline</h1>
   <p>Paragraph</p>
</body>
    body
    /  \
  h1    p

Structured document

A digital document consisting of hierarchical elements containing text and other content. The elements primarily represent the logical roles of the content rather than the presentation of the content.

What comes first on the web
style or structure?

Style

h1 { font-size: 16px }
p { color: black }

Style sheets

A set of rules that associate stylistic properties and values with structural elements in a document, thereby expressing how to present the document. Style sheets generally do not contain content; are linkable from documents; and are reusable.

Which is more important
– style or structure?

What comes first in time
– style or structure?

Markup languages should be developed in the context of style sheet languages, not the other way around.

Historical analysis

MarkupStyleDifference in time
SGMLFOSI2 years apart
SGMLDSSSL10 years apart
PScontemporary
ScribeScribecontemporary
LaTeXTeX-3 years apart

SGML

Simultaneous development

TeX – Latex

What comes first in time
– style or structure?

Technical analysis

What are the key differences between markup languages and style sheet languages?

MarkupStyle
Processing requirementsparserparser + formatter
Implementation complexitylowhigh
Developersmanyfew

Technical analysis

Microformats

Microformats

When XML was new, CSS was scarce, and the Browser Wars raged, HTML was often cast as a hopeless muddle. Instead, the Web of HTML might have given way to a Web of XML where each publisher used their own tags and their own presentation logic within a new generation of browsers. Now, it happens to be that in 2005 [...] XML seems to have found its niche on the server rather than the client.

In the meantime [...] CSS support matured to the point that authors and designers adopted it broadly. This was the key ecological change that triggered the resurgence of experimentation with plain old HTML.
– Rohit Khare, Tantek Çelik

A book microformat: boom!

<html>
  <div class="titlepage">
    ...
  </div>
  <div class="preface">
    ...
  </div>
  <div class="chapter">
    ...
  </div>
  <div class="chapter">
    ...
  </div>
  <div class="appendix">
    ...
  </div>
</html>

Math markup

nA

AAP
<inf location="pre">subscript</inf>base
ISO12083
<subform>base</subform> 
<inf location="pre">subscript</inf>
MathML
<mmultiscripts><mi>base</mi> 
<mprescripts/><mi>subscript</mi>
<none/></mmultiscripts>
XML MAIDEN
<inf>subscript</inf>base

Advanced prototyping

Summing up

Markup languages should be developed in the context of formatting languages, not the other way around.

Historical analysis

MarkupStyleDifference in time
SGMLFOSI2 years apart
SGMLDSSSL10 years apart
PScontemporary
ScribeScribecontemporary
LaTeXTeX-3 years apart

Historical analysis

MarkupStyleDifference in time
SGMLFOSI2 years apart
SGMLDSSSL10 years apart
PScontemporary
ScribeScribecontemporary
LaTeXTeX-3 years apart
HTMLCSS5 years