31.03.2014 Views

Cascading Style Sheets, Level 2 - World Wide Web Consortium

Cascading Style Sheets, Level 2 - World Wide Web Consortium

Cascading Style Sheets, Level 2 - World Wide Web Consortium

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Preceding element<br />

An element A is called a preceding element of an element B, if and only if (1)<br />

A is an ancestor of B or (2) A is a preceding sibling of B.<br />

Following element<br />

An element A is called a following element of an element B, if and only if B is<br />

a preceding element of A.<br />

Author<br />

An author is a person who writes documents and associated style sheets.<br />

An authoring tool generates documents and associated style sheets.<br />

User<br />

A user is a person who interacts with a user agent to view, hear, or otherwise<br />

use a document and its associated style sheet. The user may provide a<br />

personal style sheet that encodes personal preferences.<br />

User agent (UA)<br />

A user agent is any program that interprets a document written in the document<br />

language and applies associated style sheets according to the terms of<br />

this specification. A user agent may display a document, read it aloud, cause<br />

it to be printed, convert it to another format, etc.<br />

Here is an example of a source document encoded in HTML:<br />

<br />

<br />

My home page<br />

<br />

My home page<br />

Welcome to my home page! Let me tell you about my favorite<br />

composers:<br />

<br />

Elvis Costello<br />

Johannes Brahms<br />

Georges Brassens<br />

<br />

<br />

<br />

This results in the following tree:<br />

HTML<br />

HEAD<br />

BODY<br />

TITLE<br />

H1<br />

P<br />

UL<br />

LI LI LI<br />

According to the definition of HTML, HEAD elements will be inferred during<br />

parsing and become part of the document tree even if the HEAD tags are not in<br />

the document source. Similarly, the parser knows where the P and LIs end, even<br />

though there are no and tags in the source.<br />

31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!