You are on page 1of 106

Web development

Client side technologies


Contents

1 Scripting and layout 1


1.1 HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Markup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.3 Semantic HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.4 Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.1.5 HTML4 variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.1.6 HTML5 variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1.7 Hypertext features not in HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1.8 WYSIWYG editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1.9 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1.10 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.1.11 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2 HTML5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.2.2 Features and APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2.4 Logo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.2.5 Digital rights management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.2.6 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.2.7 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.2.8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.2.9 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.3 JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.3.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.3.2 Trademark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.3.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.3.4 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.3.5 Use in Web pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.3.6 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.3.7 Uses outside Web pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
1.3.8 Development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

i
ii CONTENTS

1.3.9 Benchmark tools for developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30


1.3.10 Version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.3.11 Related languages and features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.3.12 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.3.13 Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.3.14 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4 Cascading Style Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
1.4.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
1.4.3 Browser support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.4.4 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
1.4.5 Resolved limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
1.4.6 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
1.4.7 CSS frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.4.8 CSS authoring methodologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.4.9 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.4.10 Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1.4.11 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

2 AJAX 46
2.1 Dynamic HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.1.1 Uses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.1.2 Structure of a web page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.1.3 Example: Displaying an additional block of text . . . . . . . . . . . . . . . . . . . . . . . 47
2.1.4 Document Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.1.5 Dynamic styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.1.6 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.1.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.1.8 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.2 Ajax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.2.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.2.2 Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.2.3 Drawbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.2.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.2.5 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.2.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.2.7 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.3 Hypertext Transfer Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.3.1 Technical overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.3.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.3.3 HTTP session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.3.4 HTTP authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
CONTENTS iii

2.3.5 Request methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53


2.3.6 Status codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.3.7 Persistent connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.3.8 HTTP session state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.3.9 Encrypted connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.3.10 Message format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.3.11 Similar protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.3.12 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.3.13 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.3.14 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.3.15 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.4 XMLHttpRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.4.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.4.2 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.4.3 HTTP request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.4.4 Cross-domain requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.4.5 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.4.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.4.7 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

3 Data structures 62
3.1 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.1.1 Applications of XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.1.2 Key terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.1.3 Characters and escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.1.4 Well-formedness and error-handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.1.5 Schemas and validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.1.6 Related specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.1.7 Programming interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.1.8 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.1.9 Criticism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.1.10 3dm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.1.11 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.1.12 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.1.13 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.1.14 Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.1.15 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.2 JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.2.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.2.2 Data types, syntax and example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.2.3 Schema and metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.2.4 MIME type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
iv CONTENTS

3.2.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.2.6 Security issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.2.7 Object references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.2.8 Comparison with other formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.2.9 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.2.10 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3.2.11 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3.2.12 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.3 YAML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.3.1 History and name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.3.2 Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.3.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.3.4 Comparison with JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.3.5 Comparison with XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.3.6 Implementation idiosyncrasies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.3.7 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.3.8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.3.9 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

4 Frameworks 85
4.1 Prototype JavaScript Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.1.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.1.2 Sample utility functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.1.3 Object-oriented programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.1.4 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.1.5 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.1.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.1.7 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.1.8 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.2 script.aculo.us . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.2.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4.2.2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
4.2.3 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

5 Text and image sources, contributors, and licenses 89


5.1 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.2 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.3 Content license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Chapter 1

Scripting and layout

1.1 HTML
".htm” and ".html” redirect here. For other uses, see
HTM (disambiguation).

Hypertext Markup Language (HTML) is the standard


markup language for creating web pages and web applica-
tions. With Cascading Style Sheets (CSS) and JavaScript
it forms a triad of cornerstone technologies for the World
Wide Web.[1] Web browsers receive HTML documents
from a webserver or from local storage and render them
into multimedia web pages. HTML describes the struc-
ture of a web page semantically and originally included
cues for the appearance of the document.
HTML elements are the building blocks of HTML pages.
With HTML constructs, images and other objects, such
as interactive forms, may be embedded into the rendered
page. It provides a means to create structured docu- The historic logo made by the W3C
ments by denoting structural semantics for text such as
headings, paragraphs, lists, links, quotes and other items.
HTML elements are delineated by tags, written using
angle brackets. Tags such as <img /> and <input /> in-
troduce content into the page directly. Others such as
<p>...</p> surround and provide information about doc-
ument text and may include other tags as sub-elements.
Browsers do not display the HTML tags, but use them to
interpret the content of the page.
HTML can embed programs written in a scripting lan-
guage such as JavaScript which affect the behavior and
content of web pages. Inclusion of CSS defines the look
and layout of content. The World Wide Web Consor- An example website written in HTML Code
tium (W3C), maintainer of both the HTML and the CSS
standards, has encouraged the use of CSS over explicit
presentational HTML since 1997.[2] based hypertext system.[3] Berners-Lee specified HTML
and wrote the browser and server software in late 1990.
That year, Berners-Lee and CERN data systems engineer
1.1.1 History
Robert Cailliau collaborated on a joint request for fund-
ing, but the project was not formally adopted by CERN.
Development
In his personal notes[4] from 1990 he listed[5] “some of
In 1980, physicist Tim Berners-Lee, a contractor at the many areas in which hypertext is used” and put an
CERN, proposed and prototyped ENQUIRE, a system encyclopedia first.
for CERN researchers to use and share documents. In The first publicly available description of HTML was
1989, Berners-Lee wrote a memo proposing an Internet- a document called “HTML Tags”, first mentioned on

1
2 CHAPTER 1. SCRIPTING AND LAYOUT

tion, the “Hypertext Markup Language (HTML)" Inter-


net Draft by Berners-Lee and Dan Connolly, which in-
cluded an SGML Document Type Definition to define the
grammar.[9][10] The draft expired after six months, but
was notable for its acknowledgment of the NCSA Mo-
saic browser’s custom tag for embedding in-line images,
reflecting the IETF’s philosophy of basing standards on
successful prototypes.[11] Similarly, Dave Raggett's com-
peting Internet-Draft, “HTML+ (Hypertext Markup For-
mat)", from late 1993, suggested standardizing already-
implemented features like tables and fill-out forms.[12]
After the HTML and HTML+ drafts expired in early
1994, the IETF created an HTML Working Group, which
in 1995 completed “HTML 2.0”, the first HTML specifi-
cation intended to be treated as a standard against which
future implementations should be based.[13]
Further development under the auspices of the IETF
was stalled by competing interests. Since 1996, the
HTML specifications have been maintained, with in-
put from commercial software vendors, by the World
Wide Web Consortium (W3C).[14] However, in 2000,
HTML also became an international standard (ISO/IEC
15445:2000). HTML 4.01 was published in late 1999,
with further errata published through 2001. In 2004,
Tim Berners-Lee development began on HTML5 in the Web Hypertext
Application Technology Working Group (WHATWG),
which became a joint deliverable with the W3C in 2008,
the Internet by Tim Berners-Lee in late 1991.[6][7] It and completed and standardized on 28 October 2014.[15]
describes 18 elements comprising the initial, relatively
simple design of HTML. Except for the hyperlink tag,
these were strongly influenced by SGMLguid, an in-house HTML versions timeline
Standard Generalized Markup Language (SGML)-based
documentation format at CERN. Eleven of these ele- November 24, 1995 HTML 2.0 was published as IETF
ments still exist in HTML 4.[8] RFC 1866. Supplemental RFCs added capabilities:

HTML is a markup language that web browsers use to in- • November 25, 1995: RFC 1867 (form-based
terpret and compose text, images, and other material into file upload)
visual or audible web pages. Default characteristics for • May 1996: RFC 1942 (tables)
every item of HTML markup are defined in the browser, • August 1996: RFC 1980 (client-side image
and these characteristics can be altered or enhanced by maps)
the web page designer’s additional use of CSS. Many of
the text elements are found in the 1988 ISO technical • January 1997: RFC 2070
report TR 9537 Techniques for using SGML, which in (internationalization)
turn covers the features of early text formatting languages
[16]
such as that used by the RUNOFF command developed in January 14, 1997 HTML 3.2 was published as a
the early 1960s for the CTSS (Compatible Time-Sharing W3C Recommendation. It was the first version de-
System) operating system: these formatting commands veloped and standardized exclusively by the W3C,
were derived from the commands used by typesetters to as the IETF had closed its HTML Working Group
[17]
manually format documents. However, the SGML con- on September 12, 1996.
cept of generalized markup is based on elements (nested Initially code-named “Wilbur”,[18] HTML 3.2 dropped
annotated ranges with attributes) rather than merely print math formulas entirely, reconciled overlap among
effects, with also the separation of structure and markup; various proprietary extensions and adopted most of
HTML has been progressively moved in this direction Netscape's visual markup tags. Netscape’s blink el-
with CSS. ement and Microsoft's marquee element were omit-
Berners-Lee considered HTML to be an application of ted due to a mutual agreement between the two
SGML. It was formally defined as such by the Internet companies.[14] A markup for mathematical formu-
Engineering Task Force (IETF) with the mid-1993 pub- las similar to that in HTML was not standardized
lication of the first proposal for an HTML specifica- until 14 months later in MathML.
1.1. HTML 3

December 18, 1997 HTML 4.0[19] was published as a


W3C Recommendation. It offers three variations:

• Strict, in which deprecated elements are for-


bidden
• Transitional, in which deprecated elements are
allowed
• Frameset, in which mostly only frame related
elements are allowed.

Initially code-named “Cougar”,[18] HTML 4.0 adopted


many browser-specific element types and attributes,
but at the same time sought to phase out Netscape’s
visual markup features by marking them as
deprecated in favor of style sheets. HTML 4 is
an SGML application conforming to ISO 8879 –
SGML.[20]

April 24, 1998 HTML 4.0[21] was reissued with minor


edits without incrementing the version number. Logo of HTML5

December 24, 1999 HTML 4.01[22] was published as a [34]


W3C Recommendation. It offers the same three June 1993 Hypertext Markup Language was pub-
variations as HTML 4.0 and its last errata were pub- lished by the IETF IIIR Working Group as an Inter-
lished on May 12, 2001. net Draft (a rough proposal for a standard). It was
replaced by a second version[35] one month later,
May 2000 ISO/IEC 15445:2000[23][24] ("ISO HTML”, followed by six further drafts published by IETF
based on HTML 4.01 Strict) was published as itself[36] that finally led to HTML 2.0 in RFC 1866.
an ISO/IEC international standard. In the ISO
this standard falls in the domain of the ISO/IEC November 1993 HTML+ was published by the IETF as
JTC1/SC34 (ISO/IEC Joint Technical Committee an Internet Draft and was a competing proposal to
1, Subcommittee 34 – Document description and the Hypertext Markup Language draft. It expired in
processing languages).[23] May 1994.

After HTML 4.01, there was no new version of HTML April 1995 (authored March 1995) HTML 3.0[37]
for many years as development of the parallel, was proposed as a standard to the IETF, but the
XML-based language XHTML occupied the W3C’s proposal expired five months later (28 September
HTML Working Group through the early and mid- 1995)[38] without further action. It included many
2000s. of the capabilities that were in Raggett’s HTML+
proposal, such as support for tables, text flow around
October 28, 2014 HTML5[25] was published as a W3C figures and the display of complex mathematical
Recommendation.[26] formulas.[38]
November 1, 2016 HTML 5.1[27] was published as a W3C began development of its own Arena browser
W3C Recommendation.[28][29] as a test bed for HTML 3 and Cascading Style
Sheets,[39][40][41] but HTML 3.0 did not succeed for
several reasons. The draft was considered very large
HTML draft version timeline
at 150 pages and the pace of browser development,
as well as the number of interested parties, had out-
October 1991 HTML Tags,[6] an informal CERN docu- stripped the resources of the IETF.[14] Browser ven-
ment listing 18 HTML tags, was first mentioned in dors, including Microsoft and Netscape at the time,
public. chose to implement different subsets of HTML 3’s
June 1992 First informal draft of the HTML DTD,[30] draft features as well as to introduce their own exten-
with seven[31][32][33] subsequent revisions (July 15, sions to it.[14] (see Browser wars). These included
August 6, August 18, November 17, November 19, extensions to control stylistic aspects of documents,
November 20, November 22) contrary to the “belief [of the academic engineer-
ing community] that such things as text color, back-
November 1992 HTML DTD 1.1 (the first with a ver- ground texture, font size and font face were defi-
sion number, based on RCS revisions, which start nitely outside the scope of a language when their
with 1.1 rather than 1.0), an informal draft[33] only intent was to specify how a document would be
4 CHAPTER 1. SCRIPTING AND LAYOUT

organized.”[14] Dave Raggett, who has been a W3C • XHTML 1.0 was published as a W3C Recommen-
Fellow for many years, has commented for example: dation on January 26, 2000[53] and was later revised
“To a certain extent, Microsoft built its business on and republished on August 1, 2002. It offers the
the Web by extending HTML features.”[14] same three variations as HTML 4.0 and 4.01, refor-
mulated in XML, with minor restrictions.
January 2008 HTML5 was published as a Working
Draft by the W3C.[42]
• XHTML 1.1[54] was published as a W3C Rec-
Although its syntax closely resembles that of SGML, ommendation on May 31, 2001. It is based on
HTML5 has abandoned any attempt to be an SGML XHTML 1.0 Strict, but includes minor changes,
application and has explicitly defined its own “html” can be customized, and is reformulated using mod-
serialization, in addition to an alternative XML- ules in the W3C recommendation “Modularization
based XHTML5 serialization.[43] of XHTML”, which was published on April 10,
2001.[55]
2011 HTML5 – Last Call On 14 February 2011, the
W3C extended the charter of its HTML Working
Group with clear milestones for HTML5. In May • XHTML 2.0 was a working draft, work on it was
2011, the working group advanced HTML5 to “Last abandoned in 2009 in favor of work on HTML5 and
Call”, an invitation to communities inside and out- XHTML5.[56][57][58] XHTML 2.0 was incompatible
side W3C to confirm the technical soundness of the with XHTML 1.x and, therefore, would be more ac-
specification. The W3C developed a comprehen- curately characterized as an XHTML-inspired new
sive test suite to achieve broad interoperability for language than an update to XHTML 1.x.
the full specification by 2014, which was the target
date for recommendation.[44] In January 2011, the • An XHTML syntax, known as “XHTML5.1”, is
WHATWG renamed its “HTML5” living standard being defined alongside HTML5 in the HTML5
to “HTML”. The W3C nevertheless continues its draft.[59]
project to release HTML5.[45]

2012 HTML5 – Candidate Recommendation In July


2012, WHATWG and W3C decided on a degree of 1.1.2 Markup
separation. W3C will continue the HTML5 specifi-
cation work, focusing on a single definitive standard, HTML markup consists of several key components, in-
which is considered as a “snapshot” by WHATWG. cluding those called tags (and their attributes), character-
The WHATWG organization will continue its work based data types, character references and entity refer-
with HTML5 as a “Living Standard”. The con- ences. HTML tags most commonly come in pairs like
cept of a living standard is that it is never complete <h1> and </h1>, although some represent empty elements
and is always being updated and improved. New and so are unpaired, for example <img>. The first tag in
features can be added but functionality will not be such a pair is the start tag, and the second is the end tag
removed.[46] (they are also called opening tags and closing tags).
In December 2012, W3C designated HTML5 as a Another important component is the HTML document
Candidate Recommendation.[47] The criterion type declaration, which triggers standards mode render-
for advancement to W3C Recommendation is ing.
“two 100% complete and fully interoperable
The following is an example of the classic Hello
implementations”.[48][49]
world program, a common test employed for comparing
programming languages, scripting languages and markup
2014 HTML5 – Proposed Recommendation and Recommendation
In September 2014, W3C moved HTML5 to Pro- languages. This example is made using 9 lines of code:
posed Recommendation.[50] <!DOCTYPE html> <html> <head> <title>This is
a title</title> </head> <body> <p>Hello world!</p>
On 28 October 2014, HTML5 was released as a stable </body> </html>
W3C Recommendation,[51] meaning the specifica-
tion process is complete.[52]
(The text between <html> and </html> describes the web
page, and the text between <body> and </body> is the
XHTML versions Main article: XHTML visible page content. The markup text "<title>This is a ti-
tle</title>" defines the browser page title.)
XHTML is a separate language that began as a reformula- The Document Type Declaration <!DOCTYPE html> is
tion of HTML 4.01 using XML 1.0. It is no longer being for HTML5. If a declaration is not included, various
developed as a separate standard. browsers will revert to "quirks mode" for rendering.[60]
1.1. HTML 5

Elements <h5>Heading level 5</h5> <h6>Heading level 6</h6>

Main article: HTML element Paragraphs:


<p>Paragraph 1</p> <p>Paragraph 2</p>
HTML documents imply a structure of nested HTML el-
ements. These are indicated in the document by HTML
tags, enclosed in angle brackets thus: <p>[61] Line breaks:<br>. The difference between <br> and <p>
is that “br” breaks a line without altering the semantic
In the simple, general case, the extent of an element is structure of the page, whereas “p” sections the page into
indicated by a pair of tags: a “start tag” <p> and “end tag” paragraphs. Note also that “br” is an empty element in
</p>. The text content of the element, if any, is placed that, although it may have attributes, it can take no content
between these tags. and it may not have an end tag.
Tags may also enclose further tag markup between the <p>This <br> is a paragraph <br> with <br> line
start and end, including a mixture of tags and text. This breaks</p>
indicates further (nested) elements, as children of the par-
ent element.
This is a link in HTML. To create a link the <a> tag is
The start tag may also include attributes within the tag. used. The href= attribute holds the URL address of the
These indicate other information, such as identifiers for link.
sections within the document, identifiers used to bind
style information to the presentation of the document, <a href="https://www.wikipedia.org/">A link to
and for some tags such as the <img> used to embed im- Wikipedia!</a>
ages, the reference to the image resource.
Some elements, such as the line break <br>, do not permit Comments:
any embedded content, either text or further tags. These <!-- This is a comment -->
require only a single empty tag (akin to a start tag) and do
not use an end tag.
Comments can help in the understanding of the markup
Many tags, particularly the closing end tag for the very and do not display in the webpage.
commonly used paragraph element <p>, are optional. An
There are several types of markup elements used in
HTML browser or other agent can infer the closure for the
HTML:
end of an element from the context and the structural rules
defined by the HTML standard. These rules are complex
and not widely understood by most HTML coders. Structural markup indicates the purpose of text
For example, <h2>Golf</h2> establishes “Golf”
The general form of an HTML element as a second-level heading. Structural markup does
is therefore: <tag attribute1="value1” at- not denote any specific rendering, but most web
tribute2="value2">''content''</tag>. Some HTML browsers have default styles for element formatting.
elements are defined as empty elements and take the form Content may be further styled using Cascading
<tag attribute1="value1” attribute2="value2">. Empty Style Sheets (CSS).[62]
elements may enclose no content, for instance, the <br>
tag or the inline <img> tag. The name of an HTML Presentational markup indicates the appearance of
element is the name used in the tags. Note that the end the text, regardless of its purpose
For example, <b>boldface</b> indicates that visual
tag’s name is preceded by a slash character, "/", and that
output devices should render “boldface” in bold
in empty elements the end tag is neither required nor
text, but gives little indication what devices that
allowed. If attributes are not mentioned, default values
are unable to do this (such as aural devices that
are used in each case.
read the text aloud) should do. In the case of both
<b>bold</b> and <i>italic</i>, there are other
elements that may have equivalent visual render-
Element examples Header of the HTML document: ings but that are more semantic in nature, such as
<head>...</head>. The title is included in the head, for <strong>strong text</strong> and <em>emphasised
example: text</em> respectively. It is easier to see how an
<head> <title>The Title</title> </head> aural user agent should interpret the latter two
elements. However, they are not equivalent to their
presentational counterparts: it would be undesirable
Headings: HTML headings are defined with the <h1> to for a screen-reader to emphasize the name of a
<h6> tags: book, for instance, but on a screen such a name
<h1>Heading level 1</h1> <h2>Heading level 2</h2> would be italicized. Most presentational markup
<h3>Heading level 3</h3> <h4>Heading level 4</h4> elements have become deprecated under the HTML
6 CHAPTER 1. SCRIPTING AND LAYOUT

4.0 specification in favor of using CSS for styling. • An author may use the style attribute to assign pre-
sentational properties to a particular element. It is
Hypertext markup makes parts of a document into considered better practice to use an element’s id or
links to other documents class attributes to select the element from within a
An anchor element creates a hyperlink in the doc-
stylesheet, though sometimes this can be too cum-
ument and its href attribute sets the link’s target
bersome for a simple, specific, or ad hoc styling.
URL. For example, the HTML markup, <a
href="http://www.google.com/">Wikipedia</a>, • The title attribute is used to attach subtextual expla-
will render the word "Wikipedia" as a hyperlink. nation to an element. In most browsers this attribute
To render an image as a hyperlink, an “img” is displayed as a tooltip.
element is inserted as content into the “a” el-
ement. Like “br”, “img” is an empty element • The lang attribute identifies the natural language
with attributes but no content or closing tag. <a of the element’s contents, which may be different
href="http://example.org"><img src="image.gif” from that of the rest of the document. For example,
alt="descriptive text” width="50” height="50” in an English-language document:
border="0"></a>. <p>Oh well, <span lang="fr">c'est la vie</span>,
as they say in France.</p>

Attributes Main article: HTML attribute


The abbreviation element, abbr, can be used to demon-
Most of the attributes of an element are name-value pairs, strate some of these attributes :
separated by "=" and written within the start tag of an <abbr id="anId” class="jargon” style="color:purple;"
element after the element’s name. The value may be en- title="Hypertext Markup Language">HTML</abbr>
closed in single or double quotes, although values consist-
ing of certain characters can be left unquoted in HTML
(but not XHTML) .[63][64] Leaving attribute values un- This example displays as HTML; in most browsers, point-
quoted is considered unsafe.[65] In contrast with name- ing the cursor at the abbreviation should display the title
value pair attributes, there are some attributes that af- text “Hypertext Markup Language.”
fect the element simply by their presence in the start tag Most elements take the language-related attribute dir to
of the element,[6] like the ismap attribute for the img specify text direction, such as with “rtl” for right-to-left
element.[66] text in, for example, Arabic, Persian or Hebrew.[67]
There are several common attributes that may appear in
many elements :
Character and entity references

• The id attribute provides a document-wide unique See also: List of XML and HTML character entity
identifier for an element. This is used to identify references and Unicode and HTML
the element so that stylesheets can alter its presen-
tational properties, and scripts may alter, animate
As of version 4.0, HTML defines a set of 252 character
or delete its contents or presentation. Appended to
entity references and a set of 1,114,050 numeric charac-
the URL of the page, it provides a globally unique
ter references, both of which allow individual characters
identifier for the element, typically a sub-section
to be written via simple markup, rather than literally. A
of the page. For example, the ID “Attributes” in
literal character and its markup counterpart are consid-
http://en.wikipedia.org/wiki/HTML#Attributes
ered equivalent and are rendered identically.
• The class attribute provides a way of classifying The ability to “escape” characters in this way allows for
similar elements. This can be used for semantic the characters < and & (when written as &lt; and &amp;,
or presentation purposes. For example, an HTML respectively) to be interpreted as character data, rather
document might semantically use the designation than markup. For example, a literal < normally indicates
class="notation” to indicate that all elements with the start of a tag, and & normally indicates the start of
this class value are subordinate to the main text of a character entity reference or numeric character refer-
the document. In presentation, such elements might ence; writing it as &amp; or &#x26; or &#38; allows &
be gathered together and presented as footnotes on to be included in the content of an element or in the value
a page instead of appearing in the place where they of an attribute. The double-quote character ("), when not
occur in the HTML source. Class attributes are used used to quote an attribute value, must also be escaped as
semantically in microformats. Multiple class values &quot; or &#x22; or &#34; when it appears within the at-
may be specified; for example class="notation im- tribute value itself. Equivalently, the single-quote charac-
portant” puts the element into both the “notation” ter ('), when not used to quote an attribute value, must also
and the “important” classes. be escaped as &#x27; or &#39; (or as &apos; in HTML5
1.1. HTML 7

or XHTML documents[68][69] ) when it appears within the


attribute value itself. If document authors overlook the This declaration references the DTD for the “strict” ver-
need to escape such characters, some browsers can be sion of HTML 4.01. SGML-based validators read the
very forgiving and try to use context to guess their in- DTD in order to properly parse the document and to per-
tent. The result is still invalid markup, which makes the form validation. In modern browsers, a valid doctype ac-
document less accessible to other browsers and to other tivates standards mode as opposed to quirks mode.
user agents that may try to parse the document for search
and indexing purposes for example. In addition, HTML 4.01 provides Transitional and
Frameset DTDs, as explained below. Transitional type
Escaping also allows for characters that are not eas- is the most inclusive, incorporating current tags as well as
ily typed, or that are not available in the document’s older or “deprecated” tags, with the Strict DTD exclud-
character encoding, to be represented within element and ing deprecated tags. Frameset has all tags necessary to
attribute content. For example, the acute-accented e (é), make frames on a page along with the tags included in
a character typically found only on Western European transitional type.
and South American keyboards, can be written in any
HTML document as the entity reference &eacute; or as
the numeric references &#xE9; or &#233;, using charac-
1.1.3 Semantic HTML
ters that are available on all keyboards and are supported
in all character encodings. Unicode character encodings
Main article: Semantic HTML
such as UTF-8 are compatible with all modern browsers
and allow direct access to almost all the characters of the
world’s writing systems.[70] Semantic HTML is a way of writing HTML that empha-
sizes the meaning of the encoded information over its pre-
sentation (look). HTML has included semantic markup
Data types from its inception,[72] but has also included presentational
markup, such as <font>, <i> and <center> tags. There are
HTML defines several data types for element content, also the semantically neutral span and div tags. Since the
such as script data and stylesheet data, and a plethora of late 1990s when Cascading Style Sheets were beginning
types for attribute values, including IDs, names, URIs, to work in most browsers, web authors have been encour-
numbers, units of length, languages, media descriptors, aged to avoid the use of presentational HTML markup
colors, character encodings, dates and times, and so on. with a view to the separation of presentation and con-
[73]
All of these data types are specializations of character tent.
data. In a 2001 discussion of the Semantic Web, Tim Berners-
Lee and others gave examples of ways in which intelli-
gent software “agents” may one day automatically crawl
Document type declaration the web and find, filter and correlate previously unrelated,
published facts for the benefit of human users.[74] Such
HTML documents are required to start with a Document agents are not commonplace even now, but some of the
Type Declaration (informally, a “doctype”). In browsers, ideas of Web 2.0, mashups and price comparison web-
the doctype helps to define the rendering mode— sites may be coming close. The main difference between
particularly whether to use quirks mode. these web application hybrids and Berners-Lee’s seman-
The original purpose of the doctype was to enable pars- tic agents lies in the fact that the current aggregation and
ing and validation of HTML documents by SGML tools hybridization of information is usually designed in by web
based on the Document Type Definition (DTD). The developers, who already know the web locations and the
DTD to which the DOCTYPE refers contains a machine- API semantics of the specific data they wish to mash,
readable grammar specifying the permitted and prohib- compare and combine.
ited content for a document conforming to such a DTD.
An important type of web agent that does crawl and
Browsers, on the other hand, do not implement HTML as
read web pages automatically, without prior knowledge
an application of SGML and by consequence do not read
of what it might find, is the web crawler or search-engine
the DTD. spider. These software agents are dependent on the se-
HTML5 does not define a DTD; therefore, in HTML5 the mantic clarity of web pages they find as they use various
doctype declaration is simpler and shorter:[71] techniques and algorithms to read and index millions of
web pages a day and provide web users with search fa-
<!DOCTYPE html> cilities without which the World Wide Web’s usefulness
would be greatly reduced.
An example of an HTML 4 doctype In order for search-engine spiders to be able to rate the
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML significance of pieces of text they find in HTML doc-
4.01//EN” "http://www.w3.org/TR/html4/strict.dtd"> uments, and also for those creating mashups and other
8 CHAPTER 1. SCRIPTING AND LAYOUT

hybrids as well as for more automated agents as they are Most graphical email clients allow the use of a subset
developed, the semantic structures that exist in HTML of HTML (often ill-defined) to provide formatting and
need to be widely and uniformly applied to bring out the semantic markup not available with plain text. This may
meaning of published text.[75] include typographic information like coloured headings,
Presentational markup tags are deprecated in current emphasized and quoted text, inline images and diagrams.
HTML and XHTML recommendations and are illegal in Many such clients include both a GUI editor for compos-
HTML5. ing HTML e-mail messages and a rendering engine for
displaying them. Use of HTML in e-mail is criticized by
Good semantic HTML also improves the accessibility some because of compatibility issues, because it can help
of web documents (see also Web Content Accessibility disguise phishing attacks, because of accessibility issues
Guidelines). For example, when a screen reader or audio for blind or visually impaired people, because it can con-
browser can correctly ascertain the structure of a docu- fuse spam filters and because the message size is larger
ment, it will not waste the visually impaired user’s time than plain text.
by reading out repeated or irrelevant information when it
has been marked up correctly.
Naming conventions

1.1.4 Delivery The most common filename extension for files contain-
ing HTML is .html. A common abbreviation of this is
.htm, which originated because some early operating sys-
HTML documents can be delivered by the same means
tems and file systems, such as DOS and the limitations
as any other computer file. However, they are most often
imposed by FAT data structure, limited file extensions to
delivered either by HTTP from a web server or by email.
three letters.[79]

HTTP HTML Application

Main article: Hypertext Transfer Protocol Main article: HTML Application

The World Wide Web is composed primarily of HTML An HTML Application (HTA; file extension ".hta”) is a
documents transmitted from web servers to web browsers Microsoft Windows application that uses HTML and Dy-
using the Hypertext Transfer Protocol (HTTP). However, namic HTML in a browser to provide the application’s
HTTP is used to serve images, sound, and other content, graphical interface. A regular HTML file is confined to
in addition to HTML. To allow the web browser to know the security model of the web browser’s security, commu-
how to handle each document it receives, other informa- nicating only to web servers and manipulating only web-
tion is transmitted along with the document. This meta page objects and site cookies. An HTA runs as a fully
data usually includes the MIME type (e.g. text/html or trusted application and therefore has more privileges, like
application/xhtml+xml) and the character encoding (see creation/editing/removal of files and Windows Registry
Character encoding in HTML). entries. Because they operate outside the browser’s se-
In modern browsers, the MIME type that is sent with the curity model, HTAs cannot be executed via HTTP, but
HTML document may affect how the document is ini- must be downloaded (just like an EXE file) and executed
tially interpreted. A document sent with the XHTML from local file system.
MIME type is expected to be well-formed XML; syntax
errors may cause the browser to fail to render it. The
same document sent with the HTML MIME type might
1.1.5 HTML4 variations
be displayed successfully, since some browsers are more
Since its inception, HTML and its associated protocols
lenient with HTML.
gained acceptance relatively quickly. However, no clear
The W3C recommendations state that XHTML 1.0 doc- standards existed in the early years of the language.
uments that follow guidelines set forth in the recommen- Though its creators originally conceived of HTML as
dation’s Appendix C may be labeled with either MIME a semantic language devoid of presentation details,[80]
Type.[76] XHTML 1.1 also states that XHTML 1.1 doc- practical uses pushed many presentational elements and
uments should[77] be labeled with either MIME type.[78] attributes into the language, driven largely by the vari-
ous browser vendors. The latest standards surrounding
HTML reflect efforts to overcome the sometimes chaotic
HTML e-mail development of the language[81] and to create a ratio-
nal foundation for building both meaningful and well-
Main article: HTML email presented documents. To return HTML to its role as a se-
mantic language, the W3C has developed style languages
1.1. HTML 9

such as CSS and XSL to shoulder the burden of presenta- XHTML 1.0 to HTML 4.01. (see DTD section for
tion. In conjunction, the HTML specification has slowly further explanation).
reined in the presentational elements.
There are two axes differentiating various variations of 4. If present, remove the XML declaration. (Typ-
HTML as currently specified: SGML-based HTML ver- ically this is: <?xml version="1.0” encoding="utf-
sus XML-based HTML (referred to as XHTML) on one 8"?>).
axis, and strict versus transitional (loose) versus frameset
on the other axis. 5. Ensure that the document’s MIME type is set
to text/html. For both HTML and XHTML, this
comes from the HTTP Content-Type header sent by
SGML-based versus XML-based HTML the server.

One difference in the latest HTML specifications lies 6. Change the XML empty-element syntax to an
in the distinction between the SGML-based specifica- HTML style empty element (<br /> to <br>).
tion and the XML-based specification. The XML-based
specification is usually called XHTML to distinguish it
Those are the main changes necessary to translate a doc-
clearly from the more traditional definition. However,
the root element name continues to be “html” even in the ument from XHTML 1.0 to HTML 4.01. To translate
from HTML to XHTML would also require the addition
XHTML-specified HTML. The W3C intended XHTML
1.0 to be identical to HTML 4.01 except where limi- of any omitted opening or closing tags. Whether coding
in HTML or XHTML it may just be best to always in-
tations of XML over the more complex SGML require
workarounds. Because XHTML and HTML are closely clude the optional tags within an HTML document rather
than remembering which tags can be omitted.
related, they are sometimes documented in parallel. In
such circumstances, some authors conflate the two names A well-formed XHTML document adheres to all the syn-
as (X)HTML or X(HTML). tax requirements of XML. A valid document adheres to
the content specification for XHTML, which describes
Like HTML 4.01, XHTML 1.0 has three sub-
the document structure.
specifications: strict, transitional and frameset.
The W3C recommends several conventions to ensure an
Aside from the different opening declarations for a doc-
easy migration between HTML and XHTML (see HTML
ument, the differences between an HTML 4.01 and
Compatibility Guidelines). The following steps can be
XHTML 1.0 document—in each of the corresponding
DTDs—are largely syntactic. The underlying syntax of applied to XHTML 1.0 documents only:
HTML allows many shortcuts that XHTML does not,
such as elements with optional opening or closing tags, • Include both xml:lang and lang attributes on any el-
and even empty elements which must not have an end ements assigning language.
tag. By contrast, XHTML requires all elements to have an
opening tag and a closing tag. XHTML, however, also in- • Use the empty-element syntax only for elements
troduces a new shortcut: an XHTML tag may be opened specified as empty in HTML.
and closed within the same tag, by including a slash before
the end of the tag like this: <br/>. The introduction of • Include an extra space in empty-element tags: for
this shorthand, which is not used in the SGML declaration example <br /> instead of <br>.
for HTML 4.01, may confuse earlier software unfamiliar
with this new convention. A fix for this is to include a • Include explicit close tags for elements that per-
space before closing the tag, as such: <br />.[82] mit content but are left empty (for example,
To understand the subtle differences between HTML and <div></div>, not <div />).
XHTML, consider the transformation of a valid and well-
formed XHTML 1.0 document that adheres to Appendix • Omit the XML declaration.
C (see below) into a valid HTML 4.01 document. To
make this translation requires the following steps: By carefully following the W3C’s compatibility guide-
lines, a user agent should be able to interpret the docu-
1. The language for an element should be specified ment equally as HTML or XHTML. For documents that
with a lang attribute rather than the XHTML are XHTML 1.0 and have been made compatible in this
xml:lang attribute. XHTML uses XML’s built in way, the W3C permits them to be served either as HTML
language-defining functionality attribute. (with a text/html MIME type), or as XHTML (with an
2. Remove the XML namespace (xmlns=URI). application/xhtml+xml or application/xml MIME type).
HTML has no facilities for namespaces. When delivered as XHTML, browsers should use an
XML parser, which adheres strictly to the XML speci-
3. Change the document type declaration from fications for parsing the document’s contents.
10 CHAPTER 1. SCRIPTING AND LAYOUT

Transitional versus strict • nowrap (Obsolete), bgcolor (Deprecated. use


CSS instead.), width, height on td and th ele-
HTML 4 defined three different versions of the language: ments
Strict, Transitional (once called Loose) and Frameset.
• bgcolor (Deprecated. use CSS instead.) at-
The Strict version is intended for new documents and
tribute on tr element
is considered best practice, while the Transitional and
Frameset versions were developed to make it easier to • clear (Obsolete) attribute on br element
transition documents that conformed to older HTML
• compact attribute on dl, dir and menu elements
specification or didn't conform to any specification to a
version of HTML 4. The Transitional and Frameset ver- • type (Deprecated. use CSS instead.), com-
sions allow for presentational markup, which is omitted pact (Deprecated. use CSS instead.) and start
in the Strict version. Instead, cascading style sheets are (Deprecated. use CSS instead.) attributes on
encouraged to improve the presentation of HTML docu- ol and ul elements
ments. Because XHTML 1 only defines an XML syntax
for the language defined by HTML 4, the same differ- • type and value attributes on li element
ences apply to XHTML 1 as well. • width attribute on pre element
The Transitional version allows the following parts of the
vocabulary, which are not included in the Strict version: • Additional elements in Transitional specification

• A looser content model • menu (Deprecated. use CSS instead.) list


(no substitute, though unordered list is recom-
• Inline elements and plain text are allowed di- mended)
rectly in: body, blockquote, form, noscript and
noframes • dir (Deprecated. use CSS instead.) list (no
substitute, though unordered list is recom-
• Presentation related elements mended)
• underline (u)(Deprecated. can confuse a visi- • isindex (Deprecated.) (element requires
tor with a hyperlink.) server-side support and is typically added to
• strike-through (s) documents server-side, form and input ele-
ments can be used as a substitute)
• center (Deprecated. use CSS instead.)
• font (Deprecated. use CSS instead.) • applet (Deprecated. use the object element in-
• basefont (Deprecated. use CSS instead.) stead.)

• Presentation related attributes • The language (Obsolete) attribute on script ele-


ment (redundant with the type attribute).
• background (Deprecated. use CSS instead.)
and bgcolor (Deprecated. use CSS instead.)
• Frame related entities
attributes for body (required element accord-
ing to the W3C.) element.
• iframe
• align (Deprecated. use CSS instead.) at-
tribute on div, form, paragraph (p) and head- • noframes
ing (h1...h6) elements • target (Deprecated in the map, link and form
• align (Deprecated. use CSS instead.), noshade elements.) attribute on a, client-side image-
(Deprecated. use CSS instead.), size (Depre- map (map), link, form and base elements
cated. use CSS instead.) and width (Depre-
cated. use CSS instead.) attributes on hr ele-
ment The Frameset version includes everything in the Transi-
tional version, as well as the frameset element (used in-
• align (Deprecated. use CSS instead.), border, stead of body) and the frame element.
vspace and hspace attributes on img and ob-
ject (caution: the object element is only sup-
ported in Internet Explorer (from the major
Frameset versus transitional
browsers)) elements
• align (Deprecated. use CSS instead.) attribute In addition to the above transitional differences, the
on legend and caption elements frameset specifications (whether XHTML 1.0 or HTML
• align (Deprecated. use CSS instead.) and bg- 4.01) specify a different content model, with frameset re-
color (Deprecated. use CSS instead.) on table placing body, that contains either frame elements, or op-
element tionally noframes with a body.
1.1. HTML 11

Summary of specification versions versions of HTML have been ignored by most popular
web browsers until recently, such as the link element and
As this list demonstrates, the loose versions of the specifi- in-browser Web page editing.
cation are maintained for legacy support. However, con-
Sometimes Web services or browser manufacturers rem-
trary to popular misconceptions, the move to XHTML
edy these shortcomings. For instance, wikis and content
does not imply a removal of this legacy support. Rather
management systems allow surfers to edit the Web pages
the X in XML stands for extensible and the W3C is
they visit.
modularizing the entire specification and opening it up
to independent extensions. The primary achievement
in the move from XHTML 1.0 to XHTML 1.1 is the 1.1.8 WYSIWYG editors
modularization of the entire specification. The strict
version of HTML is deployed in XHTML 1.1 through There are some WYSIWYG editors (What You See Is
a set of modular extensions to the base XHTML 1.1 What You Get), in which the user lays out everything as it
specification. Likewise, someone looking for the loose is to appear in the HTML document using a graphical user
(transitional) or frameset specifications will find simi- interface (GUI), often similar to word processors. The
lar extended XHTML 1.1 support (much of it is con- editor renders the document rather than show the code,
tained in the legacy or frame modules). The modu- so authors do not require extensive knowledge of HTML.
larization also allows for separate features to develop
The WYSIWYG editing model has been criticized,[86][87]
on their own timetable. So for example, XHTML 1.1
primarily because of the low quality of the gener-
will allow quicker migration to emerging XML standards
ated code; there are voices advocating a change to the
such as MathML (a presentational and semantic math
WYSIWYM model (What You See Is What You Mean).
language based on XML) and XForms—a new highly
advanced web-form technology to replace the existing WYSIWYG editors remain a controversial topic because
HTML forms. of their perceived flaws such as:
In summary, the HTML 4 specification primarily reined
• Relying mainly on layout as opposed to meaning, of-
in all the various HTML implementations into a single
ten using markup that does not convey the intended
clearly written specification based on SGML. XHTML
meaning but simply copies the layout.[88]
1.0, ported this specification, as is, to the new XML de-
fined specification. Next, XHTML 1.1 takes advantage • Often producing extremely verbose and redundant
of the extensible nature of XML and modularizes the code that fails to make use of the cascading nature
whole specification. XHTML 2.0 was intended to be the of HTML and CSS.
first step in adding new features to the specification in a
standards-body-based approach. • Often producing ungrammatical markup, called tag
soup or semantically incorrect markup (such as
<em> for italics).
1.1.6 HTML5 variations • As a great deal of the information in HTML docu-
ments is not in the layout, the model has been criti-
WHATWG HTML versus HTML5 cized for its “what you see is all you get"-nature.[89]

Main article: HTML5


1.1.9 See also
The WHATWG considers their work as living standard
• Breadcrumb (navigation)
HTML for what constitutes the state of the art in ma-
jor browser implementations by Apple (Safari), Google • Comparison of HTML parsers
(Chrome), Mozilla (Firefox), Opera (Opera), and others.
• Dynamic web page
HTML5 is specified by the HTML Working Group of
the W3C following the W3C process. As of 2013 both • HTML decimal character rendering
specifications are similar and mostly derived from each
other, i.e., the work on HTML5 started with an older • List of document markup languages
WHATWG draft, and later the WHATWG living stan- • List of XML and HTML character entity references
dard was based on HTML5 drafts in 2011.[83][84]
• Microdata (HTML)
• Microformat
1.1.7 Hypertext features not in HTML
• Polyglot HTML
HTML lacks some of the features found in earlier hy-
• Semantic HTML
pertext systems, such as source tracking, fat links and
others.[85] Even some hypertext features that were in early • W3C (X)HTML Validator
12 CHAPTER 1. SCRIPTING AND LAYOUT

1.1.10 References [13] Berners-Lee, Tim; Connelly, Daniel (November 1995).


“RFC 1866 – Hypertext Markup Language – 2.0”. Inter-
[1] Flanagan, David. JavaScript - The definitive guide (6 ed.). net Engineering Task Force. Retrieved 1 December 2010.
p. 1. JavaScript is part of the triad of technologies that This document thus defines an HTML 2.0 (to distinguish
all Web developers must learn: HTML to specify the con- it from the previous informal specifications). Future (gen-
tent of web pages, CSS to specify the presentation of web erally upwardly compatible) versions of HTML with new
pages, and JavaScript to specify the behaviour of web features will be released with higher version numbers.
pages.
[14] Raggett, Dave (1998). Raggett on HTML 4. Retrieved July
[2] “HTML 4.0 Specification — W3C Recommendation 9, 2007.
— Conformance: requirements and recommendations”.
World Wide Web Consortium. December 18, 1997. Re- [15] “HTML5 – Hypertext Markup Language – 5.0”. Internet
trieved July 6, 2015. Engineering Task Force. 28 October 2014. Retrieved 25
November 2014. This document recommends HTML 5.0
[3] Tim Berners-Lee, “Information Management: A Pro- after completion.
posal.” CERN (March 1989, May 1990). W3.org
[16] “HTML 3.2 Reference Specification”. World Wide Web
[4] Tim Berners-Lee, “Design Issues” Consortium. January 14, 1997. Retrieved November 16,
2008.
[5] Tim Berners-Lee, “Design Issues”
[17] “IETF HTML WG”. Retrieved June 16, 2007. Note: This
[6] “Tags used in HTML”. World Wide Web Consortium. working group is closed
November 3, 1992. Retrieved November 16, 2008.
[18] Arnoud Engelfriet. “Introduction to Wilbur”. Web De-
[7] “First mention of HTML Tags on the www-talk mailing sign Group. Retrieved June 16, 2007.
list”. World Wide Web Consortium. October 29, 1991.
Retrieved April 8, 2007. [19] “HTML 4.0 Specification”. World Wide Web Consor-
tium. December 18, 1997. Retrieved November 16,
[8] “Index of elements in HTML 4”. World Wide Web Con- 2008.
sortium. December 24, 1999. Retrieved April 8, 2007.
[20] “HTML 4 – 4 Conformance: requirements and recom-
[9] Tim Berners-Lee (December 9, 1991). “Re: mendations”. Retrieved December 30, 2009.
SGML/HTML docs, X Browser (archived www-
talk mailing list post)". Retrieved June 16, 2007. SGML [21] “HTML 4.0 Specification”. World Wide Web Consor-
is very general. HTML is a specific application of the tium. April 24, 1998. Retrieved November 16, 2008.
SGML basic syntax applied to hypertext documents with
simple structure. [22] “HTML 4.01 Specification”. World Wide Web Consor-
tium. December 24, 1999. Retrieved November 16,
[10] Berners-Lee, Tim; Connolly, Daniel (June 1993). 2008.
“Hypertext Markup Language (HTML): A Representa-
tion of Textual Information and MetaInformation for Re- [23] ISO (2000). “ISO/IEC 15445:2000 – Information tech-
trieval and Interchange”. w3.org. Retrieved 2017-01-04. nology – Document description and processing languages
– HyperText Markup Language (HTML)". Retrieved De-
[11] Raymond, Eric. “IETF and the RFC Standards Process”. cember 26, 2009.
The Art of Unix Programming. In IETF tradition, stan-
dards have to arise from experience with a working proto- [24] Cs.Tcd.Ie. Cs.Tcd.Ie (2000-05-15). Retrieved on 2012-
type implementation — but once they become standards, 02-16.
code that does not conform to them is considered broken
and mercilessly scrapped. ...Internet-Drafts are not spec- [25] “HTML5: A vocabulary and associated APIs for HTML
ifications; software implementers and vendors are specif- and XHTML”. World Wide Web Consortium. 28 Octo-
ically barred from claiming compliance with them as if ber 2014. Retrieved 31 October 2014.
they were specifications. Internet-Drafts are focal points [26] “Open Web Platform Milestone Achieved with HTML5
for discussion, usually in a working group... Once an Recommendation” (Press release). World Wide Web
Internet-Draft has been published with an RFC number, Consortium. 28 October 2014. Retrieved 31 October
it is a specification to which implementers may claim con- 2014.
formance. It is expected that the authors of the RFC and
the community at large will begin correcting the specifi- [27] “HTML 5.1”. World Wide Web Consortium. 1 Novem-
cation with field experience. ber 2016. Retrieved 6 January 2017.
[12] “HTML+ Internet-Draft — Abstract”. Browser writers [28] “HTML 5.1 is a W3C Recommendation”. World Wide
are experimenting with extensions to HTML and it is now Web Consortium. 1 November 2016. Retrieved 6 January
appropriate to draw these ideas together into a revised 2017.
document format. The new format is designed to allow a
gradual roll over from HTML, adding features like tables, [29] Philippe le Hegaret (17 November 2016). “HTML 5.1 is
captioned figures and fill-out forms for querying remote the gold standard”. World Wide Web Consortium. Re-
databases or mailing questionnaires. trieved 6 January 2017.
1.1. HTML 13

[30] Connolly, Daniel (6 June 1992). “MIME as a hypertext [49] “HTML5: A vocabulary and associated APIs for HTML
architecture”. CERN. Retrieved 24 October 2010. and XHTML (Editor’s Draft).”. World Wide Web Con-
sortium. Retrieved 12 April 2010.
[31] Connolly, Daniel (15 July 1992). “HTML DTD en-
closed”. CERN. Retrieved 24 October 2010. [50] “Call for Review: HTML5 Proposed Recommendation
Published W3C News”. W3.org. 2014-09-16. Retrieved
[32] Connolly, Daniel (18 August 1992). “document type dec- 2014-09-27.
laration subset for Hyper Text Markup Language as de-
fined by the World Wide Web project”. CERN. Retrieved [51] “Open Web Platform Milestone Achieved with HTML5
24 October 2010. Recommendation”. W3C. 28 October 2014. Retrieved
29 October 2014.
[33] Connolly, Daniel (24 November 1992). “Document Type
Definition for the Hyper Text Markup Language as used [52] “HTML5 specification finalized, squabbling over specs
by the World Wide Web application”. CERN. Retrieved continues”. Ars Technica. 2014-10-29. Retrieved 2014-
24 October 2010. See section “Revision History” 10-29.
[34] Berners-Lee, Tim; Connolly, Daniel (June 1993). “Hyper [53] “XHTML 1.0: The Extensible HyperText Markup Lan-
Text Markup Language (HTML) Internet Draft version guage (Second Edition)". World Wide Web Consortium.
1.1”. IETF IIIR Working Group. Retrieved 18 September January 26, 2000. Retrieved November 16, 2008.
2010.
[54] “XHTML 1.1 – Module-based XHTML — Second Edi-
[35] Berners-Lee, Tim; Connolly, Daniel (June 1993). tion”. World Wide Web Consortium. February 16, 2007.
“Hypertext Markup Language (HTML) Internet Draft Retrieved November 16, 2008.
version 1.2”. IETF IIIR Working Group. Retrieved 18
September 2010. [55] “Modularization of XHTML”. www.w3.org. Retrieved
2017-01-04.
[36] Berners-Lee, Tim; Connolly, Daniel (28 November
1994). “HyperText Markup Language Specification – [56] “XHTM 2.0”. World Wide Web Consortium. July 26,
2.0 INTERNET DRAFT”. IETF. Retrieved 24 October 2006. Retrieved November 16, 2008.
2010.
[57] “XHTML 2 Working Group Expected to Stop Work End
[37] “HTML 3.0 Draft (Expired!) Materials”. World Wide of 2009, W3C to Increase Resources on HTML5”. World
Web Consortium. December 21, 1995. Retrieved Wide Web Consortium. July 17, 2009. Retrieved Novem-
November 16, 2008. ber 16, 2008.
[38] “HyperText Markup Language Specification Version 3.0”. [58] “W3C XHTML FAQ”.
Retrieved June 16, 2007.
[59] “HTML5”. W3C. 19 October 2013.
[39] Raggett, Dave (28 March 1995). “HyperText Markup
Language Specification Version 3.0”. HTML 3.0 Internet [60] Activating Browser Modes with Doctype. Hsivonen.iki.fi.
Draft Expires in six months. World Wide Web Consor- Retrieved on 2012-02-16.
tium. Retrieved 17 June 2010.
[61] “HTML Elements”. w3schools. Retrieved 16 March
[40] Bowers, Neil. “Weblint: Just Another Perl Hack”. 2015.
[41] Lie, Håkon Wium; Bos, Bert (April 1997). Cascading [62] “CSS Introduction”. W3schools. Retrieved 16 March
style sheets: designing for the Web. Addison Wesley Long- 2015.
man. p. 263. Retrieved 9 June 2010.
[63] “On SGML and HTML”. World Wide Web Consortium.
[42] “HTML5”. World Wide Web Consortium. June 10, Retrieved November 16, 2008.
2008. Retrieved November 16, 2008.
[64] “XHTML 1.0 – Differences with HTML 4”. World Wide
[43] “HTML5, one vocabulary, two serializations”. Retrieved
Web Consortium. Retrieved November 16, 2008.
February 25, 2009.
[65] Korpela, Jukka (July 6, 1998). “Why attribute values
[44] “W3C Confirms May 2011 for HTML5 Last Call, Targets
should always be quoted in HTML”. Cs.tut.fi. Retrieved
2014 for HTML5 Standard”. World Wide Web Consor-
November 16, 2008.
tium. 14 February 2011. Retrieved 18 February 2011.
[66] “Objects, Images, and Applets in HTML documents”.
[45] Hickson, Ian. “HTML Is the New HTML5”. Retrieved
World Wide Web Consortium. December 24, 1999. Re-
21 January 2011.
trieved November 16, 2008.
[46] “HTML5 gets the splits.”. netmagazine.com. Retrieved
23 July 2012. [67] “H56: Using the dir attribute on an inline element to re-
solve problems with nested directional runs”. Techniques
[47] “HTML5”. W3.org. 2012-12-17. Retrieved 2013-06-15. for WCAG 2.0. W3C. Retrieved 18 September 2010.

[48] “When Will HTML5 Be Finished?". FAQ. WHAT Work- [68] “Character Entity Reference Chart”. World Wide Web
ing Group. Retrieved 29 November 2009. Consortium. October 24, 2012.
14 CHAPTER 1. SCRIPTING AND LAYOUT

[69] “The Named Character Reference &apos;". World Wide [84] “HTML5 — Smile, it’s a Snapshot!". W3C Blog. 2012-
Web Consortium. January 26, 2000. 12-17. Retrieved 2013-01-14.

[70] “The Unicode Standard: A Technical Introduction”. Re- [85] Jakob Nielsen (January 3, 2005). “Reviving Advanced
trieved 2010-03-16. Hypertext”. Retrieved June 16, 2007.

[71] “HTML: The Markup Language (an HTML language ref- [86] Sauer, C.: WYSIWIKI – Questioning WYSIWYG in the
erence)". Retrieved 2013-08-19. Internet Age. In: Wikimania (2006)

[72] Berners-Lee, Tim; Fischetti, Mark (2000). Weaving the [87] Spiesser, J., Kitchen, L.: Optimization of HTML auto-
Web: The Original Design and Ultimate Destiny of the matically generated by WYSIWYG programs. In: 13th
World Wide Web by Its Inventor. San Francisco: Harper. International Conference on World Wide Web, pp. 355—
ISBN 978-0-06-251587-2. 364. WWW '04. ACM, New York, NY (New York, NY,
U.S., May 17–20, 2004)
[73] Raggett, Dave (2002). “Adding a touch of style”. W3C.
Retrieved October 2, 2009. This article notes that pre- [88] XHTML Reference: blockquote. Xhtml.com. Retrieved
sentational HTML markup may be useful when targeting on 2012-02-16.
browsers “before Netscape 4.0 and Internet Explorer 4.0”.
See the list of web browsers to confirm that these were [89] Doug Engelbart’s INVISIBLE REVOLUTION . Invisi-
both released in 1997. blerevolution.net. Retrieved on 2012-02-16.

[74] Tim Berners-Lee, James Hendler and Ora Lassila (2001).


“The Semantic Web”. Scientific American. Retrieved 1.1.11 External links
October 2, 2009.
• HTML at DMOZ
[75] Nigel Shadbolt, Wendy Hall and Tim Berners-Lee (2006).
“The Semantic Web Revisited” (PDF). IEEE Intelligent • WHATWG's HTML Living Standard
Systems. Retrieved October 2, 2009.
• W3C's HTML 5.1, the upcoming version of HTML
[76] “XHTML 1.0 The Extensible HyperText Markup Lan-
guage (Second Edition)". World Wide Web Consor- • W3C's HTML5, the most recent finished specifica-
tium. 2002 [2000]. Retrieved December 7, 2008. tion (28 October 2014)
XHTML Documents which follow the guidelines set forth
in Appendix C, “HTML Compatibility Guidelines” may • Dave Raggett’s Introduction to HTML
be labeled with the Internet Media Type “text/html”
[RFC2854], as they are compatible with most HTML • Tim Berners-Lee Gives the Web a New Definition
browsers. Those documents, and any other document
conforming to this specification, may also be labeled with
the Internet Media Type “application/xhtml+xml” as de-
fined in [RFC3236]. 1.2 HTML5
[77] “RFC 2119: Key words for use in RFCs to Indicate Re-
HTML5[lower-alpha 1] is a markup language used for struc-
quirement Levels”. Harvard University. 1997. Retrieved
turing and presenting content on the World Wide Web. It
December 7, 2008. 3. SHOULD This word, or the ad-
jective “RECOMMENDED”, mean that there may exist is the fifth and current version of the HTML standard.
valid reasons in particular circumstances to ignore a par- It was published in October 2014 by the World Wide Web
ticular item, but the full implications must be understood Consortium (W3C)[2][4] to improve the language with
and carefully weighed before choosing a different course. support for the latest multimedia, while keeping it both
[78] “XHTML 1.1 – Module-based XHTML — Second Edi- easily readable by humans and consistently understood
tion”. World Wide Web Consortium. 2007. Retrieved by computers and devices such as web browsers, parsers,
December 7, 2008. XHTML 1.1 documents SHOULD etc. HTML5 is intended to subsume not only HTML 4,
be labeled with the Internet Media Type text/html as de- but also XHTML 1 and DOM Level 2 HTML.[5]
fined in [RFC2854] or application/xhtml+xml as defined
HTML5 includes detailed processing models to encour-
in [RFC3236].
age more interoperable implementations; it extends, im-
[79] “Naming Files, Paths, and Namespaces”. Microsoft. Re- proves and rationalizes the markup available for docu-
trieved 16 March 2015. ments, and introduces markup and application program-
ming interfaces (APIs) for complex web applications.[6]
[80] HTML Design Constraints, W3C Archives For the same reasons, HTML5 is also a candidate for
[81] WWW:BTB – HTML, Pris Sears cross-platform mobile applications, because it includes
features designed with low-powered devices in mind.
[82] Freeman, E (2005). Head First HTML. O'Reilly.
Many new syntactic features are included. To natively
[83] Hickson, Ian (2011-01-19). “HTML is the new HTML5”. include and handle multimedia and graphical content,
The WHATWG blog. Retrieved 2013-01-14. the new <video>, <audio> and <canvas> elements were
1.2. HTML5 15

added, and support for scalable vector graphics (SVG) issued a public letter titled "Thoughts on Flash" where
content and MathML for mathematical formulas. To he concluded that “Flash is no longer necessary to watch
enrich the semantic content of documents, new page video or consume any kind of web content” and that
structure elements such as <main>, <section>, <article>,“new open standards created in the mobile era, such as
<header>, <footer>, <aside>, <nav> and <figure>, are HTML5, will win”.[20] This sparked a debate in web de-
added. New attributes are introduced, some elements and velopment circles suggesting that, while HTML5 pro-
attributes have been removed, and others such as <a>, vides enhanced functionality, developers must consider
<cite> and <menu> have been changed, redefined or stan- the varying browser support of the different parts of the
dardized. standard as well as other functionality differences be-
[21]
The APIs and Document Object Model (DOM) are now tween HTML5 and Flash. In early November 2011,
[6] Adobe announced that it would discontinue development
fundamental parts of the HTML5 specification and
HTML5 also better defines the processing for any invalid of Flash for mobile devices and reorient its efforts in de-
[7] veloping tools using HTML5.[22]
documents.

1.2.1 History Last Call, Candidate and Recommendation


The Web Hypertext Application Technology Working
Group (WHATWG) began work on the new standard in On 14 February 2011, the W3C extended the charter
2004. At that time, HTML 4.01 had not been updated of its HTML Working Group with clear milestones for
since 2000,[8] and the World Wide Web Consortium HTML5. In May 2011, the working group advanced
(W3C) was focusing future developments on XHTML HTML5 to “Last Call”, an invitation to communities in-
2.0. In 2009, the W3C allowed the XHTML 2.0 Working side and outside W3C to confirm the technical sound-
Group’s charter to expire and decided not to renew it.[9] ness of the specification. The W3C developed a com-
W3C and WHATWG are currently working together on prehensive test suite to achieve broad interoperability
the development of HTML5.[9] for the full specification by 2014, which was the tar-
get date for recommendation.[23] In January 2011, the
The Mozilla Foundation and Opera Software presented WHATWG renamed its “HTML5” living standard to
a position paper at a World Wide Web Consortium “HTML”. The W3C nevertheless continued its project
(W3C) workshop in June 2004,[10] focusing on develop- to release HTML5.[24]
ing technologies that are backward compatible with exist-
In July 2012, WHATWG and W3C decided on a de-
ing browsers,[11] including an initial draft specification of
Web Forms 2.0. The workshop concluded with a vote— gree of separation. W3C will continue the HTML5
specification work, focusing on a single definitive stan-
8 for, 14 against—for continuing work on HTML.[12]
Immediately after the workshop, the Web Hypertext dard, which is considered as a “snapshot” by WHATWG.
Application Technology Working Group (WHATWG) The WHATWG organization will continue its work with
was formed to start work based upon that position pa- HTML5 as a “Living Standard”. The concept of a living
per, and a second draft, Web Applications 1.0, was standard is that it is never complete and is always being
also announced.[13] The two specifications were later updated and improved. New features [25]
can be added but
merged to form HTML5. [14]
The HTML5 specification functionality will not be removed.
was adopted as the starting point of the work of the new In December 2012, W3C designated HTML5 as a Can-
HTML working group of the W3C in 2007. didate Recommendation.[26] The criterion for advance-
WHATWG published the First Public Working Draft of ment to W3C Recommendation is “two 100% [27][28]
complete
the specification on 22 January 2008.[15] and fully interoperable implementations”.
On 16 September 2014, W3C moved HTML5 to Pro-
posed Recommendation.[29]
“Thoughts on Flash”
On 28 October 2014, HTML5 was released as a sta-
While some features of HTML5 are often compared to ble W3C Recommendation,[30] bringing the specification
Adobe Flash, the two technologies are very different. process to completion.[2]
Both include features for playing audio and video within On 1 November 2016, HTML5.1 was released as a stable
web pages, and for using Scalable Vector Graphics. How- W3C Recommendation.[31]
ever, HTML5 on its own cannot be used for animation
or interactivity – it must be supplemented with CSS3
or JavaScript. There are many Flash capabilities that
have no direct counterpart in HTML5. See Comparison Timeline
of HTML5 and Flash. HTML5’s interactive capabili-
ties became a topic of mainstream media around April The combined timelines for HTML 5.0, HTML 5.1 and
2010[16][17][18][19] after Apple Inc's then-CEO Steve Jobs HTML 5.2:
16 CHAPTER 1. SCRIPTING AND LAYOUT

1.2.2 Features and APIs There is also a renewed emphasis on the importance of
DOM scripting (e.g., JavaScript) in Web behavior.
The W3C proposed a greater reliance on modularity as
The HTML5 syntax is no longer based on SGML[40][41]
a key part of the plan to make faster progress, meaning
despite the similarity of its markup. It has, however,
identifying specific features, either proposed or already
been designed to be backward compatible with common
existing in the spec, and advancing them as separate spec-
parsing of older versions of HTML. It comes with a
ifications. Some technologies that were originally defined
new introductory line that looks like an SGML document
in HTML5 itself are now defined in separate specifica-
type declaration, <!DOCTYPE html>, which triggers the
tions:
standards-compliant rendering mode.[42] Since 5 January
2009, HTML5 also includes Web Forms 2.0, a previously
• HTML Working Group – HTML Canvas 2D Con- separate WHATWG specification.[43][44]
text;
• Web Apps Working Group – Web Messaging, Web New APIs
Workers, Web Storage, WebSocket, Server-sent
events, Web Components[33] (this was not part of
HTML5 though); Note that the Web Applications
Working Group was closed in October 2015 and its
deliverables transferred to the Web Platform Work-
ing Group (WPWG).
• IETF HyBi Working Group – WebSocket Protocol;
• WebRTC Working Group – WebRTC;
• Web Media Text Tracks Community Group –
WebVTT.

After the standardization of the HTML5 specification in


October 2014,[34] the core vocabulary and features are
being extended in four ways.[35] Likewise, some features HTML5 related APIs[45]
that were removed from the original HTML5 specifica-
tion have been standardized separately as modules, such In addition to specifying markup, HTML5 specifies
as Microdata and Canvas. Technical specifications intro- scripting application programming interfaces (APIs) that
duced as HTML5 extensions such as Polyglot Markup can be used with JavaScript.[46] Existing document ob-
have also been standardized as modules. Some W3C ject model (DOM) interfaces are extended and de facto
specifications that were originally separate specifications features documented. There are also new APIs, such as:
have been adapted as HTML5 extensions or features,
such as SVG. Some features that might have slowed down • Canvas;[47]
the standardization of HTML5 will be standardized as
upcoming specifications, instead. HTML 5.1 is expected • Timed Media Playback;[48]
to be finalized in 2016, and it is currently on the standard-
• Offline;[49]
ization track at the W3C.
• Editable content;[50]
1.2.3 Features • Drag-and-drop;[51]

Markup • History;[52]

HTML5 introduces elements and attributes that reflect • MIME type and protocol handler registration;[53][54]
typical usage on modern websites. Some of them are se- • Microdata;[55]
mantic replacements for common uses of generic block
(<div>) and inline (<span>) elements, for example <nav> • Web Messaging;[56]
(website navigation block), <footer> (usually referring
to bottom of web page or to last lines of HTML code), • Web Storage – a key-value pair storage framework
or <audio> and <video> instead of <object>. [36][37][38] that provides behaviour similar to cookies but with
Some deprecated elements from HTML 4.01 have been larger storage capacity and improved API.[57]
dropped, including purely presentational elements such
as <font> and <center>, whose effects have long been su- Not all of the above technologies are included in the
perseded by the more capable Cascading Style Sheets.[39] W3C HTML5 specification, though they are in the
1.2. HTML5 17

WHATWG HTML specification.[58] Some related tech- Popularity


nologies, which are not part of either the W3C HTML5
or the WHATWG HTML specification, are as follows. According to a report released on 30 September 2011, 34
The W3C publishes specifications for these separately: of the world’s top 100 Web sites were using HTML5 – the
adoption led by search engines and social networks.[73]
• Geolocation; Another report released in August 2013 has shown that
153 of the Fortune 500 U.S. companies implemented
• Web SQL Database – a local SQL Database (no
[59] HTML5 on their corporate websites.[74]
longer maintained);
Since 2014, HTML5 is at least partially supported by
• IndexedDB – an indexed hierarchical key-value
most popular layout engines.
store (formerly WebSimpleDB);[60]
• File[61] – an API intended to handle file uploads and
Differences from HTML 4.01 and XHTML 1.x
file manipulation;[62]
• Directories and System – an API intended to sat- The following is a cursory list of differences and some
isfy client-side-storage use cases not well served by specific examples.
databases;[63]
• File Writer – an API for writing to files from web • New parsing rules: oriented towards flexible parsing
applications;[64] and compatibility; not based on SGML

• Web Audio[65] – a high-level JavaScript API for pro- • Ability to use inline SVG and MathML in text/html
cessing and synthesizing audio in web applications;
• New elements: article, aside, audio, bdi, canvas,
• ClassList.[66] command, data, datalist, details, embed, figcaption,
figure, footer, header, keygen, mark, meter, nav,
• Web Cryptography[67]
output, progress, rp, rt, ruby, section, source, sum-
• WebRTC[68] mary, time, track, video, wbr

HTML5 cannot provide animation within web pages. Ad- • New types of form controls: dates and times, email,
ditional JavaScript or CSS3 functionality is necessary for url, search, number, range, tel, color[75]
animating HTML elements. Animation is also possible • New attributes: charset (on meta), async (on script)
using JavaScript and HTML 4[69] , and within SVG el-
ements through SMIL, although browser support of the • Global attributes (that can be applied for every el-
latter remains uneven as of 2011. ement): id, tabindex, hidden, data-* (custom data
attributes)
XHTML5 (XML-serialized HTML5) • Deprecated elements will be dropped altogether:
acronym, applet, basefont, big, center, dir, font,
XML documents must be served with an XML Internet frame, frameset, isindex, noframes, strike, tt
media type (often called “MIME type”) such as appli-
cation/xhtml+xml or application/xml,[70] and must con- dev.w3.org provides the latest Editors Draft of “HTML5
form to strict, well-formed syntax of XML. XHTML5 differences from HTML 4”,[76] which provides a com-
is simply XML-serialized HTML5 data (e.g. not hav- plete outline of additions, removals and changes between
ing any unclosed tags), sent with one of XML media HTML5 and HTML 4.
types. HTML that has been written to conform to both
the HTML and XHTML specifications – and which will
therefore produce the same DOM tree whether parsed as 1.2.4 Logo
HTML or XML – is called polyglot markup.[71]
On 18 January 2011, the W3C introduced a logo to repre-
sent the use of or interest in HTML5. Unlike other badges
Error handling
previously issued by the W3C, it does not imply validity
HTML5 is designed so that old browsers can safely ignore or conformance to a[77] certain standard. As of 1 April 2011,
[6]
new HTML5 constructs. In contrast to HTML 4.01, the this logo is official.
HTML5 specification gives detailed rules for lexing and When initially presenting it to the public, the W3C an-
parsing, with the intent that compliant browsers will pro- nounced the HTML5 logo as a “general-purpose visual
duce the same results when parsing incorrect syntax.[72] identity for a broad set of open web technologies, in-
Although HTML5 now defines a consistent behavior for cluding HTML5, CSS, SVG, WOFF, and others”.[78]
"tag soup" documents, those documents are not regarded Some web standard advocates, including The Web Stan-
as conforming to the HTML5 standard.[72] dards Project, criticized that definition of “HTML5” as
18 CHAPTER 1. SCRIPTING AND LAYOUT

would remain open source but ship with a sandbox de-


signed to run a content decryption module developed by
Adobe.[96] While promising to “work on alternative solu-
tions”, Mozilla’s Executive Chair Mitchell Baker stated
that a refusal to implement EME would have accom-
plished little more than convincing many users to switch
browsers.[97] This decision was condemned by Cory Doc-
torow and the Free Software Foundation.[98][99]

1.2.6 See also


• Cache manifest in HTML5

• Comparison of layout engines (HTML5)

• HTML5 in mobile devices

• Polyglot HTML5
The W3C HTML5 logo

1.2.7 Notes
an umbrella term, pointing out the blurring of terminol-
[1] In the W3C recommendation, there is no space between
ogy and the potential for miscommunication.[78] Three
“HTML” and “5” in the name.[3]
days later, the W3C responded to community feedback
and changed the logo’s definition, dropping the enumera-
tion of related technologies.[79] The W3C then said the 1.2.8 References
logo “represents HTML5, the cornerstone for modern
Web applications”.[77] [1] “Mac Developer Library: System-Declared Uniform
Type Identifiers”. Apple. 2009-11-17.

[2] “HTML5 specification finalized, squabbling over specs


1.2.5 Digital rights management continues”. Ars Technica. 2014-10-29. Retrieved 2014-
10-29.
Industry players including the BBC, Google, Microsoft,
and Netflix have been lobbying for the inclusion of [3] “A vocabulary and associated APIs for HTML and
Encrypted Media Extensions (EME),[80][81][82][83][84] a XHTML”. 28 October 2014.
form of digital rights management (DRM), into the
[4] “HTML5 is a W3C recommendation”. W3C Blog. 28
HTML5 standard. As of the end of 2012 and
October 2014. Retrieved 28 October 2014.
the beginning of 2013, 27 organisations[85] including
the Free Software Foundation[86] have started a cam- [5] “HTML5 Differences from HTML4”. Working Draft.
paign against including digital rights management in the World Wide Web Consortium. 5 April 2011. Introduc-
HTML5 standard.[87][88] However, in late September tion. Retrieved 2011-04-30. HTML 4 became a W3C
2013, the W3C HTML Working Group decided that Recommendation in 1997. While it continues to serve as
Encrypted Media Extensions, a form of DRM, was “in a rough guide to many of the core features of HTML, it
scope” and will potentially be included in the HTML does not provide enough information to build implemen-
tations that interoperate with each other and, more impor-
5.1 standard.[89][90] WHATWG's “HTML Living Stan-
tantly, with a critical mass of deployed content. The same
dard” continued to be developed without DRM-enabled
goes for XHTML1, which defines an XML serialization
proposals.[90] for HTML4, and DOM Level 2 HTML, which defines
Manu Sporny, a member of the W3C, said that EME will JavaScript APIs for both HTML and XHTML. HTML5
not solve the problem it’s supposed to address.[91] Oppo- will replace these documents.
nents point out that EME itself is just an architecture for
[6] “HTML5 Differences from HTML4”. World Wide Web
a DRM plug-in mechanism.[92] Consortium. 19 October 2010. Retrieved 4 December
The initial enablers for DRM in HTML5 were Google[93] 2010.
and Microsoft.[94] Supporters also include Adobe.[95] On
[7] “1.9.2 Syntax Errors”. HTML5. 16 November 2010. Re-
14 May 2014, Mozilla announced plans to support EME
trieved 4 December 2010.
in Firefox, the last major browser to avoid DRM.[96][97]
Calling it “a difficult and uncomfortable step”, Andreas [8] “HTML 4 Errata”. World Wide Web Consortium. Re-
Gal of Mozilla explained that future versions of Firefox trieved 4 December 2010.
1.2. HTML5 19

[9] “Frequently Asked Questions (FAQ) About the Future of [30] “Open Web Platform Milestone Achieved with HTML5
XHTML”. World Wide Web Consortium. Retrieved 4 Recommendation”. W3C. 28 October 2014. Retrieved
December 2010. 29 October 2014.

[10] “Position Paper for the W3C Workshop on Web Appli- [31] “HTML 5.1 becomes W3C Recommendation”. www.w3.
cations and Compound Documents”. World Wide Web org. Retrieved 26 February 2017.
Consortium. Retrieved 30 December 2011.
[32] “Plan 2014”. World Wide Web Consortium. Retrieved
[11] “W3C Workshop on Web Applications and Compound 23 September 2012.
Documents (Day 1) Jun 1, 2004”. World Wide Web Con-
sortium. Retrieved 30 December 2011. [33] https://www.w3.org/2008/webapps/wiki/PubStatus

[12] “W3C Workshop on Web Applications and Compound [34] “HTML5, A Vocabulary and Associated APIs for HTML
Documents (Day 2) Jun 2, 2004”. World Wide Web Con- and XHTML”. Retrieved 10 March 2015.
sortium. Retrieved 30 December 2011.
[35] Leslie Sikos. “HTML5 Became a Standard, HTML 5.1
[13] "[whatwg] WHAT open mailing list announcement”. and HTML 5.2 on the Way”. Retrieved 10 March 2015.
lists.w3.org Mailing Lists. Retrieved 8 December 2015.
[36] Introduction to HTML5 video
[14] “This Week in HTML 5 – Episode 5”. WHATWG Blog.
[37] IBM Developer Works New elements in HTML5: Struc-
Retrieved 30 December 2011.
ture and semantics
[15] “HTML5: A vocabulary and associated APIs for HTML
[38] ICAMD.org Finalcut Silverlight Films that Videographers
and XHTML.”. World Wide Web Consortium. Retrieved
share Quicktime in a Flash : Video on the Web using
28 January 2009.
HTML5 and other Codecs
[16] “FOX News: No Flash on the iPhone? Apple’s Steve Jobs
[39] “11 Obsolete features — HTML5”. W3C. Retrieved
Finally Explains Why”. Fox News. 29 April 2010.
2014-03-11.
[17] “TIME: Steve Jobs: 'Flash is No Longer Necessary' and
[40] HTML5 DTD: “HTML5 is not SGML-based, and there
Other Musings”. Time. 29 April 2010.
will be no official DTD for it.”
[18] “Steve Jobs: Why Apple Banned Flash”. CBS News.
[41] HTML 5 Reference: “Although it is inspired by its SGML
[19] “FastCompany: Steve Jobs: Adobe’s Flash Is Old PC His- origins, in practice, it really only shares minor syntac-
tory, Open Web Is the Future”. tic similarities.” “As HTML5 is no longer formally based
upon SGML, the DOCTYPE no longer serves this pur-
[20] "'Thoughts on Flash', by Steve Jobs, CEO of Apple, Inc”. pose, and thus no longer needs to refer to a DTD.”
Apple.com. Retrieved 2014-01-08.
[42] Shannon Suetos (26 April 2010). “HTML5: Worth the
[21] “Is HTML5 Replacing Flash?". Lyquix.com. Retrieved Hype?". instantshift.com. Retrieved 21 October 2012.
2014-01-08.
[43] “Web Forms 2.0”. 2009-01-05. Retrieved 2014-02-11.
[22] “Flash to Focus on PC Browsing and Mobile Apps; obsolescence notice
Adobe to More Aggressively Contribute to HTML5”.
adobe.com. Retrieved 26 February 2012. [44] “HTML”. whatwg.org.

[23] “W3C Confirms May 2011 for HTML5 Last Call, Targets [45] Sergey Mavrody “Sergey’s HTML5 & CSS3 Quick Ref-
2014 for HTML5 Standard”. World Wide Web Consor- erence. 2nd Edition”. Belisso Corp., 2012. ISBN 978-0-
tium. 14 February 2011. Retrieved 18 February 2011. 9833867-2-8

[24] Hickson, Ian. “HTML Is the New HTML5”. Retrieved [46] “HTML5 Differences from HTML4 – APIs”. World
21 January 2011. Wide Web Consortium.

[25] “HTML5 gets the splits.”. netmagazine.com. Retrieved [47] “Get Started with HTML5 Canvas”. Syntaxxx.
23 July 2012.
[48] “HTML”. whatwg.org.
[26] “HTML5”. W3.org. 2012-12-17. Retrieved 2013-06-15.
[49] “Offline Web Applications”. World Wide Web Consor-
[27] “When Will HTML5 Be Finished?". FAQ. WHAT Work- tium.
ing Group. Retrieved 29 November 2009.
[50] “HTML”. whatwg.org.
[28] “HTML5: A vocabulary and associated APIs for HTML
[51] “HTML”. whatwg.org.
and XHTML (Editor’s Draft).”. World Wide Web Con-
sortium. Retrieved 12 April 2010. [52] “HTML elements, HTML5”. w3.org.
[29] “Call for Review: HTML5 Proposed Recommendation [53] “HTML”. whatwg.org.
Published W3C News”. W3.org. 2014-09-16. Retrieved
2014-09-27. [54] “HTML”. whatwg.org.
20 CHAPTER 1. SCRIPTING AND LAYOUT

[55] “HTML”. whatwg.org. [80] Encrypted Media Extensions draft specification of the
W3C
[56] “HTML5 Web Messaging”. World Wide Web Consor-
tium. [81] Peter Bright (16 April 2013). “Netflix coming to HTML5
just as soon as the DRM ducks are in a row”. Ars Tech-
[57] “Web Storage Specification”. World Wide Web Consor- nica.
tium.
[82] Manu Sporny (26 January 2013). “DRM in HTML5”.
[58] href. “1 Introduction — HTML Standard”. Whatwg.org.
Retrieved 2014-01-08. [83] “Tell W3C: We don't want the Hollyweb”. Free Software
Foundation. May 2013.
[59] “Web SQL Database”. World Wide Web Consortium.
[84] “HTML5 webpage locks 'would stifle innovation'". BBC
[60] “Indexed Database”. World Wide Web Consortium. News Online. 30 May 2013.
[61] “File API”. W3.org. Retrieved 2014-01-08.
[85] “Une coalition de vingt-sept organisations demande au
[62] “File API”. World Wide Web Consortium. W3C de garder les menottes numériques (DRM) hors des
standards du Web”. 2013-04-24. Retrieved 2014-05-14.
[63] “Filesystem API”. World Wide Web Consortium.
[86] Tell W3C: We don't want the Hollyweb http://www.
[64] “File API: Writer”. World Wide Web Consortium. defectivebydesign.org/no-drm-in-html5

[65] “Web Audio API”. Dvcs.w3.org. Retrieved 2014-01-08. [87] Stallman, Richard (2013-05-02). “The W3C’s Soul at
Stake”. The Free Software Foundation. Retrieved 2014-
[66] MDN. “element.classList”. 05-14.
[67] Web Cryptography Candidate Recommendation: https:// [88] Lord, Timothy (2013-04-16). “Netflix Wants to Go
www.w3.org/TR/WebCryptoAPI/ HTML5, but Not Without DRM”. Retrieved 2014-05-
14.
[68] WebRTC Working Draft: https://www.w3.org/TR/
webrtc/ [89] “New Charter for the HTML Working Group from
Philippe Le Hegaret on 2013-09-30 (public-html-
[69] Williamson, James (2010). “What HTML5 is (and what
admin@w3.org from September 2013)". Lists.w3.org.
it isn't)". Retrieved 2014-05-14.
2013-09-30. Retrieved 2014-01-08.
[70] van Kesteren, Anne. “HTML5 differences from HTML4
[90] Danny O'Brien (2013-10-02). “Lowering Your Stan-
– W3C Working Draft 19 October 2010”. World Wide
dards: DRM and the Future of the W3C”. Electronic
Web Consortium. Retrieved 2 November 2010.
Frontier Foundation. Retrieved 2013-10-03.
[71] Graff, Eliot. “Polyglot Markup: HTML-Compatible
XHTML Documents”. W3C. Retrieved 6 July 2013. [91] Manu Sporny (2013-01-26). “DRM in HTML5”. The
Beautiful, Tormented Machine. Manu Sporny. Archived
[72] “FAQ – WHATWG Wiki”. WHATWG. Retrieved 26 Au- from the original on 2014-04-25. Retrieved 2014-05-16.
gust 2011.
[92] Scott Gilbertson (2013-02-12). “DRM for the Web? Say
[73] “Percentage of Web sites Using HTML5”. binvisions. It Ain't So”. Webmonkey. Condé Nast. Archived from
Retrieved 21 October 2011. the original on 2013-04-06. Retrieved 2013-03-21.

[74] "HTML5 Popularity Among Fortune 500 Companies". [93] “Releasenotes for Google Chrome 25.0.1364.87”.
INCORE. Retrieved 5 March 2013.
[94] “HTML5 Video in IE 11 on Windows 8.1”.
[75] “HTML5 form additions”. World Wide Web Consortium.
Retrieved 13 October 2014. [95] Adobe Support for Encrypted Media Extensions
Adobe.com. 19 June 2013.
[76] “HTML5 Differences from HTML4”. FAQ. World Wide
Web Consortium. 14 September 2012. Retrieved 29 [96] Gal, Andreas (2014-05-14). “Reconciling Mozilla’s Mis-
September 2012. sion and W3C EME”. Mozilla. Retrieved 2014-05-20.

[77] “W3C HTML5 Logo FAQ”. World Wide Web Consor- [97] Baker, Mitchell (2014-05-14). “DRM and the Challenge
tium. Retrieved 21 January 2011. Is this W3C’s “official” of Serving Users”. Mozilla. Retrieved 2014-05-20.
logo for HTML5? Yes, as of 1 April 2011.
[98] Doctorow, Cory (2014-05-14). “Firefox’s adoption of
[78] “HTML5 Logo: Be Proud, But Don't Muddy the Wa- closed-source DRM breaks my heart”. The Guardian. Re-
ters!". The Web Standards Project. Retrieved 22 January trieved 2014-05-20.
2011.
[99] “FSF condemns partnership between Mozilla and Adobe
[79] “The HTML5 Logo Conversation”. World Wide Web to support Digital Rights Management”. Free Software
Consortium. Retrieved 21 January 2011. Foundation. 2014-05-14. Retrieved 2014-05-20.
1.3. JAVASCRIPT 21

1.2.9 External links 1.3.1 History

• HTML Working Group, HTML5 publications, Beginnings at Netscape


specifications, and notes
In 1993, the National Center for Supercomputing Ap-
• HTML5 Rocks, A comprehensive HTML5 resource
plications (NCSA), a unit of the University of Illinois
for developers by Google
at Urbana-Champaign, released NCSA Mosaic, the first
popular graphical Web browser, which played an impor-
• Mozilla Demo Studio, Demos of HTML5 imple-
tant part in expanding the growth of the nascent World
mentations
Wide Web. In 1994, a company called Mosaic Com-
munications was founded in Mountain View, California
• HTML5 Frontend Comparison, Sheet showing
and employed many of the original NCSA Mosaic au-
HTML5 vs. other main frontend techniques
thors to create Mosaic Netscape. However, it intention-
ally shared no code with NCSA Mosaic. The internal co-
• HTML.next, Feature requests for future versions of
dename for the company’s browser was Mozilla, which
HTML
stood for “Mosaic killer”, as the company’s goal was to
displace NCSA Mosaic as the world’s number one web
browser. The first version of the Web browser, Mosaic
1.3 JavaScript Netscape 0.9, was released in late 1994. Within four
months it had already taken three-quarters of the browser
market and became the main browser for Internet in the
Not to be confused with Java (programming language),
1990s. To avoid trademark ownership problems with the
Java (software platform), or Javanese script. NCSA, the browser was subsequently renamed Netscape
Navigator in the same year, and the company took the
JavaScript (/ˈdʒɑːvəˌskrɪpt/[6] ) is a high-level, dynamic, name Netscape Communications.
untyped, and interpreted programming language.[7] It Netscape Communications realized that the Web needed
has been standardized in the ECMAScript language to become more dynamic. Marc Andreessen, the founder
specification.[8] Alongside HTML and CSS, JavaScript is of the company believed that HTML needed a “glue lan-
one of the three core technologies of World Wide Web guage” that was easy to use by Web designers and part-
content production; the majority of websites employ it, time programmers to assemble components such as im-
and all modern Web browsers support it without the need ages and plugins, where the code could be written directly
for plug-ins.[7] JavaScript is prototype-based with first- in the Web page markup. In 1995, the company recruited
class functions, making it a multi-paradigm language, Brendan Eich with the goal of embedding the Scheme
supporting object-oriented,[9] imperative, and functional programming language into its Netscape Navigator. Be-
programming styles.[7] It has an API for working with fore he could get started, Netscape Communications col-
text, arrays, dates and regular expressions, but does not laborated with Sun Microsystems to include in Netscape
include any I/O, such as networking, storage, or graphics
Navigator Sun’s more static programming language Java,
facilities, relying for these upon the host environment in in order to compete with Microsoft for user adoption of
which it is embedded.[8]
Web technologies and platforms.[11] Netscape Commu-
Although there are strong outward similarities between nications then decided that the scripting language they
JavaScript and Java, including language name, syntax, wanted to create would complement Java and should
and respective standard libraries, the two are distinct lan- have a similar syntax, which excluded adopting other lan-
guages and differ greatly in their design. JavaScript was guages such as Perl, Python, TCL, or Scheme. To defend
influenced by programming languages such as Self and the idea of JavaScript against competing proposals, the
Scheme.[10] company needed a prototype. Eich wrote one in 10 days,
JavaScript is also used in environments that are not Web- in May 1995.
based, such as PDF documents, site-specific browsers, Although it was developed under the name Mocha, the
and desktop widgets. Newer and faster JavaScript virtual language was officially called LiveScript when it first
machines (VMs) and platforms built upon them have shipped in beta releases of Netscape Navigator 2.0 in
also increased the popularity of JavaScript for server-side September 1995, but it was renamed JavaScript[2] when
Web applications. On the client side, developers have tra- it was deployed in the Netscape Navigator 2.0 beta 3 in
ditionally implemented JavaScript as an interpreted lan- December.[12] The final choice of name caused confusion,
guage, but more recent browsers perform just-in-time giving the impression that the language was a spin-off of
compilation. Programmers also use JavaScript in video- the Java programming language, and the choice has been
game development, in crafting desktop and mobile ap- characterized as a marketing ploy by Netscape to give
plications, and in server-side network programming with JavaScript the cachet of what was then the hot new Web
run-time environments such as Node.js. programming language.
22 CHAPTER 1. SCRIPTING AND LAYOUT

There is a common misconception that JavaScript was in- release of the language specification ECMAScript pub-
fluenced by an earlier Web page scripting language devel- lished in the first edition of the ECMA-262 standard in
oped by Nombas named C-- (not to be confused with the June 1997, with JavaScript being the most well known of
later C-- created in 1997).[13][14] Brendan Eich, however, the implementations. ActionScript and JScript are other
had never heard of C-- before he created LiveScript.[15] well-known implementations of ECMAScript, with ex-
Nombas did pitch their embedded Web page scripting tensions.
to Netscape, though Web page scripting was not a new The standards process continued in cycles, with the re-
concept, as shown by the ViolaWWW Web browser.[16] lease of ECMAScript 2 in June 1998, which brings some
Nombas later switched to offering JavaScript instead of
modifications to conform to the ISO/IEC 16262 inter-
C-- in their ScriptEase product and was part of the TC39national standard. The release of ECMAScript 3 fol-
group that standardized ECMAScript.[17]
lowed in December 1999, which is the baseline for mod-
ern day JavaScript. The original ECMAScript 4 work led
by Waldemar Horwat (then at Netscape, now at Google)
Server-side JavaScript
started in 2000 and at first, Microsoft seemed to partici-
pate and even implemented some of the proposals in their
In December 1995, soon after releasing JavaScript for JScript .NET language.
browsers, Netscape introduced an implementation of the
language for server-side scripting with Netscape Enter- Over time it was clear though that Microsoft had no in-
prise Server.[18] tention of cooperating or implementing proper JavaScript
in Internet Explorer, even though they had no competing
Since the mid-2000s, additional server-side JavaScript proposal and they had a partial (and diverged at this point)
implementations have been introduced, such as Node.js implementation on the .NET server side. So by 2003, the
in 2009.[19] original ECMAScript 4 work was mothballed.
The next major event was in 2005, with two major hap-
Adoption by Microsoft penings in JavaScript’s history. First, Brendan Eich and
Mozilla rejoined Ecma International as a not-for-profit
Microsoft script technologies including VBScript and member and work started on ECMAScript for XML
JScript were released in 1996. JScript, a reverse- (E4X), the ECMA-357 standard, which came from ex-
engineered implementation of Netscape’s JavaScript, was Microsoft employees at BEA Systems (originally ac-
part of Internet Explorer 3. JScript was also available for quired as Crossgain). This led to working jointly with
server-side scripting in Internet Information Server. In- Macromedia (later acquired by Adobe Systems), who
ternet Explorer 3 also included Microsoft’s first support were implementing E4X in ActionScript 3 (ActionScript
for CSS and various extensions to HTML, but in each 3 was a fork of original ECMAScript 4).
case the implementation was noticeably different to that So, along with Macromedia, work restarted on EC-
found in Netscape Navigator at the time.[20][21] These dif- MAScript 4 with the goal of standardizing what was in
ferences made it difficult for designers and programmers ActionScript 3. To this end, Adobe Systems released the
to make a single website work well in both browsers, lead- ActionScript Virtual Machine 2, code named Tamarin,
ing to the use of “best viewed in Netscape” and “best as an open source project. But Tamarin and ActionScript
viewed in Internet Explorer” logos that characterized 3 were too different from web JavaScript to converge, as
these early years of the browser wars.[22] JavaScript began was realized by the parties in 2007 and 2008.
to acquire a reputation for being one of the roadblocks
Alas, there was still turmoil between the various players;
to a cross-platform and standards-driven Web. Some
developers took on the difficult task of trying to make Douglas Crockford—then at Yahoo!—joined forces with
Microsoft in 2007 to oppose ECMAScript 4, which led
their sites work in both major browsers, but many could
not afford the time.[20] With the release of Internet Ex- to the ECMAScript 3.1 effort. The development of EC-
MAScript 4 was never completed, but that work influ-
plorer 4, Microsoft introduced the concept of Dynamic
HTML, but the differences in language implementations enced subsequent versions.[23]
and the different and proprietary Document Object Mod- While all of this was happening, the open source and de-
els remained and were obstacles to widespread take-up of veloper communities set to work to revolutionize what
JavaScript on the Web.[20] could be done with JavaScript. This community effort
was sparked in 2005 when Jesse James Garrett released a
white paper in which he coined the term Ajax, and de-
Standardization scribed a set of technologies, of which JavaScript was
the backbone, used to create web applications where data
In November 1996, Netscape submitted JavaScript to can be loaded in the background, avoiding the need for
Ecma International to carve out a standard specification, full page reloads and leading to more dynamic applica-
which other browser vendors could then implement based tions. This resulted in a renaissance period of JavaScript
on the work done at Netscape. This led to the official usage spearheaded by open source libraries and the com-
1.3. JAVASCRIPT 23

munities that formed around them, with libraries such as Imperative and structured
Prototype, jQuery, Dojo Toolkit, MooTools and others
being released. JavaScript supports much of the structured programming
syntax from C (e.g., if statements, while loops, switch
In July 2008, the disparate parties on either side came
statements, do while loops, etc.). One partial exception
together in Oslo. This led to the eventual agreement in
is scoping: JavaScript originally had only function scop-
early 2009 to rename ECMAScript 3.1 to ECMAScript
ing with var. ECMAScript 2015 added a let keyword for
5 and drive the language forward using an agenda that is
block scoping, meaning JavaScript now has both function
known as Harmony. ECMAScript 5 was finally released
and block scoping. Like C, JavaScript makes a distinc-
in December 2009.
tion between expressions and statements. One syntac-
In June 2011, ECMAScript 5.1 was released to fully align tic difference from C is automatic semicolon insertion,
with the third edition of the ISO/IEC 16262 international which allows the semicolons that would normally termi-
standard. ECMAScript 2015 was released in June 2015. nate statements to be omitted.[29]
The current version is ECMAScript 2016, released in
June 2016.[24]
Dynamic

Typing As with most scripting languages, JavaScript is


Later developments dynamically typed; a type is associated with each
value, rather than just with each expression. For ex-
JavaScript has become one of the most popular program- ample, a variable that is at one time bound to a num-
ming languages on the Web. Initially, however, many ber may later be re-bound to a string.[30] JavaScript
professional programmers denigrated the language be- supports various ways to test the type of an object,
cause, among other reasons, its target audience consisted including duck typing.[31]
of Web authors and other such “amateurs”.[25] The advent Run-time evaluation JavaScript includes an eval func-
of Ajax returned JavaScript to the spotlight and brought tion that can execute statements provided as strings
more professional programming attention. The result at run-time.
was a proliferation of comprehensive frameworks and li-
braries, improved JavaScript programming practices, and
increased usage of JavaScript outside Web browsers, as Prototype-based (Object-oriented)
seen by the proliferation of server-side JavaScript plat-
forms. JavaScript is almost entirely object-based. In JavaScript,
In January 2009, the CommonJS project was founded an object is an associative array, augmented with a proto-
with the goal of specifying a common standard li- type (see below); each string key provides the name for
brary mainly for JavaScript development outside the an object property, and there are two syntactical ways to
browser.[26] specify such a name: dot notation (obj.x = 10) and bracket
notation (obj['x'] = 10). A property may be added, re-
With the rise of single-page applications and JavaScript- bound, or deleted at run-time. Most properties of an ob-
heavy sites, it is increasingly being used as a compile ject (and any property that belongs to an object’s proto-
target for source-to-source compilers from both dynamic type inheritance chain) can be enumerated using a for...in
languages and static languages. loop.
JavaScript has a small number of built-in objects, includ-
ing Function and Date.
1.3.2 Trademark
Prototypes JavaScript uses prototypes where many
[27]
“JavaScript” is a trademark of Oracle Corporation. It other object-oriented languages use classes for
is used under license for technology invented and imple- inheritance.[32] It is possible to simulate many class-
mented by Netscape Communications and current enti- based features with prototypes in JavaScript.[33]
ties such as the Mozilla Foundation.[28] Functions as object constructors Functions double as
object constructors, along with their typical role.
Prefixing a function call with new will create an
instance of a prototype, inheriting properties and
1.3.3 Features methods from the constructor (including properties
from the Object prototype).[34] ECMAScript 5 of-
The following features are common to all conforming fers the Object.create method, allowing explicit cre-
ECMAScript implementations, unless explicitly specified ation of an instance without automatically inherit-
otherwise. ing from the Object prototype (older environments
24 CHAPTER 1. SCRIPTING AND LAYOUT

can assign the prototype to null).[35] The construc- Thus inheritance in JavaScript is covered by a del-
tor’s prototype property determines the object used egation automatism that is bound to the prototype
for the new object’s internal prototype. New meth- property of constructor functions.
ods can be added by modifying the prototype of the
function used as a constructor. JavaScript’s built-in
Miscellaneous
constructors, such as Array or Object, also have pro-
totypes that can be modified. While it is possible to Run-time environment JavaScript typically relies on a
modify the Object prototype, it is generally consid- run-time environment (e.g., a Web browser) to pro-
ered bad practice because most objects in JavaScript vide objects and methods by which scripts can inter-
will inherit methods and properties from the Object act with the environment (e.g., a webpage DOM). It
prototype, and they may not expect the prototype to also relies on the run-time environment to provide
be modified.[36] the ability to include/import scripts (e.g., HTML
<script> elements). This is not a language feature
Functions as methods Unlike many object-oriented per se, but it is common in most JavaScript imple-
languages, there is no distinction between a function mentations.
definition and a method definition. Rather, the
distinction occurs during function calling; when JavaScript processes messages from a queue
a function is called as a method of an object, the one at a time. Upon loading a new message,
function’s local this keyword is bound to that object JavaScript calls a function associated with that
for that invocation. message, which creates a call stack frame (the
function’s arguments and local variables). The
call stack shrinks and grows based on the func-
Functional tion’s needs. Upon function completion, when
the stack is empty, JavaScript proceeds to the
A function is first-class; a function is considered to be next message in the queue. This is called the
an object. As such, a function may have properties and event loop, described as “run to completion”
methods, such as .call() and .bind().[37] A nested function because each message is fully processed be-
is a function defined within another function. It is cre- fore the next message is considered. How-
ated each time the outer function is invoked. In addition, ever, the language’s concurrency model de-
each nested function forms a lexical closure: The lexical scribes the event loop as non-blocking: pro-
scope of the outer function (including any constant, local gram input/output is performed using events
variable, or argument value) becomes part of the internal and callback functions. This means, for in-
state of each inner function object, even after execution stance, that JavaScript can process a mouse
of the outer function concludes.[38] JavaScript also sup- click while waiting for a database query to re-
ports anonymous functions. turn information.[43]

Variadic functions An indefinite number of parameters


Delegative can be passed to a function. The function can access
them through formal parameters and also through
JavaScript supports implicit and explicit delegation. the local arguments object. Variadic functions can
also be created by using the bind method.
Functions as roles (Traits and Mixins) JavaScript
Array and object literals Like many scripting lan-
natively supports various function-based imple-
[39] [40][41] guages, arrays and objects (associative arrays in
mentations of Role patterns like Traits
[42] other languages) can each be created with a succinct
and Mixins. Such a function defines additional
shortcut syntax. In fact, these literals form the basis
behavior by at least one method bound to the this
of the JSON data format.
keyword within its function body. A Role then has
to be delegated explicitly via call or apply to objects
Regular expressions JavaScript also supports regular
that need to feature additional behavior that is not
expressions in a manner similar to Perl, which pro-
shared via the prototype chain.
vide a concise and powerful syntax for text manip-
ulation that is more sophisticated than the built-in
Object composition and inheritance Whereas explicit
string functions.[44]
function-based delegation does cover composition in
JavaScript, implicit delegation already happens ev-
ery time the prototype chain is walked in order to, Vendor-specific extensions
e.g., find a method that might be related to but is
not directly owned by an object. Once the method JavaScript is officially managed by Mozilla Foundation,
is found it gets called within this object’s context. and new language features are added periodically. How-
1.3. JAVASCRIPT 25

ever, only some JavaScript engines support these new fea- A simple recursive function:
tures: function factorial(n) { if (n === 0 || n === 1) { return 1;
// 0! = 1! = 1 } return n * factorial(n - 1); } factorial(3);
• property getter and setter functions (supported // returns 6
by WebKit, Gecko, Opera,[45] ActionScript, and
Rhino)[46]
An anonymous function (or lambda):
• conditional catch clauses function counter() { var count = 0; return function() {
• iterator protocol (adopted from Python) return ++count; }; } var closure = counter(); closure(); //
returns 1 closure(); // returns 2 closure(); // returns 3
• shallow generators-coroutines (adopted from
Python) This example shows that in JavaScript, function closures
• array comprehensions and generator expressions captures their non-local variables by reference.
(adopted from Python) Variadic function demonstration (arguments is a special
variable):[51]
• proper block scope via the let keyword
function sum() { var x = 0; for (var i = 0; i < argu-
• array and object destructuring (limited form of ments.length; ++i) { x += arguments[i]; } return x; }
pattern matching) sum(1, 2); // returns 3 sum(1, 2, 3); // returns 6
• concise function expressions (function(args) expr)
Immediately-invoked function expressions are often used
• ECMAScript for XML (E4X), an extension that to create modules, as before ECMAScript 2015 there
adds native XML support to ECMAScript (unsup- was not built-in construct in the language. Modules al-
ported in Firefox since version 21[47] ) low gathering properties and methods in a namespace and
making some of them private:

1.3.4 Syntax var counter = (function () { var i = 0; // private property


return { // public methods get: function () { alert(i); },
Main article: JavaScript syntax set: function (value) { i = value; }, increment: function
() { alert(++i); } }; })(); // module counter.get(); //
shows 0 counter.set(6); counter.increment(); // shows 7
counter.increment(); // shows 8
Simple examples

Variables in JavaScript can be defined using the var


keyword:[48] More advanced example
var x; // defines the variable x and assigns to it the special This sample code displays various JavaScript features.
value “undefined” (not to be confused with an undefined
value) var y = 2; // defines the variable y and assigns to it /* Finds the lowest common multiple (LCM) of two
the value 2 numbers */ function LCMCalculator(x, y) { // con-
structor function var checkInt = function(x) { // inner
function if (x % 1 !== 0) { throw new TypeError(x + “is
Note the comments in the example above, both of which not an integer”); // var a = mouseX }; return x } this.a =
were preceded with two forward slashes. checkInt(x) // semicolons ^^^^ are optional, a newline is
There is no built-in I/O functionality in JavaScript; the enough this.b = checkInt(y); } // The prototype of object
run-time environment provides that. The ECMAScript instances created by a constructor is // that constructor’s
specification in edition 5.1 mentions:[49] “prototype” property. LCMCalculator.prototype = {
// object literal constructor: LCMCalculator, // when
… indeed, there are no provisions in this reassigning a prototype, set the constructor property
specification for input of external data or out- appropriately gcd: function() { // method that calculates
put of computed results. the greatest common divisor // Euclidean algorithm: var
a = Math.abs(this.a), b = Math.abs(this.b), t; if (a < b)
{ // swap variables t = b; b = a; a = t; } while (b !==
However, most runtime environments have a console ob- 0) { t = b; b = a % b; a = t; } // Only need to calculate
ject [50] that can be used to print output. Here is a mini- GCD once, so “redefine” this method. // (Actually
malist Hello World program in JavaScript: not redefinition—it’s defined on the instance itself, //
console.log(“Hello World!"); so that this.gcd refers to this “redefinition” instead of
LCMCalculator.prototype.gcd. // Note that this leads to
26 CHAPTER 1. SCRIPTING AND LAYOUT

a wrong result if the LCMCalculator object members • Validating input values of a Web form to make sure
“a” and/or “b” are altered afterwards.) // Also, 'gcd' === that they are acceptable before being submitted to
“gcd”, this['gcd'] === this.gcd this['gcd'] = function() { the server.
return a; }; return a; }, // Object property names can be
specified by strings delimited by double (") or single (') • Transmitting information about the user’s reading
quotes. lcm: function() { // Variable names don't collide habits and browsing activities to various websites.
with object properties, e.g., |lcm| is not |this.lcm|. // not Web pages frequently do this for Web analytics, ad
using |this.a*this.b| to avoid FP precision issues var lcm tracking, personalization or other purposes.[52]
= this.a / this.gcd() * this.b; // Only need to calculate lcm
once, so “redefine” this method. this.lcm = function() { Because JavaScript code can run locally in a user’s
return lcm; }; return lcm; }, toString: function() { return browser (rather than on a remote server), the browser
“LCMCalculator: a = " + this.a + ", b = " + this.b; } }; can respond to user actions quickly, making an applica-
// Define generic output function; this implementation tion more responsive. Furthermore, JavaScript code can
only works for Web browsers function output(x) { docu- detect user actions that HTML alone cannot, such as in-
ment.body.appendChild(document.createTextNode(x)); dividual keystrokes. Applications such as Gmail take ad-
document.body.appendChild(document.createElement('br')); vantage of this: much of the user-interface logic is written
} // Note: Array’s map() and forEach() are defined in in JavaScript, and JavaScript dispatches requests for in-
JavaScript 1.6. // They are used here to demonstrate formation (such as the content of an e-mail message) to
JavaScript’s inherent functional nature. [ [25, 55], the server. The wider trend of Ajax programming simi-
[21, 56], [22, 58], [28, 56] ].map(function(pair) { // larly exploits this strength.
array literal + mapping function return new LCMCal-
A JavaScript engine (also known as JavaScript interpreter
culator(pair[0], pair[1]); }).sort((a, b) => a.lcm() -
or JavaScript implementation) is an interpreter that in-
b.lcm()) // sort with this comparative function; => is a
terprets JavaScript source code and executes the script
shorthand form of a function, called “arrow function”
accordingly. The first JavaScript engine was created by
.forEach(printResult); function printResult(obj) { out-
Brendan Eich at Netscape, for the Netscape Navigator
put(obj + ", gcd = " + obj.gcd() + ", lcm = " + obj.lcm()); }
Web browser. The engine, code-named SpiderMonkey,
is implemented in C. It has since been updated (in
The following output should be displayed in the browser JavaScript 1.5) to conform to ECMAScript 3. The Rhino
window. engine, created primarily by Norris Boyd (formerly at
LCMCalculator: a = 28, b = 56, gcd = 28, lcm = Netscape, now at Google) is a JavaScript implementation
56 LCMCalculator: a = 21, b = 56, gcd = 7, lcm in Java. Rhino, like SpiderMonkey, is ECMAScript 3
= 168 LCMCalculator: a = 25, b = 55, gcd = 5, lcm compliant.
= 275 LCMCalculator: a = 22, b = 58, gcd = 2, lcm = 638 A Web browser is by far the most common host envi-
ronment for JavaScript. Web browsers typically create
“host objects” to represent the DOM in JavaScript. The
Web server is another common host environment. A
1.3.5 Use in Web pages JavaScript Web server would typically expose host ob-
jects representing HTTP request and response objects,
See also: Dynamic HTML and Ajax (programming) which a JavaScript program could then interrogate and
manipulate to dynamically generate Web pages.
The most common use of JavaScript is to add client- Because JavaScript is the only language that the most
side behavior to HTML pages, also known as Dynamic popular browsers share support for, it has become a
HTML (DHTML). Scripts are embedded in or included target language for many frameworks in other languages,
from HTML pages and interact with the Document Ob- even though JavaScript was never intended to be such
ject Model (DOM) of the page. Some simple examples a language.[53] Despite the performance limitations in-
of this usage are: herent to its dynamic nature, the increasing speed of
JavaScript engines has made the language a surprisingly
• Loading new page content or submitting data to the feasible compilation target.
server via Ajax without reloading the page (for ex-
ample, a social network might allow the user to post Example script
status updates without leaving the page).
Below is a minimal example of a standards-conforming
• Animation of page elements, fading them in and out,
Web page containing JavaScript (using HTML 5 syntax)
resizing them, moving them, etc.
and the DOM:
• Interactive content, for example games, and playing <!DOCTYPE html> <html> <head> <ti-
audio and video. tle>Example</title> </head> <body> <button
1.3. JAVASCRIPT 27

id="hellobutton">Hello</button> <script> docu- 1.3.6 Security


ment.getElementById('hellobutton').onclick = function()
{ alert('Hello world!'); // Show a dialog var myTextN- See also: Browser security
ode = document.createTextNode('Some new words.');
document.body.appendChild(myTextNode); // Append
JavaScript and the DOM provide the potential for ma-
“Some new words” to the page }; </script> </body>
licious authors to deliver scripts to run on a client com-
</html>
puter via the Web. Browser authors contain this risk using
two restrictions. First, scripts run in a sandbox in which
they can only perform Web-related actions, not general-
Compatibility considerations purpose programming tasks like creating files. Second,
scripts are constrained by the same origin policy: scripts
Main article: Web interoperability from one Web site do not have access to information such
as usernames, passwords, or cookies sent to another site.
Most JavaScript-related security bugs are breaches of ei-
Because JavaScript runs in widely varying environments,
ther the same origin policy or the sandbox.
an important part of testing and debugging is to test and
verify that the JavaScript works across multiple browsers. There are subsets of general JavaScript—ADsafe, Secure
ECMAScript (SES)—that provide greater level of secu-
The DOM interfaces for manipulating Web pages are not
rity, especially on code created by third parties (such as
part of the ECMAScript standard, or of JavaScript itself.
advertisements).[57][58] Caja is another project for safe
Officially, the DOM interfaces are defined by a separate
embedding and isolation of third-party JavaScript and
standardization effort by the W3C; in practice, browser
HTML.
implementations differ from the standards and from each
other, and not all browsers execute JavaScript. Content Security Policy is the main intended method of
ensuring that only trusted code is executed on a Web page.
To deal with these differences, JavaScript authors can at-
tempt to write standards-compliant code that will also be See also: Content Security Policy
executed correctly by most browsers; failing that, they
can write code that checks for the presence of certain
browser features and behaves differently if they are not
available.[54] In some cases, two browsers may both im- Cross-site vulnerabilities
plement a feature but with different behavior, and authors
may find it practical to detect what browser is running and Main articles: Cross-site scripting and Cross-site request
change their script’s behavior to match.[55][56] Program- forgery
mers may also use libraries or toolkits that take browser
differences into account.
A common JavaScript-related security problem is cross-
Furthermore, scripts may not work for some users. For site scripting (XSS), a violation of the same-origin pol-
example, a user may: icy. XSS vulnerabilities occur when an attacker is able to
cause a target Web site, such as an online banking web-
• use an old or rare browser with incomplete or un- site, to include a malicious script in the webpage pre-
usual DOM support; sented to a victim. The script in this example can then
access the banking application with the privileges of the
• use a PDA or mobile phone browser that cannot ex- victim, potentially disclosing secret information or trans-
ecute JavaScript; ferring money without the victim’s authorization. A solu-
tion to XSS vulnerabilities is to use HTML escaping when-
• have JavaScript execution disabled as a security pre-
ever displaying untrusted data.
caution;
Some browsers include partial protection against reflected
• use a speech browser due to, for example, a visual XSS attacks, in which the attacker provides a URL in-
disability. cluding malicious script. However, even users of those
browsers are vulnerable to other XSS attacks, such as
To support these users, Web authors can try to create those where the malicious code is stored in a database.
pages that degrade gracefully on user agents (browsers) Only correct design of Web applications on the server side
that do not support the page’s JavaScript. In particular, can fully prevent XSS.
the page should remain usable albeit without the extra
features that the JavaScript would have added. An alter- XSS vulnerabilities can also occur because
[59]
of implemen-
native approach that many find preferable is to first author tation mistakes by browser authors.
content using basic technologies that work in all browsers, Another cross-site vulnerability is cross-site request
then enhance the content for users that have JavaScript forgery (CSRF). In CSRF, code on an attacker’s site tricks
enabled. This is known as progressive enhancement. the victim’s browser into taking actions the user didn't in-
28 CHAPTER 1. SCRIPTING AND LAYOUT

tend at a target site (like transferring money at a bank). trust. Relied upon libraries can release an update that
It works because, if the target site relies only on cookies causes bugs or vulnerabilities to appear in all programs
to authenticate requests, then requests initiated by code that rely upon the library. Inversely, a library can go un-
on the attacker’s site will carry the same legitimate login patched with known vulnerabilities out in the wild. In a
credentials as requests initiated by the user. In general, study done looking over a sample of 133k websites, re-
the solution to CSRF is to require an authentication value searchers found 37% of the websites included a library
in a hidden form field, and not only in the cookies, to with at-least one known vulnerability.[61] “The median lag
authenticate any request that might have lasting effects. between the oldest library version used on each website
Checking the HTTP Referrer header can also help. and the newest available version of that library is 1,177
“JavaScript hijacking” is a type of CSRF attack in which days in ALEXA, and development of some libraries still
in active use ceased years ago.”[61] Another possibility is
a <script> tag on an attacker’s site exploits a page on the
victim’s site that returns private information such as JSON that the maintainer of a library may remove the library en-
tirely. This occurred in March 2016 when Azer Koçulu
or JavaScript. Possible solutions include:
removed his repository from NPM. This caused all tens
of thousands of programs and websites depending upon
• requiring an authentication token in the POST and his libraries to break.[62][63]
GET parameters for any response that returns pri-
vate information.
Browser and plugin coding errors

Misplaced trust in the client JavaScript provides an interface to a wide range of


browser capabilities, some of which may have flaws such
Developers of client-server applications must recognize as buffer overflows. These flaws can allow attackers to
that untrusted clients may be under the control of at- write scripts that would run any code they wish on the
tackers. The application author cannot assume that his user’s system. This code is not by any means limited
JavaScript code will run as intended (or at all) because to another JavaScript application. For example, a buffer
any secret embedded in the code could be extracted by a overrun exploit can allow an attacker to gain access to the
determined adversary. Some implications are: operating system’s API with superuser privileges.
These flaws have affected major browsers including
• Web site authors cannot perfectly conceal how
Firefox,[64] Internet Explorer,[65] and Safari.[66]
their JavaScript operates because the raw source
code must be sent to the client. The code can Plugins, such as video players, Adobe Flash, and the
be obfuscated, but obfuscation can be reverse- wide range of ActiveX controls enabled by default in Mi-
engineered. crosoft Internet Explorer, may also have flaws exploitable
via JavaScript (such flaws have been exploited in the
• JavaScript form validation only provides conve- past).[67][68]
nience for users, not security. If a site verifies that
In Windows Vista, Microsoft has attempted to contain the
the user agreed to its terms of service, or filters in-
risks of bugs such as buffer overflows by running the Inter-
valid characters out of fields that should only contain
net Explorer process with limited privileges.[69] Google
numbers, it must do so on the server, not only the
Chrome similarly confines its page renderers to their own
client.
“sandbox”.
• Scripts can be selectively disabled, so JavaScript
can't be relied on to prevent operations such as right-
Sandbox implementation errors
clicking on an image to save it.[60]

• It is extremely bad practice to embed sensitive in- Web browsers are capable of running JavaScript outside
formation such as passwords in JavaScript because the sandbox, with the privileges necessary to, for exam-
it can be extracted by an attacker. ple, create or delete files. Of course, such privileges aren't
meant to be granted to code from the Web.
Incorrectly granting privileges to JavaScript from the
Misplaced trust in developers
Web has played a role in vulnerabilities in both Inter-
[70] [71]
Package management systems such as NPM and Bower net Explorer and Firefox. In Windows XP Service
are popular with JavaScript developers. Such systems al- Pack 2, Microsoft
[72]
demoted JScript’s privileges in Internet
low a developer to easily manage their program’s depen- Explorer.
dencies upon other developer’s program libraries. De- Microsoft Windows allows JavaScript source files on a
velopers trust that the maintainers of the libraries will computer’s hard drive to be launched as general-purpose,
keep it secure and up to date, but that is not always the non-sandboxed programs (see: Windows Script Host).
case. A vulnerability has emerged because of this blind This makes JavaScript (like VBScript) a theoretically vi-
1.3. JAVASCRIPT 29

able vector for a Trojan horse, although JavaScript Trojan • The Unity game engine supports a modified version
horses are uncommon in practice.[73] of JavaScript for scripting via Mono.[78]
• DX Studio (3D engine) uses the SpiderMonkey im-
Hardware vulnerabilities plementation of JavaScript for game and simulation
logic.[79]
In 2017 a JavaScript based attack via browser was
demonstrated that could bypass ASLR. It’s called • Maxwell Render (rendering software) provides an
“ASLR⊕Cache” or AnC.[74][75] ECMA standard based scripting engine for tasks
automation.[80]

1.3.7 Uses outside Web pages • Google Apps Script in Google Spreadsheets and
Google Sites allows users to create custom formu-
In addition to Web browsers and servers, JavaScript inter- las, automate repetitive tasks and also interact with
preters are embedded in a number of tools. Each of these other Google products such as Gmail.[81]
applications provides its own object model that provides • Many IRC clients, like ChatZilla or XChat, use
access to the host environment. The core JavaScript lan- JavaScript for their scripting abilities.[82][83]
guage remains mostly the same in each application.
• RPG Maker MV uses Javascript as its scripting
language.[84]
Embedded scripting language
• The text editor UltraEdit uses Javascript 1.7 as inter-
• Google’s Chrome extensions, Opera's extensions, nal scripting language, introduced with version 13 in
Apple’s Safari 5 extensions, Apple’s Dashboard 2007.
Widgets, Microsoft’s Gadgets, Yahoo! Widgets,
Google Desktop Gadgets, and Serence Klipfolio are
implemented using JavaScript. Scripting engine

• The MongoDB database accepts queries written in • Microsoft’s Active Scripting technology supports
JavaScript. MongoDB and NodeJS are the core JScript as a scripting language.[85]
components of MEAN: a solution stack for creating
Web applications using just JavaScript. • Java introduced the javax.script package in version
6 that includes a JavaScript implementation based
• The Clusterpoint database accept queries written on Mozilla Rhino. Thus, Java applications can
in JS/SQL, which is a combination of SQL and host scripts that access the application’s variables
JavaScript. Clusterpoint has built-in computing en- and objects, much like Web browsers host scripts
gine that allows execution of JavaScript code right that access a webpage’s Document Object Model
inside the distributed database. (DOM).[86][87]
• Adobe’s Acrobat and Adobe Reader support • The Qt C++ toolkit includes a QtScript module to
JavaScript in PDF files.[76] interpret JavaScript, analogous to Java’s javax.script
package.[88]
• Tools in the Adobe Creative Suite, including
Photoshop, Illustrator, Dreamweaver, and InDesign, • OS X Yosemite introduced JavaScript for Automa-
allow scripting through JavaScript. tion (JXA), which is built upon JavaScriptCore and
• OpenOffice.org, an office application suite, as well the Open Scripting Architecture. It features an
as its popular fork LibreOffice, allows JavaScript to Objective-C bridge that enables entire Cocoa appli-
be used as a scripting language. cations to be programmed in JavaScript.

• The visual programming language Max, released by • Late Night Software’s JavaScript OSA (also known
Cycling '74, offers a JavaScript model of its envi- as JavaScript for OSA, or JSOSA) is a freeware al-
ronment for use by developers. It allows users to ternative to AppleScript for OS X. It is based on the
reduce visual clutter by using an object for a task Mozilla JavaScript 1.5 implementation, with the ad-
rather than many. dition of a MacOS object for interaction with the
operating system and third-party applications.
• Apple’s Logic Pro X digital audio workstation
(DAW) software can create custom MIDI effects
plugins using JavaScript.[77] Application platform

• ECMAScript was included in the VRML97 stan- • ActionScript, the programming language used in
dard for scripting nodes of VRML scene description Adobe Flash, is another implementation of the EC-
files. MAScript standard.
30 CHAPTER 1. SCRIPTING AND LAYOUT

• Adobe Integrated Runtime is a JavaScript runtime 1.3.8 Development tools


that allows developers to create desktop applications.
Within JavaScript, access to a debugger becomes invalu-
• Electron is an open-source framework developed by
able when developing large, non-trivial programs. Be-
GitHub.
cause there can be implementation differences between
• CA, Inc.'s AutoShell cross-application scripting en- the various browsers (particularly within the DOM), it
vironment is built on the SpiderMonkey JavaScript is useful to have access to a debugger for each of the
[95]
engine. It contains preprocessor-like extensions for browsers that a Web application targets.
command definition, as well as custom classes for Script debuggers are integrated within Internet Ex-
various system-related tasks like file I/O, operation plorer, Firefox, Safari, Google Chrome, Opera and
system command invocation and redirection, and Node.js.[96][97][98]
COM scripting.
In addition to the native Internet Explorer Developer
• Apache Cordova is a mobile application develop- Tools, three debuggers are available for Internet Explorer:
ment framework Microsoft Visual Studio is the richest of the three, closely
followed by Microsoft Script Editor (a component of
• Cocos2d is an open source software framework. It Microsoft Office),[99] and finally the free Microsoft Script
can be used to build games, apps and other cross Debugger that is far more basic than the other two. The
platform GUI based interactive programs free Microsoft Visual Web Developer Express provides
• RhoMobile Suite is a set of development tools for a limited version of the JavaScript debugging function-
creating data-centric, cross-platform, native mobile ality in Microsoft Visual Studio. Internet Explorer has
consumer and enterprise applications. included developer tools since version 8.
In comparison to Internet Explorer, Firefox has a more
• NW.js call all Node.js modules directly from DOM
comprehensive set of developer tools, which include a
and enable a new way of writing applications with
[89] debugger as well. Old versions of Firefox without these
all Web technologies.
tools used a Firefox addon called Firebug, or the older
• GNOME Shell, the shell for the GNOME 3 desk- Venkman debugger. Also, WebKit's Web Inspector in-
[100]
top environment,[90] made JavaScript its default pro- cludes a JavaScript debugger, which is used in Safari.
gramming language in 2013. [91] A modified version called Blink DevTools is used in
Google Chrome. Node.js has Node Inspector, an inter-
• The Mozilla platform, which underlies Firefox, active debugger that integrates with the Blink DevTools,
Thunderbird, and some other Web browsers, uses available in Google Chrome. Opera includes a set of tools
JavaScript to implement the graphical user interface called Dragonfly.[101]
(GUI) of its various products.
In addition to the native computer software, there are on-
• Qt Quick's markup language (available since Qt 4.7) line JavaScript IDEs, debugging aids that are themselves
uses JavaScript for its application logic. Its declara- written in JavaScript and built to run on the Web. An
tive syntax is also similar to JavaScript. example is the program JSLint, developed by Douglas
Crockford who has written extensively on the language.
• Ubuntu Touch provides a JavaScript API for its uni- JSLint scans JavaScript code for conformance to a set of
fied usability interface. standards and guidelines. Many libraries for JavaScript,
• Open webOS is the next generation of web-centric such as three.js, provide links to demonstration code that
platforms built to run on a wide range of form can be edited by users. They are also used as a peda-
factors.[92] gogical tool by institutions such as Khan Academy[102] to
allow students to experience writing code in an environ-
• enyo JS is a framework to develop apps for all major ment where they can see the output of their programs,
platforms, from phones and tablets to PCs and TVs without needing any setup beyond a Web browser.
[93]

• WinJS provides a special Windows Library for


JavaScript functionality in Windows 8 that enables 1.3.9 Benchmark tools for developers
the development of Modern style (formerly Metro
style) applications in HTML5 and JavaScript. Since JavaScript is getting more important for web de-
velopment (frontend overtakes many aspects which were
• NativeScript is an open-source framework to de- done in backend before), there is also more considera-
velop apps on the Apple iOS and Android platforms. tion done about performance. Especially mobile devices
• Weex is a framework for building Mobile could have problems with rendering and processing un-
cross-platform UI, created by China Tech gi- optimized complex logic.
ant Alibaba[94] A library for doing benchmarks is benchmark.js.
1.3. JAVASCRIPT 31

A benchmarking library that supports high-resolution Connect was scheduled to be phased out in the future in
timers and returns statistically significant results. favor of passing on the LiveConnect handling via NPAPI
Another tool is jsben.ch. An online JavaScript bench- to the Java 1.6+ plug-in
[108]
(not yet supported on the Mac as
marking tool, where code snippets can be tested against of March 2010). Most browser inspection tools, such
each other. as Firebug in Firefox, include JavaScript interpreters that
can act on the visible page’s DOM.
asm.js is a subset of JavaScript that can be run in
1.3.10 Version history any JavaScript engine or run faster in an ahead-of-time
(AOT) compiling engine.[109]
See also: ECMAScript § Versions, and ECMAScript § JSFuck is an esoteric programming language. Programs
Version correspondence are written using only six different characters, but are still
valid JavaScript code.
JavaScript was initially developed in 1996 for use in the p5.js[110] is an object oriented JavaScript library designed
Netscape Navigator Web browser. In the same year Mi- for artists and designers. It is based on the ideas of the
crosoft released an implementation for Internet Explorer. Processing project but is for the web.
This implementation was called JScript due to trademark
issues. In 1997 the first standardized version of the lan- jsben.ch is an online JavaScript benchmarking tool,
guage was released under the name ECMAScript in the where different code snippets can be tested against each
first edition of the ECMA-252 standard. The explicit other.
versioning and opt-in of language features was Mozilla-
specific and has been removed. Firefox 4 was the last ver- Use as an intermediate language
sion which referred to a JavaScript version (1.8.5). With
new editions of the ECMA-262 standard, JavaScript lan- As JavaScript is the most widely supported client-side
guage features are now often mentioned with their initial language that can run within a Web browser, it has be-
definition in the ECMA-262 editions. come an intermediate language for other languages to tar-
The following table is based on information from multiple get. This has included both newly created languages and
sources.[103][104][105] ports of existing languages. Some of these include:

• OberonScript, a full implementation of the Oberon


1.3.11 Related languages and features programming language that compiles to high-level
JavaScript.[111]
JSON, or JavaScript Object Notation, is a general-
• Objective-J, a superset of JavaScript that com-
purpose data interchange format that is defined as a sub-
piles to standard JavaScript. It adds traditional
set of JavaScript’s object literal syntax. Like much of
inheritance and Smalltalk/Objective-C style dy-
JavaScript (regexps and anonymous functions as 1st class
namic dispatch and optional pseudo-static typing to
elements, closures, flexible classes, 'use strict'), JSON,
JavaScript.
except for replacing Perl's key-value operator '=>' by an
RFC 822[107] inspired ':', is syntactically pure Perl. • Processing.js, a JavaScript port of the Processing
jQuery is a popular JavaScript library designed to sim- programming language designed to write visualiza-
plify DOM-oriented client-side HTML scripting along tions, images, and interactive content. It allows Web
with offering cross-browser compatibility because var- browsers to display animations, visual applications,
ious browsers respond differently to certain vanilla games and other graphical rich content without the
JavaScript code. need for a Java applet or Flash plugin.
Underscore.js is a utility JavaScript library for data ma- • CoffeeScript, an alternate syntax for JavaScript in-
nipulation that is used in both client-side and server-side tended to be more concise and readable. It adds
network applications. features like array comprehensions (also available in
JavaScript since version 1.7)[112] and pattern match-
Angular and AngularJS are web application frameworks
ing. Like Objective-J, it compiles to JavaScript.
to use for developing single-page applications and also
Ruby and Python have been cited as influential on
cross-platform mobile apps.
CoffeeScript syntax.
React (JavaScript library) is an open-source JavaScript
library providing a views that is rendered using compo- • Google Web Toolkit translates a subset of Java to
nents specified as custom HTML tags. JavaScript.
Mozilla browsers currently support LiveConnect, a fea- • Scala, an object-oriented and functional pro-
ture that allows JavaScript and Java to intercommunicate gramming language, has a Scala-to-JavaScript
on the Web. However, Mozilla-specific support for Live- compiler.[113]
32 CHAPTER 1. SCRIPTING AND LAYOUT

• Pyjamas, a port of Google Web Toolkit to Python Date objects are based on classes from Java 1.0,[117] but
translates a subset of Python to JavaScript. the similarities end there.

• Google Dart, an all purpose opensource language Java and JavaScript both first appeared on 23 May 1995,
that runs faster than and compiles to JavaScript. but Java was developed by James Gosling of Sun Mi-
crosystems, and JavaScript by Brendan Eich of NetScape
• Whalesong,[114] a Racket-to-JavaScript compiler. Communications.

• Emscripten, a LLVM-backend for porting native li- The differences between the two languages are more
braries to JavaScript, known as asm.js[115] prominent than their similarities. Java has static typ-
ing, while JavaScript’s typing is dynamic. Java is loaded
• Fantom a programming language that runs on JVM, from compiled bytecode, while JavaScript is loaded as
.NET and JavaScript. human-readable source code. Java’s objects are class-
based, while JavaScript’s are prototype-based. Finally,
• TypeScript, a free and open-source programming Java did not support functional programming until Java
language developed by Microsoft. It is a superset 8, while JavaScript has done so from the beginning, be-
of JavaScript, and essentially adds support for op- ing influenced by Scheme.
tional type annotations and some other language ex-
tensions such as classes, interfaces and modules. A
TS-script compiles into plain JavaScript and can be 1.3.12 References
executed in any JS host supporting ECMAScript 3
or higher. The compiler is itself written in Type- [1] Flanagan 2011, pp. 1–2.
Script. [2] Press release announcing JavaScript, “Netscape and Sun
announce JavaScript”, PR Newswire, December 4, 1995
• Haxe, an open-source high-level multiplatform pro-
gramming language and compiler that can produce [3] “Standard ECMA-262”. Ecma International. 2015-06-
applications and source code for many different 17.
platforms including JavaScript.
[4] “RFC 4329”. Apps.ietf.org. Archived from the original
• ClojureScript,[116] a compiler for Clojure that tar- on 2014-03-16. Retrieved 16 February 2016.
gets JavaScript. It is designed to emit JavaScript [5] “System-Declared Uniform Type Identifiers”. Mac OS X
code that is compatible with the advanced compi- Reference Library. Apple Inc. Retrieved 2010-03-05.
lation mode of the Google Closure optimizing com-
piler. [6] “JavaScript”. Collins English Dictionary – Complete &
Unabridged 2012 Digital Edition. William Collins Sons
• Kotlin, a statically-typed language that also compiles & Co. 2012. Retrieved 21 August 2015.
to Java byte code.
[7] Flanagan 2011, p. 1.
• SqueakJS, a virtual machine and DOM environment [8] Flanagan 2011, p. 2.
for the open-source Squeak implementation of the
Smalltalk programming language. [9] “ECMAScript Language Specification” (PDF).

[10] “ECMAScript Language Overview” (PDF). 2007-10-23.


As JavaScript has unusual limitations – such as no explicit p. 4. Retrieved 2009-05-03.
integer type, only double-precision binary floating point –
languages that compile to JavaScript and do not take care [11] Severance, Charles (February 2012). “JavaScript: De-
signing a Language in 10 Days”. Computer. IEEE Com-
to use the integer-converting shift and bitwise logical op-
puter Society. 45 (2): 7–8. doi:10.1109/MC.2012.57.
erators may have slightly different behavior than in other Retrieved 23 March 2013.
environments.
[12] “TechVision: Innovators of the Net: Brendan Eich and
JavaScript”. web.archive.org. Archived from the original
JavaScript and Java on 2008-02-08.

A common misconception is that JavaScript is similar [13] “The History of Programming Languages”. oreilly.com.
O'Reilly Media. 2004. Retrieved 16 July 2016.
or closely related to Java. It is true that both have a C-
like syntax (the C language being their most immediate [14] “What Is JavaScript?" (PDF). wiley.com. Wiley. Re-
common ancestor language). They also are both typically trieved 16 July 2016.
sandboxed (when used inside a browser), and JavaScript
[15] Noorda, Brent (21 September 2013). “Brent Noorda’s
was designed with Java’s syntax and standard library in
Answers on ECMA”. quora.com. Retrieved 16 July 2016.
mind. In particular, all Java keywords were reserved in
original JavaScript, JavaScript’s standard library follows [16] Noorda, Brent (24 June 2010). “History of Nombas”.
Java’s naming conventions, and JavaScript’s Math and brent-noorda.com. Retrieved 16 July 2016.
1.3. JAVASCRIPT 33

[17] Eich, Brendan (21 June 2011). “New JavaScript Engine [38] Flanagan 2006, p. 141.
Module Owner”. brendaneich.com. Retrieved 16 July
2016. [39] The many talents of JavaScript for generalizing Role-
Oriented Programming approaches like Traits and Mix-
[18] Netscape Communications Corporation (11 December ins, Peterseliger.blogpsot.de, April 11, 2014.
1998). “Server-Side JavaScript Guide”. oracle.com.
Netscape Communications Corporation. Retrieved 2016- [40] Traits for JavaScript, 2010.
07-16.
[41] “Home | CocktailJS”. Cocktailjs.github.io. Retrieved
[19] Mahemoff, Michael (17 December 2009). “Server-Side 2017-02-24.
JavaScript, Back with a Vengeance”. readwrite.com. Re- [42] Angus Croll, A fresh look at JavaScript Mixins, published
trieved 2016-07-16. May 31, 2011.
[20] Champeon, Steve (6 April 2001). “JavaScript, How Did [43] “Concurrency model and Event Loop”. Mozilla Developer
We Get Here?". oreilly.com. Retrieved 16 July 2016. Network. Retrieved 2015-08-28.
[21] “Microsoft Internet Explorer 3.0 Beta Now Available”. [44] Haverbeke, Marijn (2011). Eloquent JavaScript. No
microsoft.com. Microsoft. 29 May 1996. Retrieved 16 Starch Press. pp. 139–149. ISBN 978-1-59327-282-1.
July 2016.
[45] Robert Nyman, Getters And Setters With JavaScript –
[22] McCracken, Harry (16 September 2010). “The Unwel- Code Samples And Demos, Robertnyman.com, published
come Return of “Best Viewed with Internet Explorer"". 29 May 2009, accessed 2 January 2010.
technologizer.com. Retrieved 16 July 2016.
[46] John Resig, JavaScript Getters and Setters, Ejohn.org, 18
[23] “Documentation”. ecmascript.org. Retrieved 16 July July 2007, accessed 2 January 2010
2016.
[47] “E4X – Archive of obsolete content | MDN”. Mozilla De-
[24] “Standard ECMA-262, ECMAScript® 2016 Language veloper Network. Mozilla Foundation. Feb 14, 2014. Re-
Specification”. ecma-international.org. June 2016. Re- trieved 13 July 2014.
trieved 16 July 2016.
[48] “var – JavaScript – MDN”. The Mozilla Developer Net-
[25] Crockford, Douglas (2001). “JavaScript, The World’s work. Retrieved 22 December 2012.
Most Misunderstood Programming Language”. crock-
ford.com. Retrieved 16 July 2016. [49] “ECMAScript Language Specification – ECMA-262 Edi-
tion 5.1”. Ecma International. Retrieved 22 December
[26] Kowal, Kris (1 December 2009). “CommonJS Effort 2012.
Sets JavaScript on Path for World Domination”. arstech-
nica.com. Retrieved 16 July 2016. [50] “console”. Mozilla Developer Network. Mozilla. Re-
trieved 6 April 2013.
[27] “USPTO Copyright entry #75026640”. USPTO.
[51] “arguments”. Mozilla Developer Network. Mozilla. Re-
[28] “Sun Trademarks”. Sun Microsystems. Archived from trieved 6 April 2013.
the original on 28 May 2010. Retrieved 2007-11-08.
[52] “JavaScript tracking – Piwik”. Piwik. Retrieved 31
[29] Flanagan 2006, p. 16. March 2012.
[30] “JavaScript data types and data structures - JavaScript | [53] Hamilton, Naomi (2008-07-31). “The A-Z of Program-
MDN”. Developer.mozilla.org. 2017-02-16. Retrieved ming Languages: JavaScript”. computerworld.com.au.
2017-02-24.
[54] “Javascript - Object detection”. Quirksmode.org. Re-
[31] Flanagan 2006, pp. 176–178. trieved 2017-02-24.
[32] “Inheritance and the prototype chain”. Mozilla Developer [55] Peter-Paul Koch, Mission Impossible – mouse position
Network. Mozilla. Retrieved 6 April 2013.
[56] “JavaScript - Browser detect”. Quirksmode.org. Retrieved
[33] Herman, David (2013). Effective JavaScript. Addison- 2017-02-24.
Wesley. p. 83. ISBN 978-0-321-81218-6.
[57] “Making JavaScript Safe for Advertising”. ADsafe. Re-
[34] Haverbeke, Marijn (2011). Eloquent JavaScript. No trieved 2013-05-26.
Starch Press. pp. 95–97. ISBN 978-1-59327-282-1.
[58] “Secure ECMA Script (SES)". Code.google.com. Re-
[35] Katz, Yehuda. “Understanding “Prototypes” in trieved 2013-05-26.
JavaScript”. Retrieved 6 April 2013.
[59] “Mozilla Cross-Site Scripting Vulnerability Reported and
[36] Herman, David (2013). Effective JavaScript. Addison- Fixed - MozillaZine Talkback”. Mozillazine.org. Re-
Wesley. pp. 125–127. ISBN 978-0-321-81218-6. trieved 2017-02-24.

[37] “Properties of the Function Object”. Es5.github.com. [60] “Right-click “protection"? Forget about it”. 2008-06-17.
Retrieved 2013-05-26. ISSN 1797-1993. Retrieved 2008-06-17.
34 CHAPTER 1. SCRIPTING AND LAYOUT

[61] “Thou Shalt Not Depend on Me: Analysing the Use of [84] “RPG Maker MV | RPG Maker | Make Your Own
Outdated JavaScript Libraries on the Web” (PDF). 2016- Games!". Retrieved 28 August 2015.
12-21. Retrieved 2017-02-22.
[85] “Version Information (JavaScript)".
[62] Quartz, How one programmer broke the internet by delet- Msdn.microsoft.com. Retrieved 2013-05-26.
ing a tiny piece of code
[86] “javax.script release notes”. Java.sun.com. Retrieved
[63] SC Magazine UK, Developer’s 11 lines of deleted code 2009-05-19.
'breaks the internet'
[87] Flanagan 2006, pp. 214 et seq.
[64] Mozilla Corporation, Buffer overflow in crypto.signText()
[88] Nokia Corporation, QtScript Module
[65] Festa, Paul (August 19, 1998). “Buffer-overflow bug in
IE”. CNET. [89] “NW.js”. Nwjs.io. Retrieved 2017-02-24.

[66] SecurityTracker.com, Apple Safari JavaScript Buffer [90] “Behind the Scenes with Owen Taylor”. The GNOME
Overflow Lets Remote Users Execute Arbitrary Code and Journal. Archived from the original on 2012-12-21. Re-
HTTP Redirect Bug Lets Remote Users Access Files trieved 2010-01-23.

[67] SecurityFocus, Microsoft WebViewFolderIcon ActiveX [91] “Answering the question: “How do I develop an app for
Control Buffer Overflow Vulnerability GNOME?"".

[68] Fusion Authority, Macromedia Flash ActiveX Buffer [92]


Overflow
[93] “Enyo JavaScript Application Framework”. Enyojs.com.
[69] “Protected Mode in Vista IE7 – IEBlog”. Retrieved 2017-02-24.
Blogs.msdn.com. 2006-02-09. Retrieved 2017-02-
24. [94]

[70] US CERT, Vulnerability Note VU#713878: Microsoft [95] “Advanced Debugging With JavaScript”. alistapart.com.
Internet Explorer does not properly validate source of 2009-02-03. Retrieved 2010-05-28.
redirected frame
[96] “The JavaScript Debugging Console”.
[71] Mozilla Foundation, Mozilla Foundation Security Advi- javascript.about.com. 2010-05-28. Retrieved 2010-05-
sory 2005–41: Privilege escalation via DOM property 28.
overrides
[97] “SplineTech JavaScript Debugger – an independent stan-
[72] Microsoft Corporation, Changes to Functionality in Mi- dalone JavaScript Debugger”. javascript-debugger.com.
crosoft Windows XP Service Pack 2: Part 5: Enhanced 2013-08-26. Retrieved 2013-08-26.
Browsing Security
[98] “Debugging with Node Inspector”. docs.strongloop.com.
[73] For one example of a rare JavaScript Trojan Horse, see Retrieved 2014-05-07.
Symantec Corporation, JS.Seeker.K
[99] JScript development in Microsoft Office 11 (MS InfoPath
[74] AnC VUSec, 2017 2003)

[75] New ASLR-busting JavaScript is about to make drive-by [100] “Introducing Drosera – Surfin' Safari”. Webkit.org. 2006-
exploits much nastier Ars Technica, 2017 06-28. Retrieved 2009-05-19.

[76] “JavaScript for Acrobat”. Retrieved 2009-08-18. [101] “Opera DragonFly”. Opera Software.

[77] “Logic Pro X”. Apple. Apple, Inc. Retrieved January 31, [102] “Khan Academy Computer Science”. Retrieved 28 Sep
2017. 2012.

[78] “Unity Scripting”. unity3d.com. Retrieved 2013-01-29. [103] “New in JavaScript”. developer.mozilla.org. 2014. Re-
trieved 2016-07-16.
[79] “Technical Specification”. dxstudio.com. Retrieved
2009-10-20. [104] “JavaScript – JScript – ECMAScript version history”.
Webmasterworld.com. Retrieved 2009-12-17.
[80] THINK! The Maxwell Render Resourcer Center,
Scripting References [105] John Resig. “Versions of JavaScript”. Ejohn.org. Re-
trieved 2009-05-19.
[81] Google Apps Script, Google Apps Script
[106] “What Version of Javascript”. Javascript.about.com.
[82] “ChatZilla! Frequently Asked Questions – 4.5. How do 2016-02-22. Retrieved 2017-02-24.
I write scripts?". Chatzilla.hacksrus.com. Retrieved 11
February 2011. [107] “RFC 822 - STANDARD FOR THE FORMAT OF
ARPA INTERNET TEXT MESSAGES”. Tools.ietf.org.
[83] “Xcdscript”. Retrieved 11 February 2011. 1982-08-13. Retrieved 2017-02-24.
1.4. CASCADING STYLE SHEETS 35

[108] Release Notes for the Next-Generation Java™ Plug- • Harris, Andy (2001). JavaScript Programming for
In Technology (introduced in Java SE 6 update 10). the Absolute Beginner. Premier Press. ISBN 0-
Java.sun.com. Retrieved on 2013-06-13. 7615-3410-5.
[109] “frequently asked questions”. asm.js. Retrieved 2014-04- • Haverbeke, Marijn (2011). Eloquent JavaScript. No
13. Starch Press. ISBN 978-1-59327-282-1.
[110] “Home”. p5.js. 2017-01-21. Retrieved 2017-02-24.
• Heinle, Nick; Koman, Richard (1997). Designing
[111] Ralph Sommerer. “Oberon Script. A Lightweight with JavaScript. O'Reilly & Associates. ISBN 1-
Compiler and Runtime System for the Web”. re- 56592-300-6.
search.microsoft.com. Retrieved 2015-12-18.
• Husted, Robert; Kuslich, JJ (1999). Server-Side
[112] “New in JavaScript 1.7”. Developer.mozilla.org. 2012- JavaScript: Developing Integrated Web Applications
12-05. Retrieved 2013-05-26. (1st ed.). Addison-Wesley. ISBN 0-201-43329-X.
[113] Sébastien Doeraene. “Scala.js”. Lampwww.epfl.ch. Re- • McDuffie, Tina Spain (2003). JavaScript Concepts
trieved 2014-04-13.
& Techniques: Programming Interactive Web Sites.
[114] “Whalesong: a Racket to JavaScript compiler”. Hashcol- Franklin, Beedle & Associates. ISBN 1-887902-
lision.org. Retrieved 2014-04-13. 69-4.

[115] Walton, Zach (2012-04-04). “Easily Port C++ To • McFarlane, Nigel (2003). Rapid Application De-
HTML5/JavaScript With Emscripten”. WebProNews. velopment with Mozilla. Prentice Hall Professional
iEntry Network. Technical References. ISBN 0-13-142343-6.
[116] “clojure/clojurescript · GitHub”. Github.com. Retrieved • Powell, Thomas A.; Schneider, Fritz (2001).
2014-04-13. JavaScript: The Complete Reference. McGraw-Hill
[117] Brendan Eich (3 April 2008). “Popularity”. Retrieved Companies. ISBN 0-07-219127-9.
2012-01-19.
• Shelly, Gary B.; Cashman, Thomas J.; Dorin,
William J.; Quasney, Jeffrey J. (2000). JavaScript:
1.3.13 Further reading Complete Concepts and Techniques. Cambridge:
Course Technology. ISBN 0-7895-6233-2.
• Bhangal, Sham; Jankowski, Tomasz (2003). Foun-
• Vander Veer, Emily A. (2004). JavaScript For Dum-
dation Web Design: Essential HTML, JavaScript,
mies (4th ed.). Wiley Pub. ISBN 0-7645-7659-3.
CSS, PhotoShop, Fireworks, and Flash. APress L.
P. ISBN 1-59059-152-6. • Watt, Andrew H.; Watt, Jonathan A.; Simon, Jinjer
L. (2002). Teach Yourself JavaScript in 21 Days.
• Burns, Joe; Growney, Andree S. (2001). JavaScript
Pearson Education. ISBN 0-672-32297-8.
Goodies. Pearson Education. ISBN 0-7897-2612-2.

• Duffy, Scott (2003). How to do Everything with


JavaScript. Osborne. ISBN 0-07-222887-3. 1.3.14 External links
• Zakas, Nicholas C. (2012). Professional JavaScript • Douglas Crockford's video lectures on JavaScript
for Web Developers (3rd ed.). Wrox. ISBN 978-1-
118-02669-4. • Douglas Crockford’s A Survey of the JavaScript
Programming Language
• Flanagan, David (2006). JavaScript: The Definitive
Guide (5th ed.). O'Reilly & Associates. ISBN 0- • JavaScript at DMOZ
596-10199-6.
• List of languages that compile to JS
• Flanagan, David (2011). JavaScript: The Definitive
Guide (6th ed.). O'Reilly & Associates. ISBN 978-
0-596-80552-4. 1.4 Cascading Style Sheets
• Goodman, Danny; Eich, Brendan (2001).
JavaScript Bible. John Wiley & Sons. ISBN “CSS” redirects here. For other uses, see CSS (disam-
0-7645-3342-8. biguation).
“Pseudo-element” redirects here. For pseudoelement
• Goodman, Danny; Markel, Scott (2003). JavaScript symbols in chemistry, see Skeletal formula § Pseudoele-
and DHTML Cookbook. O'Reilly & Associates. ment symbols.
ISBN 0-596-00467-2.
36 CHAPTER 1. SCRIPTING AND LAYOUT

Cascading Style Sheets (CSS) is a style sheet language Selector


used for describing the presentation of a document writ-
ten in a markup language.[1] Although most often used to In CSS, selectors declare which part of the markup a style
set the visual style of web pages and user interfaces writ- applies to by matching tags and attributes in the markup
ten in HTML and XHTML, the language can be applied itself.
to any XML document, including plain XML, SVG and
Selectors may apply to:
XUL, and is applicable to rendering in speech, or on other
media. Along with HTML and JavaScript, CSS is a cor-
nerstone technology used by most websites to create visu- • all elements of a specific type, e.g. the second-level
ally engaging webpages, user interfaces for web applica- headers h2
tions, and user interfaces for many mobile applications.[2]
• elements specified by attribute, in particular:
CSS is designed primarily to enable the separation of doc-
ument content from document presentation, including as- • id: an identifier unique within the document
pects such as the layout, colors, and fonts.[3] This sep-
• class: an identifier that can annotate multiple
aration can improve content accessibility, provide more
elements in a document
flexibility and control in the specification of presentation
characteristics, enable multiple HTML pages to share for- • elements depending on how they are placed relative
matting by specifying the relevant CSS in a separate .css to others in the document tree.
file, and reduce complexity and repetition in the structural
content.
Classes and IDs are case-sensitive, start with letters, and
Separation of formatting and content makes it possible to can include alphanumeric characters and underscores. A
present the same markup page in different styles for dif- class may apply to any number of instances of any ele-
ferent rendering methods, such as on-screen, in print, by ments. An ID may only be applied to a single element.
voice (via speech-based browser or screen reader), and on
Braille-based tactile devices. It can also display the web Pseudo-classes are used in CSS selectors to permit for-
page differently depending on the screen size or viewing matting based on information that is not contained in the
device. Readers can also specify a different style sheet, document tree. One example of a widely used pseudo-
such as a CSS file stored on their own computer, to over- class is :hover, which identifies content only when the
ride the one the author specified. user “points to” the visible element, usually by holding
the mouse cursor over it. It is appended to a selector as
Changes to the graphic design of a document (or hun- in a:hover or #elementid:hover. A pseudo-class classi-
dreds of documents) can be applied quickly and easily, fies document elements, such as :link or :visited, whereas
by editing a few lines in the CSS file they use, rather than a pseudo-element makes a selection that may consist of
by changing markup in the documents. partial elements, such as ::first-line or ::first-letter.[5]
The CSS specification describes a priority scheme to de- Selectors may be combined in many ways to achieve great
termine which style rules apply if more than one rule specificity and flexibility.[6] Multiple selectors may be
matches against a particular element. In this so-called joined in a spaced list to specify elements by location,
cascade, priorities (or weights) are calculated and as- element type, id, class, or any combination thereof. The
signed to rules, so that the results are predictable. order of the selectors is important. For example, div .my-
The CSS specifications are maintained by the World Class {color: red;}<nowiki /> applies to all elements of
Wide Web Consortium (W3C). Internet media type class myClass that are inside div elements, whereas .my-
(MIME type) text/css is registered for use with CSS by Class div {color: red;}<nowiki /> applies to all div ele-
RFC 2318 (March 1998). The W3C operates a free CSS ments that are in elements of class myClass.
validation service for CSS documents.[4] The following table provides a summary of selector syn-
tax indicating usage and the version of CSS that intro-
duced it.[7]

Declaration block
1.4.1 Syntax
A declaration block consists of a list of declarations in
braces. Each declaration itself consists of a property, a
CSS has a simple syntax and uses a number of English colon (:), and a value. If there are multiple declarations
keywords to specify the names of various style properties. in a block, a semi-colon (;) must be inserted to separate
[8]
A style sheet consists of a list of rules. Each rule or rule- each declaration.
set consists of one or more selectors, and a declaration Properties are specified in the CSS standard. Each prop-
block. erty has a set of possible values. Some properties can
1.4. CASCADING STYLE SHEETS 37

affect any type of element, and others apply only to par- An internal CSS code can be typed in the head section
ticular groups of elements.[9] of the code. The coding is started with the style tag. For
Values may be keywords, such as “center” or “inherit”, or example,
numerical values, such as 200px (200 pixels), 50vw (50 <style> h1 {color: red;} </style>
percent of the viewport width) or 80% (80 percent of the
window width). Color values can be specified with key-
words (e.g. “red”), hexadecimal values (e.g. #FF0000,
also abbreviated as #F00), RGB values on a 0 to 255 Sources
scale (e.g. rgb(255, 0, 0)), RGBA values that specify both
color and alpha transparency (e.g. rgba(255, 0, 0, 0.8)), CSS information can be provided from various sources.
or HSL or HSLA values (e.g. hsl(000, 100%, 50%), These sources can be the web browser, the user and the
hsla(000, 100%, 50%, 80%)).[10] author. The information from the author can be further
classified into inline, media type, importance, selector
specificity, rule order, inheritance and property defini-
tion. CSS style information can be in a separate document
Use or it can be embedded into an HTML document. Multi-
ple style sheets can be imported. Different styles can be
Before CSS, nearly all presentational attributes of HTML applied depending on the output device being used; for
documents were contained within the HTML markup. example, the screen version can be quite different from
All font colors, background styles, element alignments, the printed version, so that authors can tailor the presen-
borders and sizes had to be explicitly described, often re- tation appropriately for each medium.
peatedly, within the HTML. CSS lets authors move much The style sheet with the highest priority controls the con-
of that information to another file, the style sheet, result- tent display. Declarations not set in the highest priority
ing in considerably simpler HTML. source are passed on to a source of lower priority, such
For example, headings (h1 elements), sub-headings (h2), as the user agent style. This process is called cascading.
sub-sub-headings (h3), etc., are defined structurally using One of the goals of CSS is to allow users greater control
HTML. In print and on the screen, choice of font, size, over presentation. Someone who finds red italic head-
color and emphasis for these elements is presentational. ings difficult to read may apply a different style sheet.
Before CSS, document authors who wanted to assign such Depending on the browser and the web site, a user may
typographic characteristics to, say, all h2 headings had choose from various style sheets provided by the design-
to repeat HTML presentational markup for each occur- ers, or may remove all added styles and view the site using
rence of that heading type. This made documents more the browser’s default styling, or may override just the red
complex, larger, and more error-prone and difficult to italic heading style without altering other attributes.
maintain. CSS allows the separation of presentation from
structure. CSS can define color, font, text alignment,
Specificity
size, borders, spacing, layout and many other typographic
characteristics, and can do so independently for on-screen
Specificity refers to the relative weights of various
and printed views. CSS also defines non-visual styles,
rules.[12] It determines which styles apply to an element
such as reading speed and emphasis for aural text read-
when more than one rule could apply. Based on specifi-
ers. The W3C has now deprecated the use of all presen-
cation, a simple selector (e.g. H1) has a specificity of 1,
tational HTML markup.[11]
class selectors have a specificity of 1,0, and ID selectors a
For example, under pre-CSS HTML, a heading element specificity of 1,0,0. Because the specificity values do not
defined with red text would be written as: carry over as in the decimal system, commas are used to
<h1><font color="red"> Chapter 1. </font></h1> separate the “digits”[13] (a CSS rule having 11 elements
and 11 classes would have a specificity of 11,11, not 121).

Using CSS, the same element can be coded using style Thus the following rules selectors result in the indicated
properties instead of HTML presentational attributes: specificity:

<h1 style="color: red;"> Chapter 1. </h1>


Example Consider this HTML fragment:
An “external” CSS file, as described below, can be as- <!DOCTYPE html> <html> <head> <meta
sociated with an HTML document using the following charset="utf-8"> <style> #xyz { color: red; } </style>
syntax: </head> <body> <p id="xyz” style="color: blue;"> To
<link href="path/to/file.css” rel="stylesheet” demonstrate specificity </p> </body> </html>
type="text/css">
In the above example, the declaration in the style attribute
38 CHAPTER 1. SCRIPTING AND LAYOUT

overrides the one in the <style> element because it has a Positioning


higher specificity.
CSS 2.1 defines three positioning schemes:

Inheritance Normal flow Inline items are laid out in the same way as
the letters in words in text, one after the other across
Inheritance is a key feature in CSS; it relies on the the available space until there is no more room, then
ancestor-descendant relationship to operate. Inheritance starting a new line below. Block items stack verti-
is the mechanism by which properties are applied not only cally, like paragraphs and like the items in a bulleted
to a specified element, but also to its descendants.[12] In- list. Normal flow also includes relative positioning
heritance relies on the document tree, which is the hi- of block or inline items, and run-in boxes.
erarchy of XHTML elements in a page based on nest-
Floats A floated item is taken out of the normal flow and
ing. Descendant elements may inherit CSS property val-
shifted to the left or right as far as possible in the
ues from any ancestor element enclosing them. In gen-
space available. Other content then flows alongside
eral, descendant elements inherit text-related properties,
the floated item.
but box-related properties are not inherited. Properties
that can be inherited are color, font, letter-spacing, line- Absolute positioning An absolutely positioned item has
height, list-style, text-align, text-indent, text-transform, no place in, and no effect on, the normal flow of
visibility, white-space and word-spacing. Properties that other items. It occupies its assigned position in its
cannot be inherited are background, border, display, float container independently of other items.[14]
and clear, height, and width, margin, min- and max-
height and -width, outline, overflow, padding, position,
text-decoration, vertical-align and z-index. Position property There are four possible values of the
position property. If an item is positioned in any way
Inheritance prevents certain properties from being de-
other than static, then the further properties top, bottom,
clared over and over again in a style sheet, allowing the
left, and right are used to specify offsets and positions.
software developers to write less CSS. It enhances faster-
loading of web pages by users and enables the clients to
save money on bandwidth and development costs. Static The default value places the item in the normal
flow
Relative The item is placed in the normal flow, and then
Example Given the following style sheet: shifted or offset from that position. Subsequent flow
h1 { color: pink; } items are laid out as if the item had not been moved.
Absolute Specifies absolute positioning. The element is
Suppose there is an h1 element with an emphasizing ele- positioned in relation to its nearest non-static ances-
ment (em) inside: tor.
<h1> This is to <em>illustrate</em> inheritance </h1> Fixed The item is absolutely positioned in a fixed position
on the screen even as the rest of the document is
If no color is assigned to the em element, the emphasized scrolled[14]
word “illustrate” inherits the color of the parent element,
h1. The style sheet h1 has the color pink, hence, the em Float and clear The float property may have one of
element is likewise pink. three values. Absolutely positioned or fixed items cannot
be floated. Other elements normally flow around floated
items, unless they are prevented from doing so by their
Whitespace clear property.

Whitespace between properties and selectors is ignored. left The item floats to the left of the line that it would
This code snippet: have appeared in; other items may flow around its
body{overflow:hidden;background:#000000;} right side.
right The item floats to the right of the line that it would
is functionally equivalent to this one: have appeared in; other items may flow around its
body { overflow: hidden; background: #000000; } left side.
clear Forces the element to appear underneath ('clear')
One common way to format CSS for readability is to in- floated elements to the left (clear:left), right (clear:
dent each property and give it its own line. right) or both sides (clear:both).[14][15]
1.4. CASCADING STYLE SHEETS 39

1.4.2 History hard-coded into the program. The style sheets could
therefore not be linked to documents on the web.[22]
Robert Cailliau, also of CERN, wanted to separate the
structure from the presentation so that different style
sheets could describe different presentation for printing,
screen-based presentations, and editors.[21]
Improving web presentation capabilities was a topic of
interest to many in the web community and nine differ-
ent style sheet languages were proposed on the www-style
mailing list.[20] Of these nine proposals, two were espe-
cially influential on what became CSS: Cascading HTML
Style Sheets[16] and Stream-based Style Sheet Proposal
(SSP).[19][23] Two browsers served as testbeds for the ini-
tial proposals; Lie worked with Yves Lafon to imple-
ment CSS in Dave Raggett's Arena browser.[24][25][26]
Bert Bos implemented his own SSP proposal in the Argo
browser.[19] Thereafter, Lie and Bos worked together to
develop the CSS standard (the 'H' was removed from the
name because these style sheets could also be applied to
other markup languages besides HTML).[17]
Lie’s proposal was presented at the "Mosaic and the Web"
conference (later called WWW2) in Chicago, Illinois in
1994, and again with Bert Bos in 1995.[17] Around this
time the W3C was already being established, and took
an interest in the development of CSS. It organized a
workshop toward that end chaired by Steven Pemberton.
Håkon Wium Lie, chief technical officer of the Opera Software This resulted in W3C adding work on CSS to the deliv-
company and co-creator of the CSS web standard erables of the HTML editorial review board (ERB). Lie
and Bos were the primary technical staff on this aspect of
CSS was first proposed by Håkon Wium Lie on Octo- the project, with additional members, including Thomas
ber 10, 1994.[16] At the time, Lie was working with Tim Reardon of Microsoft, participating as well. In August
Berners-Lee at CERN.[17] Several other style sheet lan- 1996 Netscape Communication Corporation presented
guages for the web were proposed around the same time, an alternative style sheet language called JavaScript Style
and discussions on public mailing lists and inside World Sheets (JSSS).[17] The spec was never finished and is
Wide Web Consortium resulted in the first W3C CSS deprecated.[27] By the end of 1996, CSS was ready to be-
Recommendation (CSS1)[18] being released in 1996. In come official, and the CSS level 1 Recommendation was
particular, Bert Bos' proposal was influential; he be- published in December.
came co-author of CSS1 and is regarded as co-creator
Development of HTML, CSS, and the DOM had all been
of CSS.[19]
taking place in one group, the HTML Editorial Review
Style sheets have existed in one form or another since the Board (ERB). Early in 1997, the ERB was split into three
beginnings of Standard Generalized Markup Language working groups: HTML Working group, chaired by Dan
(SGML) in the 1980s, and CSS was developed to provide Connolly of W3C; DOM Working group, chaired by Lau-
style sheets for the web.[20] One requirement for a web ren Wood of SoftQuad; and CSS Working group, chaired
style sheet language was for style sheets to come from dif- by Chris Lilley of W3C.
ferent sources on the web. Therefore, existing style sheet
The CSS Working Group began tackling issues that had
languages like DSSSL and FOSI were not suitable. CSS,
not been addressed with CSS level 1, resulting in the cre-
on the other hand, let a document’s style be influenced by
ation of CSS level 2 on November 4, 1997. It was pub-
multiple style sheets by way of “cascading” styles.[20]
lished as a W3C Recommendation on May 12, 1998.
As HTML grew, it came to encompass a wider variety CSS level 3, which was started in 1998, is still under de-
of stylistic capabilities to meet the demands of web de- velopment as of 2014.
velopers. This evolution gave the designer more con-
In 2005 the CSS Working Groups decided to enforce the
trol over site appearance, at the cost of more complex
requirements for standards more strictly. This meant that
HTML. Variations in web browser implementations, such
[21] already published standards like CSS 2.1, CSS 3 Selec-
as ViolaWWW and WorldWideWeb, made consistent
tors and CSS 3 Text were pulled back from Candidate
site appearance difficult, and users had less control over
Recommendation to Working Draft level.
how web content was displayed. The browser/editor de-
veloped by Tim Berners-Lee had style sheets that were
40 CHAPTER 1. SCRIPTING AND LAYOUT

Difficulty with adoption December 17, 1996. Håkon Wium Lie and Bert Bos are
credited as the original developers.[34][35] Among its ca-
The CSS 1 specification was completed in 1996. Mi- pabilities are support for
crosoft’s Internet Explorer 3[17] was released in that
year, featuring some limited support for CSS. IE 4 and
Netscape 4.x added more support, but it was typically in- • Font properties such as typeface and emphasis
complete and had many bugs that prevented CSS from
being usefully adopted. It was more than three years • Color of text, backgrounds, and other elements
before any web browser achieved near-full implementa-
tion of the specification. Internet Explorer 5.0 for the • Text attributes such as spacing between words, let-
Macintosh, shipped in March 2000, was the first browser ters, and lines of text
to have full (better than 99 percent) CSS 1 support,[28]
surpassing Opera, which had been the leader since its • Alignment of text, images, tables and other elements
introduction of CSS support 15 months earlier. Other
browsers followed soon afterwards, and many of them • Margin, border, padding, and positioning for most
additionally implemented parts of CSS 2. elements
However, even when later 'version 5' browsers began to
offer a fairly full implementation of CSS, they were still • Unique identification and generic classification of
incorrect in certain areas and were fraught with inconsis- groups of attributes
tencies, bugs and other quirks. The inconsistencies and
variation in feature support made it difficult for designers
The W3C no longer maintains the CSS 1
to achieve a consistent appearance across browsers and
Recommendation.[36]
platforms, leading to the use of workarounds such as CSS
hacks and filters.
Problems with browsers’ patchy adoption of CSS, along CSS 2 CSS level 2 specification was developed by the
with errata in the original specification, led the W3C to W3C and published as a recommendation in May 1998.
revise the CSS 2 standard into CSS 2.1, which moved A superset of CSS 1, CSS 2 includes a number of new ca-
nearer to a working snapshot of current CSS support in pabilities like absolute, relative, and fixed positioning of
HTML browsers. Some CSS 2 properties that no browser elements and z-index, the concept of media types, sup-
successfully implemented were dropped, and in a few port for aural style sheets (which were later replaced by
cases, defined behaviors were changed to bring the stan- the CSS 3 speech modules)[37] and bidirectional text, and
dard into line with the predominant existing implemen- new font properties such as shadows.
tations. CSS 2.1 became a Candidate Recommendation
on February 25, 2004, but CSS 2.1 was pulled back to The W3C no longer maintains the CSS 2
Working Draft status on June 13, 2005,[29] and only re- recommendation.[38]
turned to Candidate Recommendation status on July 19,
2007.[30]
CSS 2.1 CSS level 2 revision 1, often referred to as
In addition to these problems, the .css extension was used
“CSS 2.1”, fixes errors in CSS 2, removes poorly sup-
by a software product used to convert PowerPoint files
ported or not fully interoperable features and adds already
into Compact Slide Show files,[31] so some web servers
implemented browser extensions to the specification. To
served all .css[32] as mime type application/x-pointplus[33]
comply with the W3C Process for standardizing techni-
rather than text/css.
cal specifications, CSS 2.1 went back and forth between
Working Draft status and Candidate Recommendation
Variations status for many years. CSS 2.1 first became a Candidate
Recommendation on February 25, 2004, but it was re-
CSS has various levels and profiles. Each level of CSS verted to a Working Draft on June 13, 2005 for further
builds upon the last, typically adding new features and review. It returned to Candidate Recommendation on 19
typically denoted as CSS 1, CSS 2, CSS 3, and CSS 4. July 2007 and then updated twice in 2009. However, be-
Profiles are typically a subset of one or more levels of cause changes and clarifications were made, it again went
CSS built for a particular device or user interface. Cur- back to Last Call Working Draft on 7 December 2010.
rently there are profiles for mobile devices, printers, and CSS 2.1 went to Proposed Recommendation on 12 April
television sets. Profiles should not be confused with me- 2011.[39] After being reviewed by the W3C Advisory
dia types, which were added in CSS 2. Committee, it was finally published as a W3C Recom-
mendation on 7 June 2011.[40]
CSS 1 The first CSS specification to become an offi- CSS 2.1 was planned as the first and final revision of level
cial W3C Recommendation is CSS level 1, published on 2—but low priority work on CSS 2.2 began in 2015.
1.4. CASCADING STYLE SHEETS 41

things from CSS 2.1. A few level-4 modules exist (such


as Image Values,[47][48] Backgrounds & Borders,[49] or
Selectors),[50] which build on the functionality of a pre-
ceding level-3 module. Other modules defining entirely
new functionality, such as Flexbox, have been designated
as “level 1”.[51]
The CSS Working Group sometimes publishes “Snap-
shots”, a collection of whole modules and parts of other
drafts that are considered stable, interoperably imple-
mented and hence ready to use. So far, four such best
current practices document have been published as Notes,
in 2007,[52] 2010,[53] 2015.[54] and 2017.[55]

1.4.3 Browser support


Further information: Comparison of layout engines
(Cascading Style Sheets)
Taxonomy and status of CSS3 modules. Recommendation
Candidate Recommendation Last Call Working Draft. Each web browser uses a layout engine to render web
pages, and support for CSS functionality is not consis-
CSS 3 “CSS3” redirects here. For other uses, see tent between them. Because browsers do not parse CSS
CSS3 (disambiguation). perfectly, multiple coding techniques have been devel-
oped to target specific browsers with workarounds (com-
monly known as CSS hacks or CSS filters). Adoption
Unlike CSS 2, which is a large single specification defin- of new functionality in CSS can be hindered by lack of
ing various features, CSS 3 is divided into several sepa- support in major browsers. For example, Internet Ex-
rate documents called “modules”. Each module adds new plorer was slow to add support for many CSS 3 features,
capabilities or extends features defined in CSS 2, preserv- which slowed adoption of those features and damaged the
ing backward compatibility. Work on CSS level 3 started browser’s reputation among developers.[56] In order to en-
around the time of publication of the original CSS 2 rec- sure a consistent experience for their users, web develop-
ommendation. The earliest CSS 3 drafts were published ers often test their sites across multiple operating systems,
in June 1999.[41] browsers, and browser versions, increasing development
Due to the modularization, different modules have differ- time and complexity. Tools such as BrowserStack have
ent stability and statuses.[42] As of June 2012, there are been built to reduce the complexity of maintaining these
over fifty CSS modules published from the CSS Work- environments.
ing Group.,[41] and four of these have been published as In addition to these testing tools, many sites maintain
formal recommendations: lists of browser support for specific CSS properties, in-
cluding CanIUse and the Mozilla Developer Network.
• 2012-06-19: Media Queries Additionally, the CSS 3 defines feature queries, which
provide an @supports directive that will allow devel-
• 2011-09-29: Namespaces opers to target browsers with support for certain func-
• 2011-09-29: Selectors Level 3 tionality directly within their CSS.[57] CSS that is not
supported by older browsers can also sometimes be
• 2011-06-07: Color patched in using Javascript polyfills, which are pieces of
Javascript code designed to make browsers behave con-
Some modules have Candidate Recommendation (CR) sistently. These workarounds—and the need to support
status and are considered moderately stable. At CR stage, fallback functionality—can add complexity to develop-
implementations are advised to drop vendor prefixes.[43] ment projects, and consequently, companies frequently
define a list of browser versions that they will and will
not support.
CSS 4 There is no single, integrated CSS4 As websites adopt newer code standards that are incom-
specification,[45] because it is split into separate modules. patible with older browsers, these browsers can be cut off
However, there are “level 4” modules.[46] from accessing many of the resources on the web (some-
Because CSS3 split the CSS language’s definition into times intentionally).[58] Many of the most popular sites
modules, the modules have been allowed to level inde- on the internet are not just visually degraded on older
pendently. Most modules are level 3—they build on browsers due to poor CSS support, but do not work at
42 CHAPTER 1. SCRIPTING AND LAYOUT

all, in large part due to the evolution of Javascript and 1.4.5 Resolved limitations
other web technologies.
Vertical control limitations Though horizontal place-
ment of elements was always generally easy to con-
1.4.4 Limitations trol, vertical placement was frequently unintuitive,
convoluted, or outright impossible. Simple tasks,
Some noted limitations of the current capabilities of CSS such as centering an element vertically or placing
include: a footer no higher than bottom of the viewport
required either complicated and unintuitive style
rules, or simple but widely unsupported rules.[59]
Selectors are unable to ascend CSS currently offers The Flexible Box Module improved the situation
no way to select a parent or ancestor of an element considerably and vertical control is much more
[59]
that satisfies certain criteria. CSS Selectors Level straightforward and supported in all of the modern
4, which is still in Working Draft status, proposes browsers.[65] Older browsers still have those issues,
[60]
such a selector, but only as part of the “com- but most of those (mainly Internet Explorer 9 and
plete” selector profile, not the “fast” profile used in below) are no longer supported by their vendors.[66]
[61]
dynamic CSS styling. A more advanced selector
scheme (such as XPath) would enable more sophis- Absence of expressions There was no standard ability
ticated style sheets. The major reasons for the CSS to specify property values as simple expressions
Working Group previously rejecting proposals for (such as margin-left: 10% – 3em + 4px;). This
parent selectors are related to browser performance would be useful in a variety of cases, such as calcu-
and Incremental rendering issues.[62] lating the size of columns subject to a constraint on
the sum of all columns. Internet Explorer versions 5
Cannot explicitly declare new scope independently of to 7 support a proprietary expression() statement,[67]
position with similar functionality. This proprietary ex-
Scoping rules for properties such as z-index look for
pression() statement is no longer supported from
the closest parent element with a position:absolute
Internet Explorer 8 onwards, except in compati-
or position:relative attribute. This odd coupling has
bility modes. This decision was taken for “stan-
undesired effects. For example, it is impossible to
dards compliance, browser performance, and secu-
avoid declaring a new scope when one is forced to
rity reasons”.[67] However, a candidate recommen-
adjust an element’s position, preventing one from
dation with a calc() value to address this limitation
using the desired scope of a parent element.
has been published by the CSS WG[68] and has since
Pseudo-class dynamic behavior not controllable been supported in all of the modern browsers.[69]
CSS implements pseudo-classes that allow a degree Lack of column declaration Although possible in cur-
of user feedback by conditional application of rent CSS 3 (using the column-count module),[70]
alternate styles. One CSS pseudo-class, ":hover”, is layouts with multiple columns can be complex to
dynamic (equivalent of JavaScript “onmouseover”) implement in CSS 2.1. With CSS 2.1, the process
and has potential for abuse (e.g., implementing is often done using floating elements, which are of-
cursor-proximity popups),[63] but CSS has no ability ten rendered differently by different browsers, dif-
for a client to disable it (no “disable"-like property) ferent computer screen shapes, and different screen
or limit its effects (no “nochange"-like values for ratios set on standard monitors. All of the modern
each property). browsers support this CSS 3 feature in one form or
another.[71]
Cannot name rules There is no way to name a CSS
rule, which would allow (for example) client-side
scripts to refer to the rule even if its selector changes. 1.4.6 Advantages

Cannot include styles from a rule into another rule Separation of content from presentation Main arti-
CSS styles often must be duplicated in several cle: Separation of presentation and content
rules to achieve a desired effect, causing additional CSS facilitates publication of content in multiple
maintenance and requiring more thorough testing. presentation formats based on nominal parameters.
Some new CSS features were proposed to solve this, Nominal parameters include explicit user prefer-
but (as of February, 2016) are not yet implemented ences, different web browsers, the type of device
anywhere.[64] being used to view the content (a desktop computer
or mobile Internet device), the geographic location
Cannot target specific text without altering markup of the user and many other variables.
Besides the :first-letter pseudo-element, one cannot
target specific ranges of text without needing to Site-wide consistency Main article: Style sheet (web
utilize place-holder elements. development)
1.4. CASCADING STYLE SHEETS 43

When CSS is used effectively, in terms of inheri- methodology to keep them organized. The goals are ease
tance and “cascading”, a global style sheet can be of development, ease of collaboration during develop-
used to affect and style elements site-wide. If the sit- ment and performance of the deployed stylesheets in the
uation arises that the styling of the elements should browser. Popular methodologies include OOCSS - object
be changed or adjusted, these changes can be made oriented CSS, ACSS - atomic CSS, oCSS - organic Cas-
by editing rules in the global style sheet. Before cade Style Sheet, SMACSS - scalable and modular archi-
CSS, this sort of maintenance was more difficult, tecture for CSS and BEM - block, element, modifier.[73]
expensive and time-consuming.
Bandwidth A stylesheet, internal or external, specifies 1.4.9 References
the style once for a range of HTML elements se-
lected by class, type or relationship to others. This [1] “CSS developer guide”. Mozilla Developer Network. Re-
is much more efficient than repeating style informa- trieved 2015-09-24.
tion inline for each occurrence of the element. An
external stylesheet is usually stored in the browser [2] “Web-based Mobile Apps of the Future Using HTML 5,
cache, and can therefore be used on multiple pages CSS and JavaScript”. HTMLGoodies. Retrieved October
2014. Check date values in: |access-date= (help)
without being reloaded, further reducing data trans-
fer over a network. [3] “What is CSS?". World Wide Web Consortium. Re-
Page reformatting Main article: Progressive enhance- trieved December 2010. Check date values in: |access-
date= (help)
ment
With a simple change of one line, a different style [4] “W3C CSS validation service”.
sheet can be used for the same page. This has ad-
vantages for accessibility, as well as providing the [5] “W3C CSS2.1 specification for pseudo-elements and
ability to tailor a page or site to different target de- pseudo-classes”. World Wide Web Consortium. 7 June
vices. Furthermore, devices not able to understand 2011. Retrieved 30 April 2012.
the styling still display the content. [6] see the complete definition of selectors at the W3C Web
Accessibility Without CSS, web designers must typ- site.
ically lay out their pages with techniques such [7] “Selectors Level 3”. W3.org. Retrieved 2014-05-30.
as HTML tables that hinder accessibility for
vision-impaired users (see Tableless web de- [8] “W3C CSS2.1 specification for rule sets, declaration
sign#Accessibility). blocks, and selectors”. World Wide Web Consortium. 7
June 2011. Retrieved 2009-06-20.

1.4.7 CSS frameworks [9] “Full property table”. W3.org. Retrieved 2014-05-30.

[10] “CSS Color”. Mozilla Developer Network. 2016-06-28.


Main article: CSS framework
Retrieved 2016-08-23.

CSS frameworks are pre-prepared libraries that are meant [11] W3C HTML Working Group. “HTML 5. A vocabulary
and associated APIs for HTML and XHTML”. World
to allow for easier, more standards-compliant styling
Wide Web Consortium. Retrieved 28 June 2014.
of web pages using the Cascading Style Sheets lan-
guage. CSS frameworks include Foundation, Blueprint, [12] Meyer, Eric A. (2006). Cascading Style Sheets: The
Bootstrap, Cascade Framework and Materialize. Like Definitive Guide (3rd ed.). O'Reilly Media, Inc. ISBN
programming and scripting language libraries, CSS 0-596-52733-0.
frameworks are usually incorporated as external .css
sheets referenced in the HTML <head>. They provide [13] “Assigning property values, Cascading, and Inheritance”.
a number of ready-made options for designing and laying [14] Bos, Bert; et al. (7 December 2010). “9.3 Positioning
out the web page. Although many of these frameworks schemes”. Cascading Style Sheets Level 2 Revision 1 (CSS
have been published, some authors use them mostly for 2.1) Specification. W3C. Retrieved 16 February 2011.
rapid prototyping, or for learning from, and prefer to
'handcraft' CSS that is appropriate to each published site [15] Holzschlag, Molly E (2005). Spring into HTML and CSS.
without the design, maintenance and download overhead Pearson Education, Inc. ISBN 0-13-185586-7.
of having many unused features in the site’s styling.[72] [16] Lie, Hakon W (10 Oct 1994). “Cascading HTML style
sheets - a proposal” (Proposal) (0.92). CERN. Retrieved
25 May 2014.
1.4.8 CSS authoring methodologies
[17] Lie, Håkon Wium; Bos, Bert (1999). Cascading Style
As the size of CSS resources used in a project increases, Sheets, designing for the Web. Addison Wesley. ISBN
the development team needs to decide on a common 0-201-59625-3. Retrieved 23 June 2010.
44 CHAPTER 1. SCRIPTING AND LAYOUT

[18] “Cascading Style Sheets, level 1”. World Wide Web Con- [38] W3C: Cascading Style Sheets, level 2 CSS 2 specification
sortium. (1998 recommendation)

[19] Bos, Bert (14 April 1995). “Simple style sheets for SGML [39] W3C:Cascading Style Sheets, level 2 revision 1 CSS 2.1
& HTML on the web”. World Wide Web Consortium. specification (W3C Proposed Recommendation)
Retrieved 20 June 2010.
[40] W3C: Cascading Style Sheets Standard Boasts Unprece-
[20] “Cascading Style Sheets”. University of Oslo. Retrieved dented Interoperability
3 September 2014.
[41] Bos, Bert (18 February 2011). “Descriptions of all CSS
[21] Petrie, Charles; Cailliau, Robert (November 1997). specifications”. World Wide Web Consortium. Retrieved
“Interview Robert Cailliau on the WWW Proposal: “How 3 March 2011.
It Really Happened."". Institute of Electrical and Elec-
tronics Engineers. Retrieved 18 August 2010. [42] Bos, Bert (26 February 2011). “CSS current work”.
World Wide Web Consortium. Retrieved 3 March 2011.
[22] Bos, Håkon Wium Lie, Bert (1999). Cascading style
sheets: designing for the Web (2nd ed.). Harlow, Essex, [43] Etemad, Elika (12 December 2010). “Cascading Style
England: Addison-Wesley. ISBN 0-201-59625-3. Sheets (CSS) Snapshot 2010”. World Wide Web Con-
sortium. Retrieved 3 March 2011.
[23] Bos, Bert (31 March 1995). “Stream-based Style sheet
Proposal”. Retrieved 3 September 2014. [44] “All CSS specifications”. W3.org. 2014-05-22. Re-
trieved 2014-05-30.
[24] Nielsen, Henrik Frystyk (7 June 2002). “Libwww Hack-
ers”. World Wide Web Consortium. Retrieved 6 June [45] Atkins Jr, Tab. “A Word About CSS4”. Retrieved 18
2010. October 2012.

[25] “Yves Lafon”. World Wide Web Consortium. Retrieved [46] “W3C CSS Selectors Level 4”. W3.org. Retrieved 2014-
17 June 2010. 05-30.

[26] “The W3C Team: Technology and Society”. World Wide [47] “CSS Image Values and Replaced Content Module Level
Web Consortium. 18 July 2008. Retrieved 22 January 4”.
2011.
[48] http://dev.w3.org/csswg/css4-images/
[27] Lou Montulli; Brendan Eich; Scott Furman; Donna Con-
[49] “CSS Backgrounds and Borders Module Level 4”.
verse; Troy Chevalier (22 August 1996). “JavaScript-
Based Style Sheets”. World Wide Web Consortium. Re- [50] Etemad, Elika J.; Jr., Tab Atkins (2 May 2013). “Selectors
trieved 23 June 2010. Level 4”.
[28] “CSS software”. W3.org. Retrieved January 2011. Check [51] “CSS Flexible Box Layout Module Level 1”.
date values in: |access-date= (help)
[52] “Cascading Style Sheets (CSS) Snapshot 2007”. 12 May
[29] Anne van Kesteren. “CSS 2.1 – Anne’s Weblog”. Re- 2011.
trieved 2011-02-16.
[53] “Cascading Style Sheets (CSS) Snapshot 2010”. 12 May
[30] “Archive of W3C News in 2007”. World Wide Web Con- 2011.
sortium. Retrieved 2011-02-16.
[54] “CSS Snapshot 2015”. 13 October 2015.
[31] Nitot, Tristan (18 March 2002). “Incorrect MIME Type
for CSS Files”. Mozilla Developer Center. Mozilla. [55] “CSS Snapshot 2017”. 31 January 2017.
Archived from the original on 2011-05-20. Retrieved 20
June 2010. [56] “CSS3 Solutions for Internet Explorer – Smashing Maga-
zine”. Smashing Magazine. 2010-04-28. Retrieved 2016-
[32] McBride, Don (27 November 2009). “File Types”. Re- 10-12.
trieved 20 June 2010.
[57] “Using Feature Queries in CSS ★ Mozilla Hacks – the
[33] “css file extension details”. File extension database. 12 Web developer blog”. hacks.mozilla.org. Retrieved 2016-
March 2010. Retrieved 20 June 2010. 10-12.

[34] Bos, / Håkon Wium Lie, Bert (1997). Cascading style [58] “Looking at the Web with Internet Explorer 6, one last
sheets: designing for the Web (1st print. ed.). Harlow, time”. Ars Technica. Retrieved 2016-10-12.
England ; Reading, MA.: Addison Wesley Longman.
ISBN 0-201-41998-X. [59] Molly Holzschlag (January 2012). “Seven Things Still
Missing from CSS”. .net Magazine.
[35] W3C: Cascading Style Sheets, level 1 CSS 1 specification
[60] “Selectors Level 4 – Determining the Subject of a Selec-
[36] W3C: Cascading Style Sheets level 1 specification CSS level tor”. W3.org. Retrieved 2013-08-13.
1 specification
[61] “Selectors Level 4 – Fast vs Complete Selector Profiles”.
[37] “Aural style sheets”. W3.org. Retrieved 2013-08-13.
1.4. CASCADING STYLE SHEETS 45

[62] Snook, Jonathan (October 2010). “Why we don't have a • Kynn Bartlett: Teach Yourself CSS in 24 Hours,
parent selector”. snook.ca. 2nd Edition (2006), Sams Publishing, ISBN 978-
0672329067
[63] “Pure CSS Popups”. meyerweb.com. Retrieved 2009-11-
19. • Cascading Style Sheets: Designing for the Web
[64] Tab Atkins Jr. “CSS apply rule”. GitHub. Retrieved
(2005) by Håkon Wium Lie and Bert Bos, ISBN 0-
2016-02-27. 321-19312-1

[65] “Can I use... Support tables for HTML5, CSS3, etc.”. Ca- • Cascading Style Sheets Cascading Style Sheets, PhD
nIUse.com. Retrieved 2016-02-27. thesis, by Håkon Wium Lie – provides an authorita-
tive historical reference of CSS
[66] “Internet Explorer End of Support”. Microsoft. Retrieved
2016-02-27. • Keith Schengili-Roberts (2003): Core CSS, 2nd Edi-
tion, Prentice Hall, ISBN 0-13-009278-9
[67] “About Dynamic Properties”. Msdn.microsoft.com. Re-
trieved 2009-06-20. • On the Analysis of Cascading Style Sheets, Pierre
Geneves, Nabil Layaida, and Vincent Quint, Pro-
[68] “CSS3 Values and Units”. W3.org. Retrieved 2009-06-
ceedings of the 21st International Conference on
20.
World Wide Web (WWW'12), pp. 809–818, 2012.
[69] “Can I use... Support tables for HTML5, CSS3, etc.”. Ca-
nIUse.com. Retrieved 2016-02-27.
1.4.11 External links
[70] “CSS Multi-column Layout Module”. World Wide Web
Consortium. Retrieved May 2011. Check date values in: • Official website
|access-date= (help)
• CSS at DMOZ
[71] “Can I use... Support tables for HTML5, CSS3, etc.”. Ca-
nIUse.com. Retrieved 2016-02-27.

[72] Cederholm, Dan; Ethan Marcotte (2009). Handcrafted


CSS: More Bulletproof Web Design. New Riders. p. 114.
ISBN 978-0-321-64338-4. Retrieved 19 June 2010.

[73] Antti, Hiljá. “OOCSS, ACSS, BEM, SMACSS: what are


they? What should I use?". clubmate.fi. Hiljá. Retrieved
2 June 2015.

1.4.10 Further reading


• Jeffrey Zeldman (2009): Designing With Web Stan-
dards, New Riders, ISBN 978-0321616951 (paper-
back) (book’s companion site)

• Dan Cederholm (2009): Web Standards Solutions,


The Markup and Style Handbook, Friends of Ed,
ISBN 978-1430219200 (paperback) (Author’s site)

• Meyer, Eric A. (2006). Cascading Style Sheets: The


Definitive Guide, Third Edition. O'Reilly Media, Inc.
ISBN 0-596-52733-0.

• More Eric Meyer On CSS (2004) ISBN 0-7357-


1425-8

• Eric Meyer On CSS (2002), ISBN 0-7357-1245-X

• Meyer, Eric A. (2001) Cascading Style Sheets 2.0


Programmer’s Reference, McGraw-Hill Osborne
Media, ISBN 0-07-213178-0

• The Zen of CSS Design (2005) (co-authored by


CSS Zen Garden Owner, Dave Shea, and Molly E.
Holzschlag), ISBN 0-321-30347-4
Chapter 2

AJAX

2.1 Dynamic HTML ing language is changing the DOM and page style.
Simply put, DHTML is the combination of HTML, CSS
Dynamic HTML, or DHTML, is an umbrella term for a and JavaScript.
collection of technologies used together to create interac-
tive and animated web sites[1] by using a combination of • Animate text and images in their document, inde-
a static markup language (such as HTML), a client-side pendently moving each element from any starting
scripting language (such as JavaScript), a presentation point to any ending point, following a predetermined
definition language (such as CSS), and the Document Ob- path or one chosen by the user.
ject Model (DOM).[2] The application of DHTML was
introduced by Microsoft with the release of Internet Ex- • Embed a ticker that automatically refreshes its con-
plorer 4 in 1997. tent with the latest news, stock quotes, or other data.
DHTML allows scripting languages to change variables • Use a form to capture user input, and then process,
in a web page’s definition language, which in turn affects verify and respond to that data without having to
the look and function of otherwise “static” HTML page send data back to the server.
content, after the page has been fully loaded and during
the viewing process. Thus the dynamic characteristic of • Include rollover buttons or drop-down menus.
DHTML is the way it functions while a page is viewed,
not in its ability to generate a unique page with each page A less common use is to create browser-based action
load. games. Although a number of games were created using
DHTML during the late 1990s and early 2000s, differ-
By contrast, a dynamic web page is a broader concept,
ences between browsers made this difficult: many tech-
covering any web page generated differently for each
niques had to be implemented in code to enable the games
user, load occurrence, or specific variable values. This
to work on multiple platforms. Recently browsers have
includes pages created by client-side scripting, and ones
been converging towards web standards, which has made
created by server-side scripting (such as PHP, Perl, JSP
the design of DHTML games more viable. Those games
or ASP.NET) where the web server generates content be-
can be played on all major browsers and they can also
fore sending it to the client.
be ported to Plasma for KDE, Widgets for macOS and
DHTML is differentiated from Ajax by the fact that Gadgets for Windows Vista, which are based on DHTML
a DHTML page is still request/reload-based. With code.
DHTML, there may not be any interaction between the
The term “DHTML” has fallen out of use in recent
client and server after the page is loaded; all processing
years as it was associated with practices and conven-
happens in JavaScript on the client side. By contrast, an
tions that tended to not work well between various
Ajax page uses features of DHTML to initiate a request
web browsers. DHTML may now be referred to as
(or 'subrequest') to the server to perform additional ac-
unobtrusive JavaScript coding (DOM Scripting), in an ef-
tions. For example, if there are multiple tabs on a page,
fort to place an emphasis on agreed-upon best practices
pure DHTML approach would load the contents of all
while allowing similar effects in an accessible, standards-
tabs and then dynamically display only the one that is ac-
compliant way.
tive, while AJAX could load each tab only if (and when)
it is really needed. DHTML support with extensive DOM access was intro-
duced with Internet Explorer 4.0. Although there was a
basic dynamic system with Netscape Navigator 4.0, not
2.1.1 Uses all HTML elements were represented in the DOM. When
DHTML-style techniques became widespread, varying
DHTML allows authors to add effects to their pages that degrees of support among web browsers for the tech-
are otherwise difficult to achieve. In short words: script- nologies involved made them difficult to develop and

46
2.1. DYNAMIC HTML 47

debug. Development became easier when Internet Ex- 2.1.4 Document Object Model
plorer 5.0+, Mozilla Firefox 2.0+, and Opera 7.0+
adopted a shared DOM inherited from ECMAScript. Main article: Document Object Model
More recently, JavaScript libraries such as jQuery have
abstracted away many of the day-to-day difficulties in DHTML is not a technology in and of itself; rather, it
cross-browser DOM manipulation. is the product of three related and complementary tech-
nologies: HTML, Cascading Style Sheets (CSS), and
JavaScript. To allow scripts and components to access
features of HTML and CSS, the contents of the docu-
ment are represented as objects in a programming model
2.1.2 Structure of a web page known as the Document Object Model (DOM).
The DOM API is the foundation of DHTML, providing
See also: DOM events
a structured interface that allows access and manipula-
tion of virtually anything in the document. The HTML
Typically a web page using DHTML is set up in the fol- elements in the document are available as a hierarchical
lowing way: tree of individual objects, meaning you can examine and
<!DOCTYPE html> <html lang="en"> <head> <meta modify an element and its attributes by reading and set-
charset="utf-8"> <title>DHTML example</title> ting properties and by calling methods. The text between
</head> <body> <div id="navigation"></div> elements is also available through DOM properties and
<script> var init = function () { myObj = docu- methods.
ment.getElementById(“navigation”); // ... manipulate The DOM also provides access to user actions such as
myObj }; window.onload = init; </script> <!-- Often the pressing a key and clicking the mouse. You can intercept
code is stored in an external file; this is done by linking and process these and other events by creating event han-
the file that contains the JavaScript. This is helpful dler functions and routines. The event handler receives
when several pages use the same script: --> <script control each time a given event occurs and can carry
src="myjavascript.js"></script> </body> </html> out any appropriate action, including using the DOM to
change the document.

2.1.5 Dynamic styles


2.1.3 Example: Displaying an additional
Dynamic styles are a key feature of DHTML. By using
block of text CSS, you can quickly change the appearance and format-
ting of elements in a document without adding or remov-
The following code illustrates an often-used function. An ing elements. This helps keep your documents small and
additional part of a web page will only be displayed if the the scripts that manipulate the document fast.
user requests it..
The object model provides programmatic access to styles.
<!doctype html> <html lang="en"> <head> <meta This means you can change inline styles on individual ele-
charset="utf-8"> <title>Using a DOM func- ments and change style rules using simple JavaScript pro-
tion</title> <style> a {background-color:#eee;} a:hover gramming.
{background:#ff0;} #toggleMe {background:#cfc;
display:none; margin:30px 0; padding:1em;} Inline styles are CSS style assignments that have been ap-
</style> </head> <body> <h1>Using a DOM func- plied to an element using the style attribute. You can ex-
tion</h1> <h2><a id="showhide” href="#">Show amine and set these styles by retrieving the style object
paragraph</a></h2> <p id="toggleMe">This is the for an individual element. For example, to highlight the
paragraph that is only displayed on request.</p> text in a heading when the user moves the mouse pointer
<p>The general flow of the document continues.</p> over it, you can use the style object to enlarge the font and
<script> changeDisplayState = function (id) { var d change its color, as shown in the following simple exam-
= document.getElementById('showhide'), e = docu- ple.
ment.getElementById(id); if (e.style.display === 'none' <!DOCTYPE html> <html lang="en"> <head> <meta
|| e.style.display === '') { e.style.display = 'block'; charset="utf-8"> <title>Dynamic Styles</title> <style>
d.innerHTML = 'Hide paragraph'; } else { e.style.display ul { display: none; } </style> </head> <body> <h1
= 'none'; d.innerHTML = 'Show paragraph'; } }; doc- id="firstHeader">Welcome to Dynamic HTML</h1>
ument.getElementById('showhide').onclick = function <p><a id="clickableLink” href="#">Dynamic
() { changeDisplayState('toggleMe'); return false; }; styles are a key feature of DHTML.</a></p> <ul
</script> </body> </html> id="unorderedList"> <li>Change the color, size, and
typeface of text</li> <li>Show and hide text</li>
48 CHAPTER 2. AJAX

<li>And much, much more</li> </ul> <p>We've allow the user to interact with – the information pre-
only just begun!</p> <script> function showMe() { sented. JavaScript and the XMLHttpRequest object pro-
document.getElementById(“firstHeader”).style.color vide a method for exchanging data asynchronously be-
= "#990000"; docu- tween browser and server to avoid full page reloads.
ment.getElementById(“unorderedList”).style.display
= “block"; } docu-
ment.getElementById(“clickableLink”).addEventListener(“click”,
function (e) { e.preventDefault(); showMe(); });
</script> </body> </html>

2.2.1 History
2.1.6 See also
In the early-to-mid 1990s, most Web sites were based on
• Dynamic web page complete HTML pages. Each user action required that a
complete page be loaded from the server. This process
• Dynamic Cascading Style Sheets
was inefficient, as reflected by the user experience: all
page content disappeared, then reappeared. Each time
2.1.7 References the browser reloaded a page because of a partial change,
all of the content had to be re-sent, even though only some
[1] http://www.w3.org/DOM/#why of the information had changed. This placed additional
load on the server and made bandwidth the limiting factor
[2] http://www.w3.org/Style/#dynamic on performance.
In 1996, the iframe tag was introduced by Internet Ex-
2.1.8 External links plorer to load or to fetch content asynchronously.
In 1998, Microsoft Outlook Web App team implemented
• QuirksMode, a comprehensive site with test exam- the first component XMLHTTP by client script.
ples and instructions on how to write DHTML code
which runs on several browsers. In 1999, Microsoft used its iframe technology to dy-
namically update the news stories and stock quotes on
• Introductory DHTML Tutorial the default page for Internet Explorer,[6] and created
the XMLHTTP ActiveX control in Internet Explorer
• HTML & DHTML Reference on MSDN 5, which was later adopted by Mozilla, Safari, Opera
and other browsers as the XMLHttpRequest JavaScript
object.[7] Microsoft has adopted the native XMLHttpRe-
2.2 Ajax quest model as of Internet Explorer 7. The ActiveX
version is still supported in Internet Explorer, but not
“AJAX” redirects here. For other uses, see Ajax. in Microsoft Edge. The utility of background HTTP
requests to the server and asynchronous Web technolo-
gies remained fairly obscure until it started appearing in
Ajax (also AJAX; /ˈeɪdʒæks/; short for asynchronous full scale online applications such as Outlook Web App
JavaScript and XML)[1][2][3] is a set of Web development (2000)[8] and Oddpost (2002).
techniques using many Web technologies on the client
Google made a wide deployment of standards-compliant,
side to create asynchronous Web applications. With
Ajax, Web applications can send data to and retrieve from cross browser
[9]
Ajax with Gmail (2004) and Google Maps
a server asynchronously (in the background) without in- (2005). In October 2004 Kayak.com's public beta re-
terfering with the display and behavior of the existing lease was among the first large-scale e-commerce uses of
page. By decoupling the data interchange layer from the what their developers at that time called “the xml http
[10]
presentation layer, Ajax allows for Web pages, and by thing”.
extension Web applications, to change content dynam- The term “Ajax” was publicly stated on 18 February 2005
ically without the need to reload the entire page.[4] In by Jesse James Garrett in an article titled "Ajax: A New
practice, modern implementations commonly substitute Approach to Web Applications", based on techniques
JSON for XML due to the advantages of being native to used on Google pages.[3]
JavaScript.[5] On 5 April 2006, the World Wide Web Consortium
Ajax is not a single technology, but rather a group of (W3C) released the first draft specification for the XML-
technologies. HTML and CSS can be used in combi- HttpRequest object in an attempt to create an official
nation to mark up and style information. The DOM is Web standard.[11][12] The latest draft of the XMLHttpRe-
accessed with JavaScript to dynamically display – and quest object was published on 30 January 2014.[13]
2.2. AJAX 49

Conventionel modell of a web application Ajax model of a web application


2.2.3 Drawbacks
web browser
web browser user interface
• Any user whose browser does not support JavaScript
client platform

user interface javascript


call HTML+
CSS data or XMLHttpRequest, or has this functionality dis-
"Ajax engine"
(javascript)
abled, will not be able to properly use pages that de-
HTTP-request HTTP-request
pend on Ajax. Simple devices (such as smartphones
and PDAs) may not support the required technolo-
gies. The only way to let the user carry out func-
internet/intranet

HTTP(S) - traffic HTTP(S) traffic tionality is to fall back to non-JavaScript methods.


This can be achieved by making sure links and forms
XML or HTML
can be resolved properly and not relying solely on
HTML+
CSS data or javascript data
Ajax.[16]

• Similarly, some Web applications that use Ajax are


server platform

web server and/or


web server XML server

database, database,
built in a way that cannot be read by screen-reading
data handling,
legacy system etc.
data handling,
legacy system etc. technologies, such as JAWS. The WAI-ARIA stan-
server-based system server-based system
dards provide a way to provide hints in such a
case.[17]
The conventional model for a Web Application versus an appli- • Screen readers that are able to use Ajax may still not
cation using Ajax
be able to properly read the dynamically generated
content.[18]
2.2.2 Technologies • The same-origin policy prevents some Ajax tech-
niques from being used across domains,[11] although
The term Ajax has come to represent a broad group of the W3C has a draft of the XMLHttpRequest ob-
Web technologies that can be used to implement a Web ject that would enable this functionality.[19] Meth-
application that communicates with a server in the back- ods exist to sidestep this security feature by using a
ground, without interfering with the current state of the special Cross Domain Communications channel em-
page. In the article that coined the term Ajax,[3][4] Jesse bedded as an iframe within a page,[20] or by the use
James Garrett explained that the following technologies of JSONP.
are incorporated:
• The asynchronous callback-style of programming
required can lead to complex code that is hard to
• HTML (or XHTML) and CSS for presentation
maintain, to debug[21] and to test.[22]
• The Document Object Model (DOM) for dynamic • Because of the asynchronous nature of Ajax, each
display of and interaction with data chunk of data that is sent or received by the client
occurs in a connection established specifically for
• JSON or XML for the interchange of data, and that event. This creates a requirement that for ev-
XSLT for its manipulation ery action, the client must poll the server, instead of
listening, which incurs significant overhead. This
• The XMLHttpRequest object for asynchronous overhead leads to several times higher latency with
communication Ajax than what can be achieved with a technology
such as websockets.[23]
• JavaScript to bring these technologies together
• In pre-HTML5 browsers, pages dynamically created
using successive Ajax requests did not automatically
Since then, however, there have been a number of de- register themselves with the browser’s history en-
velopments in the technologies used in an Ajax applica- gine, so clicking the browser’s “back” button may
tion, and in the definition of the term Ajax itself. XML not have returned the browser to an earlier state of
is no longer required for data interchange and, therefore, the Ajax-enabled page, but may have instead re-
XSLT is no longer required for the manipulation of data. turned to the last full page visited before it. Such be-
JavaScript Object Notation (JSON) is often used as an havior — navigating between pages instead of nav-
alternative format for data interchange,[14] although other igating between page states — may be desirable,
formats such as preformatted HTML or plain text can also but if fine-grained tracking of page state is required,
be used.[15] then a pre-HTML5 workaround was to use invisible
Asynchronous HTML and HTTP (AHAH) involves us- iframes to trigger changes in the browser’s history.
ing XMLHTTPRequest to retrieve (X)HTML fragments, A workaround implemented by Ajax techniques is
which are then inserted directly into the Web page. to change the URL fragment identifier (the part of
50 CHAPTER 2. AJAX

a URL after the "#") when an Ajax-enabled page is <?php // This is the server-side script. // Set the content
accessed and monitor it for changes.[24][25] HTML5 type. header('Content-Type: text/plain'); // Send the
provides an extensive API standard for working with data back. echo “This is the returned text."; ?>
the browser’s history engine.[26]

• Dynamic Web page updates also make it difficult to jQuery example


bookmark and return to a particular state of the ap-
plication. Solutions to this problem exist, many of The same example as above written in the popular
which again use the URL fragment identifier.[24][25] JavaScript library jQuery.
On the other hand, as AJAX-intensive pages tend to
function as applications rather than content, book- $.get('send-ajax-data.php') .done(function(data) {
marking interim states rarely makes sense. Nev- console.log(data); }) .fail(function(data) { con-
ertheless, the solution provided by HTML5 for the sole.log('Error: ' + data); });
above problem also applies for this.[26]

• Depending on the nature of the Ajax application, dy-


namic page updates may disrupt user interactions, 2.2.5 See also
particularly if the Internet connection is slow or un-
reliable. For example, editing a search field may • ActionScript
trigger a query to the server for search completions, • Comet (programming) (also known as Reverse
but the user may not know that a search completion Ajax)
popup is forthcoming, and if the Internet connection
is slow, the popup list may show up at an inconve- • Google Instant
nient time, when the user has already proceeded to
• HTTP/2
do something else.
• List of Ajax frameworks
• Excluding Google,[27] most major Web crawlers do
[28]
not execute JavaScript code, so in order to be • Node.js
indexed by Web search engines, a Web application
must provide an alternative means of accessing the • Rich Internet application
content that would normally be retrieved with Ajax. • WebSocket
It has been suggested that a headless browser may
be used to index content provided by Ajax-enabled
websites, although Google is no longer recommend- 2.2.6 References
ing the Ajax crawling proposal they made back in
2009.[29] [1] Shiflett, Chris. “Ajax Is Not an Acronym, by Chris Shi-
flett”. shiflett.org. Retrieved 2017-02-17.

[2] “AJAX vs Ajax - Ajax ofcourse! (Arun Gupta, Miles to


2.2.4 Examples go ...)". blogs.oracle.com. Retrieved 2017-02-17.
JavaScript example [3] Jesse James Garrett (18 February 2005). “Ajax: A New
Approach to Web Applications”. AdaptivePath.com.
Archived from the original on 2 July 2008. Retrieved 19
An example of a simple Ajax request using the GET
June 2008.
method, written in JavaScript.
get-ajax-data.js: [4] Ullman, Chris (March 2007). Beginning Ajax. wrox.
ISBN 978-0-470-10675-4. Archived from the original on
// This is the client-side script. // Initialize the HTTP re- 5 July 2008. Retrieved 24 June 2008.
quest. var xhr = new XMLHttpRequest(); xhr.open('get',
'send-ajax-data.php'); // Track the state changes of the [5] “JSON: The Fat-Free Alternative to XML”. www.json.
org. Retrieved 2017-02-17.
request. xhr.onreadystatechange = function () { var
DONE = 4; // readyState 4 means the request is done. [6] MSN.com. Home.microsoft.com (1999-12-31). Re-
var OK = 200; // status 200 is a successful return. if trieved on 2013-07-13.
(xhr.readyState === DONE) { if (xhr.status === OK)
[7] “Dynamic HTML and XML: The XMLHttpRequest Ob-
{ console.log(xhr.responseText); // 'This is the returned
ject”. Apple Inc. Retrieved 25 June 2008.
text.' } else { console.log('Error: ' + xhr.status); // An
error occurred during the request. } } }; // Send the [8] Hopmann, Alex. “Story of XMLHTTP”. Alex Hopmann’s
request to send-ajax-data.php xhr.send(null); Blog. Retrieved 17 May 2010.

[9] “A Brief History of Ajax”. Aaron Swartz. 22 December


send-ajax-data.php: 2005. Retrieved 4 August 2009.
2.3. HYPERTEXT TRANSFER PROTOCOL 51

[10] English, Paul. “Kayak User Interface”. OFFICIAL 2.2.7 External links
KAYAK.COM TECHNOBLOG. Retrieved 22 May 2014.
[11] “The XMLHttpRequest Object”. World Wide Web Con-
• Ajax: A New Approach to Web Applications — Ar-
sortium. 5 April 2006. Archived from the original on 16 ticle that coined the Ajax term and Q&A
May 2008. Retrieved 25 June 2008.
• Ajax (programming) at DMOZ
[12] van Kesteren, Anne; Jackson, Dean. “The XMLHttpRe-
quest Object”. W3.org. W3C. Retrieved 2015-11-14. • Ajax Tutorial with GET, POST, text and XML ex-
amples.
[13] Kesteren, Anne; Aubourg, Julian; Song, Jungkee; Steen,
Hallvord R. M. “XMLHttpRequest Level 1”. W3.org.
W3C. Retrieved 2015-11-14.
[14] “JavaScript Object Notation”. Apache.org. Archived
2.3 Hypertext Transfer Protocol
from the original on 16 June 2008. Retrieved 4 July 2008.
The Hypertext Transfer Protocol (HTTP) is an
[15] “Speed Up Your Ajax-based Apps with JSON”.
application protocol for distributed, collaborative, and
DevX.com. Archived from the original on 4 July 2008.
hypermedia information systems.[1] HTTP is the founda-
Retrieved 4 July 2008.
tion of data communication for the World Wide Web.
[16] Quinsey, Peter. “User-proofing Ajax”.
Hypertext is structured text that uses logical links
[17] “WAI-ARIA Overview”. W3C. Archived from the origi- (hyperlinks) between nodes containing text. HTTP is the
nal on 26 October 2010. Retrieved 21 October 2010. protocol to exchange or transfer hypertext.
[18] Edwards, James (5 May 2006). “Ajax and Screenreaders:Development of HTTP was initiated by Tim Berners-
When Can it Work?". sitepoint.com. Retrieved 27 June Lee at CERN in 1989. Standards development of HTTP
2008. was coordinated by the Internet Engineering Task Force
[19] “Access Control for Cross-Site Requests”. World Wide (IETF) and the World Wide Web Consortium (W3C),
Web Consortium. Archived from the original on 14 May culminating in the publication of a series of Requests for
2008. Retrieved 27 June 2008. Comments (RFCs). The first definition of HTTP/1.1,
[20] “Secure Cross-Domain Communication in the Browser”. the version of HTTP in common use, occurred in RFC
The Architecture Journal (MSDN). Archived from the 2068 in 1997, although this was obsoleted by RFC 2616
original on 29 March 2010. Retrieved 27 April 2010. in 1999 and then again by RFC 7230 and family in 2014.
[21] Cuthbertson, Tim. “What is asynchronous programming, A later version, the successor HTTP/2, was standardized
and why is it so damn awkward?". GFX Monk. Retrieved in 2015, and is now supported by major web servers.
19 October 2010.
[22] “Selenium documentation: Fetching a Page”. Selenium.
2.3.1 Technical overview
Retrieved 6 October 2011.
It is worth noting that if your page uses a lot of Ajax
on load then WebDriver may not know when it has com-
pletely loaded. If you need to ensure such pages are fully
loaded, then you can use Explicit and Implicit Waits.
[23] Pimentel, Victoria; Nickerson, Bradford G. (2012-05-
08). “Communicating and Displaying Real-Time Data
with WebSocket”. Internet Computing, IEEE. 16 (4): 45–
53. doi:10.1109/MIC.2012.64.
[24] “Why use Ajax?". InterAKT. 10 November 2005.
Archived from the original on 29 May 2008. Retrieved
26 June 2008.
[25] “Deep Linking for AJAX”.
[26] “HTML5 specification”. Retrieved 21 October 2011.
[27] Hendriks, Erik (23 May 2014). “Official news on crawl-
ing and indexing sites for the Google index”. Google. Re-
trieved 24 May 2015. URL beginning with the HTTP scheme and the WWW domain
name label.
[28] Prokoph, Andreas (8 May 2007). “Help Web crawlers
efficiently crawl your portal sites and Web sites”. IBM. HTTP functions as a request–response protocol in the
Retrieved 22 April 2009. client–server computing model. A web browser, for ex-
[29] http://googlewebmastercentral.blogspot.co.uk/2015/10/ ample, may be the client and an application running on
deprecating-our-ajax-crawling-scheme.html a computer hosting a website may be the server. The
52 CHAPTER 2. AJAX

client submits an HTTP request message to the server.


The server, which provides resources such as HTML files
and other content, or performs other functions on behalf
of the client, returns a response message to the client. The
response contains completion status information about
the request and may also contain requested content in its
message body.
A web browser is an example of a user agent (UA). Other
types of user agent include the indexing software used by
search providers (web crawlers), voice browsers, mobile
apps, and other software that accesses, consumes, or dis-
plays web content.
HTTP is designed to permit intermediate network el- Tim Berners-Lee
ements to improve or enable communications between
clients and servers. High-traffic websites often bene- web browser. Berners-Lee first proposed the “World-
fit from web cache servers that deliver content on be- WideWeb” project in 1989—now known as the World
half of upstream servers to improve response time. Web Wide Web. The first version of the protocol had only one
browsers cache previously accessed web resources and method, namely GET, which would request a page from
reuse them when possible to reduce network traffic. a server.[3] The response from the server was always an
HTTP proxy servers at private network boundaries can HTML page.[4]
facilitate communication for clients without a globally
routable address, by relaying messages with external The first documented version of HTTP was HTTP V0.9
servers. (1991). Dave Raggett led the HTTP Working Group
(HTTP WG) in 1995 and wanted to expand the protocol
HTTP is an application layer protocol designed within with extended operations, extended negotiation, richer
the framework of the Internet protocol suite. Its defini- meta-information, tied with a security protocol which be-
tion presumes an underlying and reliable transport layer came more efficient by adding additional methods and
protocol,[2] and Transmission Control Protocol (TCP) is header fields.[5][6] RFC 1945 officially introduced and
commonly used. However HTTP can be adapted to use recognized HTTP V1.0 in 1996.
unreliable protocols such as the User Datagram Protocol
(UDP), for example in HTTPU and Simple Service Dis- The HTTP WG [7]planned to publish new standards in
covery Protocol (SSDP). December 1995 and the support for pre-standard
HTTP/1.1 based on the then developing RFC 2068
HTTP resources are identified and located on the net- (called HTTP-NG) was rapidly adopted by the major
work by Uniform Resource Locators (URLs), using the browser developers in early 1996. By March 1996, pre-
Uniform Resource Identifiers (URI’s) schemes http and standard HTTP/1.1 was supported in Arena,[8] Netscape
https. URIs and hyperlinks in HTML documents form 2.0,[8] Netscape Navigator Gold 2.01,[8] Mosaic 2.7,
inter-linked hypertext documents. Lynx 2.5, and in Internet Explorer 2.0. End-user adop-
HTTP/1.1 is a revision of the original HTTP (HTTP/1.0). tion of the new browsers was rapid. In March 1996,
In HTTP/1.0 a separate connection to the same server one web hosting company reported that over 40% of
is made for every resource request. HTTP/1.1 can browsers in use on the Internet were HTTP 1.1 compli-
reuse a connection multiple times to download images, ant. That same web hosting company reported that by
scripts, stylesheets, etc after the page has been deliv- June 1996, 65% of all browsers accessing their servers
[9]
ered. HTTP/1.1 communications therefore experience were HTTP/1.1 compliant. The HTTP/1.1 standard as
less latency as the establishment of TCP connections defined in RFC 2068 was officially released in January
presents considerable overhead. 1997. Improvements and updates to the HTTP/1.1 stan-
dard were released under RFC 2616 in June 1999.
In 2007, the HTTPbis Working Group was formed, in
2.3.2 History part, to revise and clarify the HTTP/1.1 specification. In
June 2014, the WG released an updated six-part specifi-
The term hypertext was coined by Ted Nelson in 1965 cation obsoleting RFC 2616:
in the Xanadu Project, which was in turn inspired by
Vannevar Bush's 1930s vision of the microfilm-based in- • RFC 7230, HTTP/1.1: Message Syntax and Routing
formation retrieval and management "memex" system de-
scribed in his 1945 essay "As We May Think". Tim • RFC 7231, HTTP/1.1: Semantics and Content
Berners-Lee and his team at CERN are credited with • RFC 7232, HTTP/1.1: Conditional Requests
inventing the original HTTP along with HTML and the
associated technology for a web server and a text-based • RFC 7233, HTTP/1.1: Range Requests
2.3. HYPERTEXT TRANSFER PROTOCOL 53

• RFC 7234, HTTP/1.1: Caching

• RFC 7235, HTTP/1.1: Authentication

HTTP/2 was published as RFC 7540 in May 2015.

2.3.3 HTTP session


An HTTP session is a sequence of network request-
response transactions. An HTTP client initiates a request
by establishing a Transmission Control Protocol (TCP)
connection to a particular port on a server (typically port
80, occasionally port 8080; see List of TCP and UDP port
An HTTP 1.1 request made using telnet. The request message,
numbers). An HTTP server listening on that port waits
response header section, and response body are highlighted.
for a client’s request message. Upon receiving the request,
the server sends back a status line, such as “HTTP/1.1 200
OK”, and a message of its own. The body of this mes- CONNECT. By being specified in these documents their
sage is typically the requested resource, although an error
semantics are well known and can be depended on. Any
message or other information may also be returned.[1] client can use any method and the server can be config-
ured to support any combination of methods. If a method
is unknown to an intermediate it will be treated as an un-
2.3.4 HTTP authentication safe and non-idempotent method. There is no limit to the
number of methods that can be defined and this allows
HTTP provides multiple authentication schemes such as
for future methods to be specified without breaking exist-
basic access authentication and digest access authentica-
ing infrastructure. For example, WebDAV defined 7 new
tion which operate via a challenge-response mechanism
methods and RFC 5789 specified the PATCH method.
whereby the server identifies and issues a challenge be-
fore serving the requested content. Main article: List of HTTP header fields
HTTP provides a general framework for access control
and authentication, via an extensible set of challenge-
response authentication schemes, which can be used by GET The GET method requests a representation of the
a server to challenge a client request and by a client to specified resource. Requests using GET should only
provide authentication information. [10] retrieve data and should have no other effect. (This
is also true of some other HTTP methods.)[1] The
W3C has published guidance principles on this dis-
Authentication realms tinction, saying, "Web application design should be
informed by the above principles, but also by the rel-
The HTTP Authentication specification also provides an evant limitations.”[13] See safe methods below.
arbitrary, implementation specific construct for further
dividing resources common to a given root URI. The HEAD The HEAD method asks for a response identical
realm value string, if present, is combined with the canon- to that of a GET request, but without the response
ical root URI to form the protection space component of body. This is useful for retrieving meta-information
the challenge. This in effect allows the server to define written in response headers, without having to trans-
separate authentication scopes under one root URI[10] port the entire content.

POST The POST method requests that the server ac-


2.3.5 Request methods cept the entity enclosed in the request as a new sub-
ordinate of the web resource identified by the URI.
HTTP defines methods (sometimes referred to as verbs) The data POSTed might be, for example, an annota-
to indicate the desired action to be performed on the iden- tion for existing resources; a message for a bulletin
tified resource. What this resource represents, whether board, newsgroup, mailing list, or comment thread;
pre-existing data or data that is generated dynamically, a block of data that is the result of submitting a web
depends on the implementation of the server. Of- form to a data-handling process; or an item to add
ten, the resource corresponds to a file or the output of to a database.[14]
an executable residing on the server. The HTTP/1.0
specification[11] defined the GET, POST and HEAD PUT The PUT method requests that the enclosed entity
methods and the HTTP/1.1 specification[12] added 5 be stored under the supplied URI. If the URI refers
new methods: OPTIONS, PUT, DELETE, TRACE and to an already existing resource, it is modified; if the
54 CHAPTER 2. AJAX

URI does not point to an existing resource, then the Idempotent methods and web applications
server can create the resource with that URI.[15]
Methods PUT and DELETE are defined to be
DELETE The DELETE method deletes the specified idempotent, meaning that multiple identical requests
resource. should have the same effect as a single request (note that
idempotence refers to the state of the system after the
TRACE The TRACE method echoes the received re-
request has completed, so while the action the server
quest so that a client can see what (if any) changes or
takes (e.g. deleting a record) or the response code it
additions have been made by intermediate servers.
returns may be different on subsequent requests, the
OPTIONS The OPTIONS method returns the HTTP system state will be the same every time). Methods
methods that the server supports for the specified GET, HEAD, OPTIONS and TRACE, being prescribed
URL. This can be used to check the functionality of as safe, should
[1]
also be idempotent, as HTTP is a stateless
a web server by requesting '*' instead of a specific protocol.
resource. In contrast, the POST method is not necessarily idem-
potent, and therefore sending an identical POST request
CONNECT [16] The CONNECT method converts the multiple times may further affect state or cause further
request connection to a transparent TCP/IP tun- side effects (such as financial transactions). In some cases
nel, usually to facilitate SSL-encrypted commu- this may be desirable, but in other cases this could be due
nication (HTTPS) through an unencrypted HTTP to an accident, such as when a user does not realize that
proxy.[17][18] See HTTP CONNECT tunneling. their action will result in sending another request, or they
did not receive adequate feedback that their first request
PATCH The PATCH method applies partial modifica-
was successful. While web browsers may show alert di-
tions to a resource.[19]
alog boxes to warn users in some cases where reloading
a page may re-submit a POST request, it is generally up
All general-purpose HTTP servers are required to im-
to the web application to handle cases where a POST re-
plement at least the GET and HEAD methods,[20] and,
quest should not be submitted more than once.
whenever possible, also the OPTIONS method.
Note that whether a method is idempotent is not enforced
by the protocol or web server. It is perfectly possible to
Safe methods write a web application in which (for example) a database
insert or other non-idempotent action is triggered by a
Some of the methods (for example, HEAD, GET, OP- GET or other request. Ignoring this recommendation,
TIONS and TRACE) are, by convention, defined as safe, however, may result in undesirable consequences, if a
which means they are intended only for information re- user agent assumes that repeating the same request is safe
trieval and should not change the state of the server. In when it isn't.
other words, they should not have side effects, beyond
relatively harmless effects such as logging, caching, the
serving of banner advertisements or incrementing a web Security
counter. Making arbitrary GET requests without regard
The TRACE method can be used as part of a class of
to the context of the application’s state should therefore
be considered safe. However, this is not mandated by the attacks known as cross-site tracing; for that reason, com-
mon security advice is for it to be disabled in the server
standard, and it is explicitly acknowledged that it cannot
be guaranteed. configuration.[21] Microsoft IIS supports a proprietary
“TRACK” method, which behaves similarly, and which
By contrast, methods such as POST, PUT, DELETE and is likewise recommended to be disabled.[21]
PATCH are intended for actions that may cause side ef-
fects either on the server, or external side effects such
as financial transactions or transmission of email. Such Summary table
methods are therefore not usually used by conforming
web robots or web crawlers; some that do not conform 2.3.6 Status codes
tend to make requests without regard to context or con-
sequences. See also: List of HTTP status codes
Despite the prescribed safety of GET requests, in practice
their handling by the server is not technically limited in In HTTP/1.0 and since, the first line of the HTTP re-
any way. Therefore, careless or deliberate programming sponse is called the status line and includes a numeric sta-
can cause non-trivial changes on the server. This is dis- tus code (such as "404") and a textual reason phrase (such
couraged, because it can cause problems for web caching, as “Not Found”). The way the user agent handles the re-
search engines and other automated agents, which can sponse primarily depends on the code and secondarily on
make unintended changes on the server. the other response header fields. Custom status codes can
2.3. HYPERTEXT TRANSFER PROTOCOL 55

be used since, if the user agent encounters a code it does establishing an encrypted HTTP connection also ex-
not recognize, it can use the first digit of the code to de- ist: Secure Hypertext Transfer Protocol, and using the
termine the general class of the response.[22] HTTP/1.1 Upgrade header to specify an upgrade to TLS.
The standard reason phrases are only recommendations Browser[24][25][26]
support for these two is, however, nearly non-
and can be replaced with “local equivalents” at the web existent.
developer's discretion. If the status code indicated a
problem, the user agent might display the reason phrase 2.3.10 Message format
to the user to provide further information about the na-
ture of the problem. The standard also allows the user The client and server communicate by sending plain-
agent to attempt to interpret the reason phrase, though text (ASCII) messages. The client sends requests to the
this might be unwise since the standard explicitly specifies server and the server sends responses.
that status codes are machine-readable and reason phrases
are human-readable. HTTP status code is primarily di-
vided into five groups for better explanation of request Request message
and responses between client and server as named: Infor-
mational 1XX, Successful 2XX, Redirection 3XX, Client The request message consists of the following:
Error 4XX and Server Error 5XX.
• A request line (e.g., GET /images/logo.png
HTTP/1.1, which requests a resource called
2.3.7 Persistent connections /images/logo.png from the server).
Main article: HTTP persistent connection • Request header fields (e.g., Accept-Language: en).

• An empty line.
In HTTP/0.9 and 1.0, the connection is closed after a
single request/response pair. In HTTP/1.1 a keep-alive- • An optional message body.
mechanism was introduced, where a connection could
be reused for more than one request. Such persistent The request line and other header fields must each end
connections reduce request latency perceptibly, because with <CR><LF> (that is, a carriage return character fol-
the client does not need to re-negotiate the TCP 3-Way- lowed by a line feed character). The empty line must con-
Handshake connection after the first request has been sist of only <CR><LF> and no other whitespace.[27] In
sent. Another positive side effect is that in general the the HTTP/1.1 protocol, all header fields except Host are
connection becomes faster with time due to TCP’s slow- optional.
start-mechanism.
A request line containing only the path name is accepted
Version 1.1 of the protocol also made bandwidth op- by servers to maintain compatibility with HTTP clients
timization improvements to HTTP/1.0. For example, before the HTTP/1.0 specification in RFC 1945.[28]
HTTP/1.1 introduced chunked transfer encoding to allow
content on persistent connections to be streamed rather
than buffered. HTTP pipelining further reduces lag time, Response message
allowing clients to send multiple requests before waiting
for each response. Another addition to the protocol was The response message consists of the following:
byte serving, where a server transmits just the portion of
a resource explicitly requested by a client. • A status line which includes the status code and rea-
son message (e.g., HTTP/1.1 200 OK, which indi-
cates that the client’s request succeeded).
2.3.8 HTTP session state
• Response header fields (e.g., Content-Type:
HTTP is a stateless protocol. A stateless protocol does text/html).
not require the HTTP server to retain information or sta-
tus about each user for the duration of multiple requests. • An empty line.
However, some web applications implement states or
• An optional message body.
server side sessions using for instance HTTP cookies or
hidden variables within web forms.
The status line and other header fields must all end
with <CR><LF>. The empty line must consist of only
2.3.9 Encrypted connections <CR><LF> and no other whitespace.[27] This strict re-
quirement for <CR><LF> is relaxed somewhat within
The most popular way of establishing an encrypted HTTP message bodies for consistent use of other system line-
connection is HTTP Secure.[23] Two other methods for breaks such as <CR> or <LF> alone.[29]
56 CHAPTER 2. AJAX

Example session protocol is an alternative to HTTP developed at Google,


it is superseded by the new HTTP protocol, HTTP/2.
Below is a sample conversation between an HTTP client
and an HTTP server running on www.example.com, port
80. As mentioned in the previous sections, all the data is 2.3.12 See also
sent in a plain-text (ASCII) encoding, using a two-byte
CR LF ('\r\n') line ending at the end of each line. • Basic access authentication

• Constrained Application Protocol – A semantically


Client request GET /index.html HTTP/1.1 Host: similar protocol to HTTP but used UDP or UDP-
www.example.com like messages targeted for devices with limited pro-
cessing capability. Re-uses HTTP and other internet
concepts like Internet media type and web linking
A client request (consisting in this case of the request line (RFC 5988)[31]
and only one header field) is followed by a blank line, so
that the request ends with a double newline, each in the • Content negotiation
form of a carriage return followed by a line feed. The
“Host” field distinguishes between various DNS names • Curl-loader – HTTP/S loading and testing open-
sharing a single IP address, allowing name-based virtual source software
hosting. While optional in HTTP/1.0, it is mandatory in • Digest access authentication
HTTP/1.1.
• Fiddler (software)
Server response HTTP/1.1 200 OK Date: Mon, 23 • HTTP compression
May 2005 22:38:34 GMT Content-Type: text/html;
charset=UTF-8 Content-Encoding: UTF-8 Content- • HTTP/2 – developed by the IETF’s Hypertext
Length: 138 Last-Modified: Wed, 08 Jan 2003 23:11:55 Transfer Protocol Bis (httpbis) working group.[32]
GMT Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
• HTTP-MPLEX – A backwards compatible en-
ETag: “3f80f-1b6-3e1cb03b” Accept-Ranges: bytes
hancement to HTTP to improve page and web ob-
Connection: close <html> <head> <title>An Example
ject retrieval time in congested networks proposed
Page</title> </head> <body> Hello World, this is a very
by Robert Mattson
simple HTML document. </body> </html>
• HTTPS
The ETag (entity tag) header field is used to determine
• List of file transfer protocols
if a cached version of the requested resource is identi-
cal to the current version of the resource on the server. • List of HTTP header fields
Content-Type specifies the Internet media type of the data
conveyed by the HTTP message, while Content-Length • List of HTTP status codes
indicates its length in bytes. The HTTP/1.1 webserver
• Representational state transfer (REST)
publishes its ability to respond to requests for certain byte
ranges of the document by setting the field Accept-Ranges: • Variant object
bytes. This is useful, if the client needs to have only cer-
tain portions[30] of a resource sent by the server, which • Waka (protocol) – An HTTP replacement proposed
is called byte serving. When Connection: close is sent, it by Roy Fielding
means that the web server will close the TCP connection
• Web cache
immediately after the transfer of this response.
Most of the header lines are optional. When Content- • WebSocket
Length is missing the length is determined in other ways. • Wireshark
Chunked transfer encoding uses a chunk size of 0 to mark
the end of the content. Identity encoding without Content-
Length reads content until the socket is closed. 2.3.13 Notes
A Content-Encoding like gzip can be used to compress the
[1] Fielding, Roy T.; Gettys, James; Mogul, Jeffrey C.;
transmitted data.
Nielsen, Henrik Frystyk; Masinter, Larry; Leach, Paul J.;
Berners-Lee, Tim (June 1999). Hypertext Transfer Proto-
col -- HTTP/1.1. IETF. RFC 2616. https://tools.ietf.org/
2.3.11 Similar protocols html/rfc2616.

The Gopher protocol was a content delivery protocol that [2] “Overall Operation”. p. 12. sec. 1.4. RFC 2616. https:
was displaced by HTTP in the early 1990s. The SPDY //tools.ietf.org/html/rfc2616#section-1.4.
2.4. XMLHTTPREQUEST 57

[3] Berners-Lee, Tim. “HyperText Transfer Protocol”. [22] “Status-Line”. p. 39. sec. 6.1. RFC 2616. https://tools.
World Wide Web Consortium. Retrieved 31 August ietf.org/html/rfc2616#section-6.1.
2010.
[23] Canavan, John (2001). Fundamentals of Networking Se-
[4] Tim Berners-Lee. “The Original HTTP as defined in curity. Norwood, MA: Artech House. pp. 82–83. ISBN
1991”. World Wide Web Consortium. Retrieved 24 July 9781580531764.
2010.
[24] Zalewski, Michal. “Browser Security Handbook”. Re-
[5] Raggett, Dave. “Dave Raggett’s Bio”. World Wide Web trieved 30 April 2015.
Consortium. Retrieved 11 June 2010.
[25] “Chromium Issue 4527: implement RFC 2817: Upgrad-
[6] Raggett, Dave; Berners-Lee, Tim. “Hypertext Transfer ing to TLS Within HTTP/1.1”. Retrieved 30 April 2015.
Protocol Working Group”. World Wide Web Consor-
tium. Retrieved 29 September 2010. [26] “Mozilla Bug 276813 - [RFE] Support RFC 2817 / TLS
Upgrade for HTTP 1.1”. Retrieved 30 April 2015.
[7] Raggett, Dave. “HTTP WG Plans”. World Wide Web
Consortium. Retrieved 29 September 2010. [27] “HTTP Message”. p. 31. sec. 4. RFC 2616. https:
//tools.ietf.org/html/rfc2616#section-4.
[8] Simon Spero. “Progress on HTTP-NG”. World Wide
Web Consortium. Retrieved 11 June 2010. [28] “Apache Week. HTTP/1.1”. 090502 apacheweek.com

[9] “HTTP/1.1”. Webcom.com Glossary entry. Retrieved [29] “Canonicalization and Text Defaults”. sec. 3.7.1. RFC
2009-05-29. 2616. https://tools.ietf.org/html/rfc2616#section-3.7.1.

[10] Fielding, Roy T.; Reschke, Julian F. (June 2014). [30] Luotonen, Ari; Franks, John (February 22, 1996). Byte
Hypertext Transfer Protocol (HTTP/1.1): Authentication. Range Retrieval Extension to HTTP. IETF. I-D draft-
IETF. RFC 7235. https://tools.ietf.org/html/rfc7235. ietf-http-range-retrieval-00. https://tools.ietf.org/html/
draft-ietf-http-range-retrieval-00.
[11] Berners-Lee, Tim; Fielding, Roy T.; Nielsen, Henrik
Frystyk. “Method Definitions”. Hypertext Transfer Pro- [31] Nottingham, Mark (October 2010). Web Linking. IETF.
tocol -- HTTP/1.0. IETF. pp. 30-32. sec. 8. RFC 1945. RFC 5988. https://tools.ietf.org/html/rfc5988.
https://tools.ietf.org/html/rfc1945#section-8.
[32] “Hypertext Transfer Protocol Bis (httpbis) – Charter”.
[12] “Method Definitions”. pp. 51-57. sec. 9. RFC 2616. IETF. 2012.
https://tools.ietf.org/html/rfc2616#section-9.

[13] Jacobs, Ian (2004). “URIs, Addressability, and the use 2.3.14 References
of HTTP GET and POST”. Technical Architecture Group
finding. W3C. Retrieved 26 September 2010. • HTTP 0.9 – As Implemented in 1991
[14] “POST”. p. 54. sec. 9.5. RFC 2616. https://tools.ietf.
org/html/rfc2616#section-9.5.
2.3.15 External links
[15] “PUT”. p. 55. sec. 9.6. RFC 2616. https://tools.ietf.org/
html/rfc2616#section-9.6. • “Change History for HTTP”. W3.org. Retrieved
2010-08-01. A detailed technical history of HTTP.
[16] “CONNECT”. Hypertext Transfer Protocol -- HTTP/1.1.
IETF. June 1999. p. 57. sec. 9.9. RFC 2616. https: • “Design Issues for HTTP”. W3.org. Retrieved
//tools.ietf.org/html/rfc2616#section-9.9. Retrieved 23 2010-08-01. Design Issues by Berners-Lee when he
February 2014. was designing the protocol.
[17] Khare, Rohit; Lawrence, Scott (May 2000). Upgrading
• “Classic HTTP Documents”. W3.org. 1998-05-14.
to TLS Within HTTP/1.1. IETF. RFC 2817. https://tools.
ietf.org/html/rfc2817. Retrieved 2010-08-01. list of other classic docu-
ments recounting the early protocol history
[18] “Vulnerability Note VU#150227: HTTP proxy default
configurations allow arbitrary TCP connections”. US-
CERT. 2002-05-17. Retrieved 2007-05-10.
2.4 XMLHttpRequest
[19] Dusseault, Lisa; Snell, James M. (March 2010). PATCH
Method for HTTP. IETF. RFC 5789. https://tools.ietf. XMLHttpRequest (XHR) is an API in the form of
org/html/rfc5789. an object whose methods transfer data between a web
[20] “Method”. p. 36. sec. 5.1.1. RFC 2616. https://tools.
browser and a web server. The object is provided by the
ietf.org/html/rfc2616#section-5.1.1. browser’s JavaScript environment. Particularly, retrieval
of data from XHR for the purpose of continually modify-
[21] “Cross Site Tracing”. OWASP. Retrieved 2016-06-22. ing a loaded web page is the underlying concept of Ajax
58 CHAPTER 2. AJAX

design. Despite the name, XHR can be used with proto- use these features without platform-specific code.”
cols other than HTTP and data can be in the form of not The W3C also published another Working Draft speci-
only XML,[1] but also JSON,[2] HTML or plain text.[3] fication for the XMLHttpRequest object, “XMLHttpRe-
WHATWG maintains an XHR standard as a living docu- quest Level 2”, on February 25 of 2008.[17] Level 2
ment. Ongoing work at the W3C to create a stable speci- consists of extended functionality to the XMLHttpRe-
fication is based on snapshots of the WHATWG standard. quest object, including, but not limited to, progress
events, support for cross-site requests, and the handling
of byte streams. At the end of 2011, the Level 2 spec-
2.4.1 History ification was abandoned and absorbed into the original
specification.[18]
The concept behind the XMLHttpRequest object was orig-
At the end of 2012, the WHATWG took over develop-
inally created by the developers of Outlook Web Access
ment and maintains a living standard using Web IDL.[19]
(by Microsoft) for Microsoft Exchange Server 2000.[4]
W3C’s current drafts are based on snapshots of the
An interface called IXMLHTTPRequest was developed
WHATWG standard.
and implemented into the second version of the MSXML
library using this concept.[4][5] The second version of
the MSXML library was shipped with Internet Explorer 2.4.3 HTTP request
5.0 in March 1999, allowing access, via ActiveX, to
the IXMLHTTPRequest interface using the XMLHTTP The following sections demonstrate how a request using
wrapper of the MSXML library.[6] the XMLHttpRequest object functions within a conform-
Internet Explorer versions 5 and 6 did not define the ing user agent based on the W3C Working Draft. As the
XMLHttpRequest object identifier in their scripting lan- W3C standard for the XMLHttpRequest object is still a
guages as the XMLHttpRequest identifier itself was not draft, user agents may not abide by all the functionings of
standard at the time of their releases.[6] Backward com- the W3C definition and any of the following is subject to
patibility can be achieved through object detection if the change. Extreme care should be taken into consideration
XMLHttpRequest identifier does not exist.[7] Microsoft when scripting with the XMLHttpRequest object across
added the XMLHttpRequest object identifier to its script- multiple user agents. This article will try to list the incon-
ing languages in Internet Explorer 7.0 released in October sistencies between the major user agents.
2006.[6]
The Mozilla project developed and implemented an in- The open method
terface called nsIXMLHttpRequest into the Gecko lay-
out engine. This interface was modeled to work as The HTTP and HTTPS requests of the XMLHttpRequest
closely to Microsoft’s IXMLHTTPRequest interface as object must be initialized through the open method. This
possible.[8][9] Mozilla created a wrapper to use this inter- method must be invoked prior to the actual sending of a
face through a JavaScript object which they called XML- request to validate and resolve the request method, URL,
HttpRequest.[10] The XMLHttpRequest object was acces- and URI user information to be used for the request. This
sible as early as Gecko version 0.6 released on Decem- method does not assure that the URL exists or the user
ber 6 of 2000,[11][12] but it was not completely functional information is correct. This method can accept up to five
until as late as version 1.0 of Gecko released on June parameters, but requires only two, to initialize a request.
5, 2002.[11][12] The XMLHttpRequest object became a de
open( Method, URL, Asynchronous, UserName, Pass-
facto standard in other major web clients, implemented
word )
in Safari 1.2 released in February 2004,[13] Konqueror,
Opera 8.0 released in April 2005,[14] and iCab 3.0b352The first parameter of the method is a text string indicat-
released in September 2005.[15] ing the HTTP request method to use. The request meth-
ods that must be supported by a conforming user agent,
With the advent of cross-browser JavaScript libraries
defined by the W3C draft for the XMLHttpRequest ob-
such as jQuery, developers can invoke XMLHttpRequest
ject, are currently listed as the following.[20]
functionality without coding directly to the API.

• GET (Supported by Internet Explorer 7 (and later),


2.4.2 Standards Mozilla 1+)

The World Wide Web Consortium published a Work- • POST (Supported by Internet Explorer 7 (and later),
ing Draft specification for the XMLHttpRequest object on Mozilla 1 (and later))
April 5, 2006, edited by Anne van Kesteren of Opera • HEAD (Supported by Internet Explorer 7 (and
Software and Dean Jackson of W3C.[16] Its goal is “to later))
document a minimum set of interoperable features based
on existing implementations, allowing Web developers to • PUT
2.4. XMLHTTPREQUEST 59

• DELETE gle parameter containing the content to be sent with the


request.
• OPTIONS (Supported by Internet Explorer 7 (and
send( Data )
later))
This parameter may be omitted if no content needs to be
sent. The W3C draft states that this parameter may be
However, request methods are not limited to the ones
any type available to the scripting language as long as it
listed above. The W3C draft states that a browser may
can be turned into a text string, with the exception of the
support additional request methods at their own discre-
DOM document object. If a user agent cannot serialise
tion.
the parameter, then the parameter should be ignored.
The second parameter of the method is another text Firefox 3.0.x and previous versions will however throw
string, this one indicating the URL of the HTTP request. an exception if send is called without an argument.[22]
The W3C recommends that browsers should raise an er-
If the parameter is a DOM document object, a user agent
ror and not allow the request of a URL with either a
should assure the document is turned into well-formed
different port or ihost URI component from the current
[21] XML using the encoding indicated by the inputEncoding
document.
property of the document object. If the Content-Type
The third parameter, a boolean value indicating whether request header was not added through setRequestHeader
or not the request will be asynchronous, is not a required yet, it should automatically be added by a conforming user
parameter by the W3C draft. The default value of this agent as “application/xml;charset=charset,” where charset
parameter should be assumed to be true by a W3C con- is the encoding used to encode the document.
forming user agent if it is not provided. An asynchronous
If the user agent is configured to use a proxy server, then
request (“true”) will not wait on a server response before
the XMLHttpRequest object will modify the request ap-
continuing on with the execution of the current script. It
propriately so as to connect to the proxy instead of the
will instead invoke the onreadystatechange event listener
origin server, and send Proxy-Authorization headers as
of the XMLHttpRequest object throughout the various
configured.
stages of the request. A synchronous request (“false”)
however will block execution of the current script until
the request has been completed, thus not invoking the on- The onreadystatechange event listener
readystatechange event listener.
The fourth and fifth parameters are the username and If the open method of the XMLHttpRequest object was
password, respectively. These parameters, or just the invoked with the third parameter set to true for an asyn-
username, may be provided for authentication and autho- chronous request, the onreadystatechange event listener
rization if required by the server for this request. will be automatically invoked for each of the following
actions that change the readyState property of the XML-
var xmlhttp; if (window.XMLHttpRequest) { xmlhttp = HttpRequest object.
new XMLHttpRequest(); xmlhttp.open(“GET”, filepath
, false); xmlhttp.send(null); } State changes work like this:

• After the open method has been invoked suc-


cessfully, the readyState property of the XML-
The setRequestHeader method HttpRequest object should be assigned a value of 1
(OPENED).
Upon successful initialization of a request, the setRe-
• After the send method has been invoked and the
questHeader method of the XMLHttpRequest object can
HTTP response headers have been received, the
be invoked to send HTTP headers with the request.
readyState property of the XMLHttpRequest ob-
setRequestHeader( Name, Value ) ject should be assigned a value of 2 (HEAD-
The first parameter of this method is the text string name ERS_RECEIVED).
of the header. The second parameter is the text string • Once the HTTP response content begins to load, the
value. This method must be invoked for each header that readyState property of the XMLHttpRequest ob-
needs to be sent with the request. Any headers attached ject should be assigned a value of 3 (LOADING).
here will be removed the next time the open method is
invoked in a W3C conforming user agent. • Once the HTTP response content has finished load-
ing, the readyState property of the XMLHttpRe-
quest object should be assigned a value of 4
The send method (DONE).

To send an HTTP request, the send method of the XML- The listener will only respond to state changes which oc-
HttpRequest must be invoked. This method accepts a sin- cur after the listener is defined. To detect states 1 and
60 CHAPTER 2. AJAX

2, the listener must be defined before the open method is Various alternatives exist to circumvent this security fea-
invoked. The open method must be invoked before the ture, including using JSONP, Cross-Origin Resource
send method is invoked. Sharing (CORS) or alternatives with plugins such as Flash
var request = new XMLHttpRequest(); re- or Silverlight. Cross-origin XMLHttpRequest is specified
[25]
quest.onreadystatechange = function () { var DONE in W3C’s XMLHttpRequest Level 2 specification. In-
= this.DONE || 4; if (this.readyState === DONE){ ternet Explorer did not implement CORS until version
alert(this.readyState); } }; request.open('GET', 10. The two previous versions (8 and 9) offered similar
'somepage.xml', true); request.setRequestHeader('X- functionality through the XDomainRequest API. CORS
is now supported by all modern browsers (desktop and
Requested-With', 'XMLHttpRequest'); // Tells server [26]
that this call is made for ajax purposes. // Most libraries mobile).
like jQuery/Prototype/Dojo do this request.send(null); // The CORS protocol has several restrictions, with two
No data needs to be sent along with the request. models of support. The simple model does not allow set-
ting custom request headers and omits cookies. Further,
only the HEAD, GET and POST request methods are
supported, and POST only allows the following MIME
The abort method types: “text/plain”, “application/x-www-urlencoded” and
"multipart/form-data". Only “text/plain” was initially
This method aborts the request if the readyState of the supported.[27] The other model detects when one of the
XMLHttpRequest object has not yet become 4.[23] The non-simple features are requested and sends a pre-flight
abort method ensures that the callback handler does not request [28] to the server to negotiate the feature.
get invoked during an asynchronous request.
abort( )
2.4.5 See also
Some AJAX libraries use the abort method to cancel po-
tential duplicate or out-of-order requests.[24] • WebSocket
• Representational State Transfer (REST)
The HTTP response
2.4.6 References
After a successful and completed call to the send method
of the XMLHttpRequest, if the server response was well- [1] “The responseXML attribute of the XMLHttpRequest ob-
formed XML and the Content-Type header sent by the ject explained by the W3C Working Draft”. W3.org. Re-
server is understood by the user agent as an Internet media trieved 2009-07-14.
type for XML, the responseXML property of the XML-
HttpRequest object will contain a DOM document ob- [2] “Response entity body of XMLHttpRequest, W3C Edi-
tor’s Draft”. W3.org. 2012-02-06. Retrieved 2012-02-
ject. Another property, responseText will contain the re-
05.
sponse of the server in plain text by a conforming user
agent, regardless of whether or not it was understood as [3] “The responseText attribute of the XMLHttpRequest ob-
XML. ject explained by the W3C Working Draft”. W3.org. Re-
trieved 2009-07-14.

[4] “Article on the history of XMLHTTP by an original devel-


2.4.4 Cross-domain requests oper”. Alexhopmann.com. 2007-01-31. Retrieved 2009-
07-14.
Main article: Cross-origin resource sharing
[5] “Specification of the IXMLHTTPRequest inter-
face from the Microsoft Developer Network”.
In the early development of the World Wide Web, it was Msdn.microsoft.com. Retrieved 2009-07-14.
found possible to breach users’ security by the use of
JavaScript to exchange information from one web site [6] Dutta, Sunava (2006-01-23). “Native XMLHTTPRe-
with that from another less reputable one. All mod- quest object”. IEBlog. Microsoft. Retrieved 2006-11-30.
ern browsers therefore implement a same origin pol- [7] “Ajax Reference (XMLHttpRequest object)". JavaScript
icy that prevents many such attacks, such as cross-site Kit. 2008-07-22. Retrieved 2009-07-14.
scripting. XMLHttpRequest data is subject to this se-
curity policy, but sometimes web developers want to in- [8] “Specification of the nsIXMLHttpRequest interface from
tentionally circumvent its restrictions. This is sometimes the Mozilla Developer Center”. Developer.mozilla.org.
2008-05-16. Retrieved 2009-07-14.
due to the legitimate use of subdomains as, for exam-
ple, making an XMLHttpRequest from a page created by [9] “Specification of the nsIJSXMLHttpRequest inter-
foo.example.com for information from bar.example.com face from the Mozilla Developer Center”. Devel-
will normally fail. oper.mozilla.org. 2009-05-03. Retrieved 2009-07-14.
2.4. XMLHTTPREQUEST 61

[10] “Specification of the XMLHttpRequest object from


the Mozilla Developer Center”. Developer.mozilla.org.
2009-05-03. Retrieved 2009-07-14.
[11] “Version history for the Mozilla Application Suite”.
Mozilla.org. Retrieved 2009-07-14.
[12] “Downloadable, archived releases for the Mozilla
browser”. Archive.mozilla.org. Retrieved 2009-07-14.
[13] “Archived news from Mozillazine stating the release date
of Safari 1.2”. Weblogs.mozillazine.org. Retrieved 2009-
07-14.
[14] “Press release stating the release date of Opera 8.0 from
the Opera website”. Opera.com. 2005-04-19. Retrieved
2009-07-14.
[15] Soft-Info.org. “Detailed browser information stating the
release date of iCab 3.0b352 from”. Soft-Info.com. Re-
trieved 2009-07-14.
[16] “Specification of the XMLHttpRequest object from the
Level 1 W3C Working Draft released on April 5th, 2006”.
W3.org. Retrieved 2009-07-14.
[17] “Specification of the XMLHttpRequest object from the
Level 2 W3C Working Draft released on February 25th,
2008”. W3.org. Retrieved 2009-07-14.
[18] “XMLHttpRequest Editor’s Draft 5 December 2011”.
w3.org. Retrieved 5 December 2011.
[19] https://xhr.spec.whatwg.org/
[20] “Dependencies of the XMLHttpRequest object explained
by the W3C Working Draft”. W3.org. Retrieved 2009-
07-14.
[21] “The “open” method of the XMLHttpRequest object ex-
plained by the W3C Working Draft”. W3.org. Retrieved
2009-10-13.
[22] Test-Driven JavaScript Development, Christian Johansen,
ADDISON-WESLEY, 2010, p. 270
[23] “XMLHttpRequest - Document Object Model (DOM)".
Mozilla. Retrieved 2013-04-05.
[24] “In-Order AJAX Handling”. Antradar Software. 2012-
03-10. Retrieved 2013-04-20.
[25] “XMLHttpRequest Level 2”. Retrieved 2013-11-14.
[26] “Can I use Cross-Origin Resource Sharing?". Retrieved
2013-11-14.
[27] “XDomainRequest - Restrictions, Limitations and
Workarounds”. Retrieved 2013-11-14.
[28] “7.1.5 Cross-Origin Request with Preflight”. Retrieved
2014-04-25.

2.4.7 External links


• XMLHttpRequest Living Standard by the
WHATWG
• XMLHttpRequest Level 1 draft by the W3C
Chapter 3

Data structures

3.1 XML age/svg+xml for SVG.


Further guidelines for the use of XML in a networked
In computing, Extensible Markup Language (XML) is context appear in RFC 3470, also known as IETF BCP
a markup language that defines a set of rules for encoding 70, a document covering many aspects of designing and
documents in a format that is both human-readable and deploying an XML-based language.
machine-readable. The W3C's XML 1.0 Specification[2]
and several other related specifications[3] —all of them
free open standards—define XML.[4] 3.1.2 Key terminology
The design goals of XML emphasize simplicity, gener-
ality, and usability across the Internet.[5] It is a textual The material in this section is based on the XML Specifi-
data format with strong support via Unicode for different cation. This is not an exhaustive list of all the constructs
human languages. Although the design of XML focuses that appear in XML; it provides an introduction to the key
on documents, the language is widely used for the repre- constructs most often encountered in day-to-day use.
sentation of arbitrary data structures[6] such as those used
in web services. Character An XML document is a string of characters.
Almost every legal Unicode character may appear in
Several schema systems exist to aid in the definition of
an XML document.
XML-based languages, while programmers have devel-
oped many application programming interfaces (APIs) to
aid the processing of XML data. Processor and application The processor analyzes the
markup and passes structured information to an ap-
plication. The specification places requirements on
3.1.1 Applications of XML what an XML processor must do and not do, but the
application is outside its scope. The processor (as
Hundreds of document formats using XML syntax the specification calls it) is often referred to collo-
have been developed,[7] including RSS, Atom, SOAP, quially as an XML parser.
SVG, and XHTML. XML-based formats have be-
come the default for many office-productivity tools, Markup and content The characters making up an
including Microsoft Office (Office Open XML), XML document are divided into markup and con-
OpenOffice.org and LibreOffice (OpenDocument), tent, which may be distinguished by the application
and Apple's iWork. XML has also provided the base of simple syntactic rules. Generally, strings that
language for communication protocols such as XMPP. constitute markup either begin with the character <
Applications for the Microsoft .NET Framework use and end with a >, or they begin with the character &
XML files for configuration. Apple has an implementa- and end with a ;. Strings of characters that are not
tion of a registry based on XML.[8] markup are content. However, in a CDATA section,
XML has come into common use for the interchange of the delimiters <![CDATA[ and ]]> are classified as
data over the Internet. IETF RFC 7303 gives rules for the markup, while the text between them is classified as
construction of Internet Media Types for use when send- content. In addition, whitespace before and after the
ing XML. It also defines the media types application/xml outermost element is classified as markup.
and text/xml, which say only that the data is in XML, and
nothing about its semantics. The use of text/xml has been Tag A tag is a markup construct that begins with < and
criticized as a potential source of encoding problems and ends with >. Tags come in three flavors:
it has been suggested that it should be deprecated.[9]
RFC 7303 also recommends that XML-based languages • start-tag, such as <section>;
be given media types ending in +xml; for example im- • end-tag, such as </section>;

62
3.1. XML 63

• empty-element tag, such as <line-break />. Unicode code points in the following ranges are valid in
XML 1.0 documents:[10]
Element An element is a logical document component
that either begins with a start-tag and ends with • U+0009 (Horizontal Tab), U+000A (Line Feed),
a matching end-tag or consists only of an empty- U+000D (Carriage Return): these are the only C0
element tag. The characters between the start- controls accepted in XML 1.0;
tag and end-tag, if any, are the element’s content,
and may contain markup, including other elements, • U+0020–U+D7FF, U+E000–U+FFFD: this ex-
which are called child elements. An example is cludes some (not all) non-characters in the BMP (all
<greeting>Hello, world!</greeting>. Another is surrogates, U+FFFE and U+FFFF are forbidden);
<line-break />. • U+10000–U+10FFFF: this includes all code points
in supplementary planes, including non-characters.
Attribute An attribute is a markup construct consist-
ing of a name–value pair that exists within a start- XML 1.1[11] extends the set of allowed characters to in-
tag or empty-element tag. An example is <img clude all the above, plus the remaining characters in the
src="madonna.jpg” alt="Madonna” />, where the range U+0001–U+001F. At the same time, however, it
names of the attributes are “src” and “alt”, and restricts the use of C0 and C1 control characters other
their values are “madonna.jpg” and “Madonna” than U+0009 (Horizontal Tab), U+000A (Line Feed),
respectively. Another example is <step num- U+000D (Carriage Return), and U+0085 (Next Line) by
ber="3">Connect A to B.</step>, where the name requiring them to be written in escaped form (for example
of the attribute is “number” and its value is “3”. An U+0001 must be written as &#x01; or its equivalent). In
XML attribute can only have a single value and each the case of C1 characters, this restriction is a backwards
attribute can appear at most once on each element. incompatibility; it was introduced to allow common en-
In the common situation where a list of multiple val- coding errors to be detected.
ues is desired, this must be done by encoding the list
into a well-formed XML attribute[note 1] with some The code point U+0000 (Null) is the only character that
format beyond what XML defines itself. Usually is not permitted in any XML 1.0 or 1.1 document.
this is either a comma or semi-colon delimited list
or, if the individual values are known not to con- Encoding detection
tain spaces,[note 2] a space-delimited list can be used.
<div class="inner greeting-box">Welcome!</div>,
The Unicode character set can be encoded into bytes for
where the attribute “class” has both the value “inner
storage or transmission in a variety of different ways,
greeting-box” and also indicates the two CSS class
called “encodings”. Unicode itself defines encodings
names “inner” and “greeting-box”. that cover the entire repertoire; well-known ones include
UTF-8 and UTF-16.[12] There are many other text encod-
XML declaration XML documents may begin with ings that predate Unicode, such as ASCII and ISO/IEC
an XML declaration that describes some informa- 8859; their character repertoires in almost every case are
tion about themselves. An example is <?xml ver- subsets of the Unicode character set.
sion="1.0” encoding="UTF-8"?>. XML allows the use of any of the Unicode-defined en-
codings, and any other encodings whose characters also
appear in Unicode. XML also provides a mechanism
3.1.3 Characters and escaping
whereby an XML processor can reliably, without any
XML documents consist entirely of characters from the prior [13] knowledge, determine which encoding is being
Unicode repertoire. Except for a small number of specif- used. Encodings other than UTF-8 and UTF-16 are
ically excluded control characters, any character defined not necessarily recognized by every XML parser.
by Unicode may appear within the content of an XML
document. Escaping
XML includes facilities for identifying the encoding of
the Unicode characters that make up the document, and XML provides escape facilities for including characters
for expressing characters that, for one reason or another, that are problematic to include directly. For example:
cannot be used directly.
• The characters "<" and "&" are key syntax markers
and may never appear in content outside a CDATA
Valid characters section.[14]
Main article: Valid characters in XML • Some character encodings support only a subset of
Unicode. For example, it is legal to encode an XML
64 CHAPTER 3. DATA STRUCTURES

document in ASCII, but ASCII lacks code points for attributes, comments, character data, and processing in-
Unicode characters such as "é". structions (other than the ones that have special symbolic
meaning in XML itself, such as the less-than sign, "<").
• It might not be possible to type the character on the The following is a well-formed XML document including
author’s machine. Chinese, Armenian and Cyrillic characters:
• Some characters have glyphs that cannot be visually <?xml version="1.0” encoding="UTF-8"?> <
distinguished from other characters, such as the non- լեզու="ռուսերեն">данные</ >
breaking space (&#xa0;) " " and the space (&#x20;)
" ", and the Cyrillic capital letter A (&#x410;) "А"
and the Latin capital letter A (&#x41;) “A”.
3.1.4 Well-formedness and error-handling
There are five predefined entities:
Main article: Well-formed document
• &lt; represents "<";
• &gt; represents ">"; The XML specification defines an XML document as a
well-formed text, meaning that it satisfies a list of syntax
• &amp; represents "&"; rules provided in the specification. Some key points in
• &apos; represents "'"; the fairly lengthy list include:

• &quot; represents '"'.


• The document contains only properly encoded legal
Unicode characters.
All permitted Unicode characters may be represented
with a numeric character reference. Consider the Chi-
• None of the special syntax characters such as < and
nese character " ", whose numeric code in Unicode is
& appear except when performing their markup-
hexadecimal 4E2D, or decimal 20,013. A user whose
delineation roles.
keyboard offers no method for entering this character
could still insert it in an XML document encoded either as
&#20013; or &#x4e2d;. Similarly, the string “I <3 Jörg” • The start-tag, end-tag, and empty-element tag that
could be encoded for inclusion in an XML document as delimit elements are correctly nested, with none
I &lt;3 J&#xF6;rg. missing and none overlapping.

&#0; is not permitted, however, because the null charac- • Tag names are case-sensitive; the start-tag and end-
ter is one of the control characters excluded from XML, tag must match exactly.
even when using a numeric character reference.[15] An al-
ternative encoding mechanism such as Base64 is needed
• Tag names cannot contain any of the characters
to represent such characters.
!"#$%&'()*+,/;<=>?@[\]^`{|}~, nor a space char-
acter, and cannot begin with "-", ".”, or a numeric
Comments digit.

Comments may appear anywhere in a document outside • A single root element contains all the other elements.
other markup. Comments cannot appear before the XML
declaration. Comments begin with <!-- and end with --
The definition of an XML document excludes texts that
>. For compatibility with SGML, the string "--" (double-
hyphen) is not allowed inside comments;[16] this means contain violations of well-formedness rules; they are sim-
comments cannot be nested. The ampersand has no spe- ply not XML. An XML processor that encounters such a
cial significance within comments, so entity and charac-violation is required to report such errors and to cease
normal processing. This policy, occasionally referred to
ter references are not recognized as such, and there is no
as "draconian error handling,” stands in notable contrast
way to represent characters outside the character set of
the document encoding. to the behavior of programs that process HTML, which
are designed to produce a reasonable result even in the
An example of a valid comment: <!--no need to escape presence of severe markup errors.[17] XML’s policy in
<code> & such in comments--> this area has been criticized as a violation of Postel’s law
(“Be conservative in what you send; be liberal in what you
accept”).[18]
International use
The XML specification defines a valid XML document
XML 1.0 (Fifth Edition) and XML 1.1 support the direct as a well-formed XML document which also conforms to
use of almost any Unicode character in element names, the rules of a Document Type Definition (DTD).[19] [20]
3.1. XML 65

3.1.5 Schemas and validation • They use a syntax based on regular expression syn-
tax, inherited from SGML, to describe the schema.
In addition to being well-formed, an XML document may Typical XML APIs such as SAX do not attempt to
be valid. This means that it contains a reference to a offer applications a structured representation of the
Document Type Definition (DTD), and that its elements syntax, so it is less accessible to programmers than
and attributes are declared in that DTD and follow the an element-based syntax may be.
grammatical rules for them that the DTD specifies.
XML processors are classified as validating or non-
validating depending on whether or not they check XML Two peculiar features that distinguish DTDs from other
documents for validity. A processor that discovers a va- schema types are the syntactic support for embedding a
lidity error must be able to report it, but may continue DTD within XML documents and for defining entities,
normal processing. which are arbitrary fragments of text and/or markup that
the XML processor inserts in the DTD itself and in the
A DTD is an example of a schema or grammar. Since the XML document wherever they are referenced, like char-
initial publication of XML 1.0, there has been substan- acter escapes.
tial work in the area of schema languages for XML. Such
schema languages typically constrain the set of elements DTD technology is still used in many applications be-
that may be used in a document, which attributes may be cause of its ubiquity.
applied to them, the order in which they may appear, and
the allowable parent/child relationships.
XML Schema
Document Type Definition
Main article: XML Schema (W3C)
Main article: Document Type Definition
A newer schema language, described by the W3C as the
The oldest schema language for XML is the Document successor of DTDs, is XML Schema, often referred to by
Type Definition (DTD), inherited from SGML. the initialism for XML Schema instances, XSD (XML
Schema Definition). XSDs are far more powerful than
DTDs have the following benefits:
DTDs in describing XML languages. They use a rich
datatyping system and allow for more detailed constraints
• DTD support is ubiquitous due to its inclusion in the on an XML document’s logical structure. XSDs also use
XML 1.0 standard. an XML-based format, which makes it possible to use
ordinary XML tools to help process them.
• DTDs are terse compared to element-based schema
languages and consequently present more informa- xs:schema element that defines a schema:
tion in a single screen. <?xml version="1.0” encoding="ISO-8859-1” ?>
• DTDs allow the declaration of standard public entity <xs:schema xmlns:xs=\char"0022\relax{}http:
sets for publishing characters. //www.w3.org/2001/XMLSchema"></xs:schema>

• DTDs define a document type rather than the types


used by a namespace, thus grouping all constraints
for a document in a single collection.
RELAX NG
DTDs have the following limitations:
RELAX NG (Regular Language for XML Next Genera-
tion) was initially specified by OASIS and is now also an
• They have no explicit support for newer features of ISO/IEC standard (Part 2: Regular-grammar-based val-
XML, most importantly namespaces. idation of the ISO/IEC standard DSDL). RELAX NG
• They lack expressiveness. XML DTDs are simpler schemas may be written in either an XML based syn-
than SGML DTDs and there are certain structures tax or a more compact non-XML syntax; the two syn-
that cannot be expressed with regular grammars. taxes are isomorphic and James Clark's conversion tool—
DTDs only support rudimentary datatypes. Trang—can convert between them without loss of infor-
mation. RELAX NG has a simpler definition and valida-
• They lack readability. DTD designers typically tion framework than XML Schema, making it easier to
make heavy use of parameter entities (which behave use and implement. It also has the ability to use datatype
essentially as textual macros), which make it easier framework plug-ins; a RELAX NG schema author, for
to define complex grammars, but at the expense of example, can require values in an XML document to con-
clarity. form to definitions in XML Schema Datatypes.
66 CHAPTER 3. DATA STRUCTURES

Schematron • XSL (Extensible Stylesheet Language) is a family of


languages used to transform and render XML doc-
Schematron is a language for making assertions about the uments, split into three parts:
presence or absence of patterns in an XML document. It
typically uses XPath expressions. Schematron is now also • XSLT (XSL Transformations), an XML
an ISO/IEC standard (Part 3: Rule-based validation of language for transforming XML docu-
the ISO/IEC standard DSDL). ments into other XML documents or
other formats such as HTML, plain text,
DSDL and other schema languages or XSL-FO. XSLT is very tightly cou-
pled with XPath, which it uses to ad-
DSDL (Document Schema Definition Languages) is dress components of the input XML doc-
a multi-part ISO/IEC standard (ISO/IEC 19757) that ument, mainly elements and attributes.
brings together a comprehensive set of small schema lan- • XSL-FO (XSL Formatting Objects), an
guages, each targeted at specific problems. DSDL in- XML language for rendering XML doc-
cludes RELAX NG full and compact syntax, Schematron uments, often used to generate PDFs.
assertion language, and languages for defining datatypes,
• XPath (XML Path Language), a non-
character repertoire constraints, renaming and entity ex-
XML language for addressing the com-
pansion, and namespace-based routing of document frag-
ponents (elements, attributes, and so on)
ments to different validators. DSDL schema languages
of an XML document. XPath is widely
do not have the vendor support of XML Schemas yet,
used in other core-XML specifications
and are to some extent a grassroots reaction of indus-
and in programming libraries for access-
trial publishers to the lack of utility of XML Schemas
ing XML-encoded data.
for publishing.
Some schema languages not only describe the structure of • XQuery (XML Query) is an XML query language
a particular XML format but also offer limited facilities strongly rooted in XPath and XML Schema. It
to influence processing of individual XML files that con- provides methods to access, manipulate and return
form to this format. DTDs and XSDs both have this abil- XML, and is mainly conceived as a query language
ity; they can for instance provide the infoset augmentation for XML databases.
facility and attribute defaults. RELAX NG and Schema-
tron intentionally do not provide these. • XML Signature defines syntax and processing rules
for creating digital signatures on XML content.

3.1.6 Related specifications • XML Encryption defines syntax and processing


rules for encrypting XML content.
A cluster of specifications closely related to XML have
been developed, starting soon after the initial publica- Some other specifications conceived as part of the
tion of XML 1.0. It is frequently the case that the term “XML Core” have failed to find wide adoption, includ-
“XML” is used to refer to XML together with one or more ing XInclude, XLink, and XPointer.
of these other technologies that have come to be seen as
part of the XML core.
3.1.7 Programming interfaces
• XML namespaces enable the same document to
contain XML elements and attributes taken from The design goals of XML include, “It shall be easy to
different vocabularies, without any naming colli- write programs which process XML documents.”[5] De-
sions occurring. Although XML Namespaces are spite this, the XML specification contains almost no in-
not part of the XML specification itself, virtually all formation about how programmers might go about doing
XML software also supports XML Namespaces. such processing. The XML Infoset specification provides
• XML Base defines the xml:base attribute, which a vocabulary to refer to the constructs within an XML
may be used to set the base for resolution of relative document, but also does not provide any guidance on how
URI references within the scope of a single XML to access this information. A variety of APIs for access-
element. ing XML have been developed and used, and some have
been standardized.
• XML Information Set or XML Infoset is an ab-
stract data model for XML documents in terms of Existing APIs for XML processing tend to fall into these
information items. The infoset is commonly used categories:
in the specifications of XML languages, for conve-
nience in describing constraints on the XML con- • Stream-oriented APIs accessible from a program-
structs those languages allow. ming language, for example SAX and StAX.
3.1. XML 67

• Tree-traversal APIs accessible from a programming A pull parser creates an iterator that sequentially visits the
language, for example DOM. various elements, attributes, and data in an XML docu-
ment. Code that uses this iterator can test the current item
• XML data binding, which provides an auto- (to tell, for example, whether it is a start-tag or end-tag, or
mated translation between an XML document and text), and inspect its attributes (local name, namespace,
programming-language objects. values of XML attributes, value of text, etc.), and can
• Declarative transformation languages such as XSLT also move the iterator to the next item. The code can
and XQuery. thus extract information from the document as it traverses
it. The recursive-descent approach tends to lend itself to
keeping data as typed local variables in the code doing
Stream-oriented facilities require less memory and, for
the parsing, while SAX, for instance, typically requires
certain tasks based on a linear traversal of an XML docu-
a parser to manually maintain intermediate data within a
ment, are faster and simpler than other alternatives. Tree-
stack of elements that are parent elements of the element
traversal and data-binding APIs typically require the use
being parsed. Pull-parsing code can be more straightfor-
of much more memory, but are often found more conve-
ward to understand and maintain than SAX parsing code.
nient for use by programmers; some include declarative
retrieval of document components via the use of XPath
expressions. Document Object Model
XSLT is designed for declarative description of XML
document transformations, and has been widely imple- Main article: Document Object Model
mented both in server-side packages and Web browsers.
XQuery overlaps XSLT in its functionality, but is de- Document Object Model (DOM) is an API that allows
signed more for searching of large XML databases. for navigation of the entire document as if it were a tree
of node objects representing the document’s contents. A
Simple API for XML DOM document can be created by a parser, or can be gen-
erated manually by users (with limitations). Data types in
Main article: Simple API for XML DOM nodes are abstract; implementations provide their
own programming language-specific bindings. DOM im-
plementations tend to be memory intensive, as they gen-
Simple API for XML (SAX) is a lexical, event-driven erally require the entire document to be loaded into mem-
API in which a document is read serially and its contents ory and constructed as a tree of objects before access is
are reported as callbacks to various methods on a handler allowed.
object of the user’s design. SAX is fast and efficient to
implement, but difficult to use for extracting information
at random from the XML, since it tends to burden the Data binding
application author with keeping track of what part of the
document is being processed. It is better suited to situ- XML data binding is the binding of XML documents to
ations in which certain types of information are always a hierarchy of custom and strongly typed objects, in con-
handled the same way, no matter where they occur in the trast to the generic objects created by a DOM parser.
document. This approach simplifies code development, and in many
cases allows problems to be identified at compile time
rather than run-time. Example data binding systems in-
Pull parsing clude the Java Architecture for XML Binding (JAXB)
and XML Serialization in .NET Framework.[22]
Pull parsing[21] treats the document as a series of items
read in sequence using the iterator design pattern. This
allows for writing of recursive descent parsers in which XML as data type
the structure of the code performing the parsing mir-
rors the structure of the XML being parsed, and inter- XML has appeared as a first-class data type in other lan-
mediate parsed results can be used and accessed as lo- guages. The ECMAScript for XML (E4X) extension to
cal variables within the methods performing the parsing, the ECMAScript/JavaScript language explicitly defines
or passed down (as method parameters) into lower-level two specific objects (XML and XMLList) for JavaScript,
methods, or returned (as method return values) to higher- which support XML document nodes and XML node
level methods. Examples of pull parsers include StAX lists as distinct objects and use a dot-notation specify-
in the Java programming language, XMLPullParser in ing parent-child relationships.[23] E4X is supported by
Smalltalk, XMLReader in PHP, ElementTree.iterparse the Mozilla 2.5+ browsers (though now deprecated) and
in Python, System.Xml.XmlReader in the .NET Frame- Adobe Actionscript, but has not been adopted more uni-
work, and the DOM traversal API (NodeIterator and versally. Similar notations are used in Microsoft’s LINQ
TreeWalker). implementation for Microsoft .NET 3.5 and above, and
68 CHAPTER 3. DATA STRUCTURES

in Scala (which uses the Java VM). The open-source Sources


xmlsh application, which provides a Linux-like shell with
special features for XML manipulation, similarly treats XML is a profile of an ISO standard SGML, and most
XML as a data type, using the <[ ]> notation.[24] The of XML comes from SGML unchanged. From SGML
Resource Description Framework defines a data type rdf: comes the separation of logical and physical structures
XMLLiteral to hold wrapped, canonical XML.[25] Face- (elements and entities), the availability of grammar-based
book has produced extensions to the PHP and JavaScript validation (DTDs), the separation of data and metadata
languages that add XML to the core syntax in a similar (elements and attributes), mixed content, the separation
fashion to E4X, namely XHP and JSX respectively. of processing from representation (processing instruc-
tions), and the default angle-bracket syntax. Removed
were the SGML declaration (XML has a fixed delimiter
3.1.8 History set and adopts Unicode as the document character set).
Other sources of technology for XML were the TEI (Text
XML is an application profile of SGML (ISO 8879).[26] Encoding Initiative), which defined a profile of SGML
The versatility of SGML for dynamic information dis- for use as a “transfer syntax"; and HTML, in which el-
play was understood by early digital media publishers in ements were synchronous with their resource, document
the late 1980s prior to the rise of the Internet.[27][28] By character sets were separate from resource encoding, the
the mid-1990s some practitioners of SGML had gained xml:lang attribute was invented, and (like HTTP) meta-
experience with the then-new World Wide Web, and be- data accompanied the resource rather than being needed
lieved that SGML offered solutions to some of the prob- at the declaration of a link. The ERCS(Extended Ref-
lems the Web was likely to face as it grew. Dan Con- erence Concrete Syntax) project of the SPREAD (Stan-
nolly added SGML to the list of W3C’s activities when he dardization Project Regarding East Asian Documents)
joined the staff in 1995; work began in mid-1996 when project of the ISO-related China/Japan/Korea Document
Sun Microsystems engineer Jon Bosak developed a char- Processing expert group was the basis of XML 1.0’s nam-
ter and recruited collaborators. Bosak was well connected ing rules; SPREAD also introduced hexadecimal numeric
in the small community of people who had experience character references and the concept of references to
both in SGML and the Web.[29] make available all Unicode characters. To support ERCS,
XML and HTML better, the SGML standard IS 8879 was
XML was compiled by a working group of eleven revised in 1996 and 1998 with WebSGML Adaptations.
members,[30] supported by a (roughly) 150-member In- The XML header followed that of ISO HyTime.
terest Group. Technical debate took place on the Interest
Group mailing list and issues were resolved by consen- Ideas that developed during discussion that are novel
sus or, when that failed, majority vote of the Working in XML included the algorithm for encoding detection
Group. A record of design decisions and their rationales and the encoding header, the processing instruction tar-
was compiled by Michael Sperberg-McQueen on Decem- get, the xml:space attribute, and the new close delimiter
ber 4, 1997.[31] James Clark served as Technical Lead for empty-element tags. The notion of well-formedness
of the Working Group, notably contributing the empty- as opposed to validity (which enables parsing without a
element "<empty />" syntax and the name “XML”. Other schema) was first formalized in XML, although it had
names that had been put forward for consideration in- been implemented successfully in the Electronic Book
cluded “MAGMA” (Minimal Architecture for Gener- Technology “Dynatext” software;[34] the software from
alized Markup Applications), “SLIM” (Structured Lan- the University of Waterloo New Oxford English Dictio-
guage for Internet Markup) and “MGML” (Minimal Gen- nary Project; the RISP LISP SGML text processor at
eralized Markup Language). The co-editors of the speci- Uniscope, Tokyo; the US Army Missile Command IADS
fication were originally Tim Bray and Michael Sperberg- hypertext system; Mentor Graphics Context; Interleaf
McQueen. Halfway through the project Bray accepted and Xerox Publishing System.
a consulting engagement with Netscape, provoking vo-
ciferous protests from Microsoft. Bray was temporarily
asked to resign the editorship. This led to intense dispute Versions
in the Working Group, eventually solved by the appoint-
ment of Microsoft’s Jean Paoli as a third co-editor. There are two current versions of XML. The first (XML
The XML Working Group never met face-to-face; the de- 1.0) was initially defined in 1998. It has undergone minor
sign was accomplished using a combination of email and revisions since then, without being given a new version
weekly teleconferences. The major design decisions were number, and is currently in its fifth edition, as published
reached in a short burst of intense work between August on November 26, 2008. It is widely implemented and still
and November 1996,[32] when the first Working Draft of recommended for general use.
an XML specification was published.[33] Further design The second (XML 1.1) was initially published on Febru-
work continued through 1997, and XML 1.0 became a ary 4, 2004, the same day as XML 1.0 Third Edition,[35]
W3C Recommendation on February 10, 1998. and is currently in its second edition, as published on Au-
3.1. XML 69

gust 16, 2006. It contains features (some contentious) 3.1.9 Criticism


that are intended to make XML easier to use in certain
cases.[36] The main changes are to enable the use of line- XML and its extensions have regularly been criticized
ending characters used on EBCDIC platforms, and the for verbosity and complexity.[40] Mapping the basic tree
use of scripts and characters absent from Unicode 3.2. model of XML to type systems of programming lan-
XML 1.1 is not very widely implemented and is rec- guages or databases can be difficult, especially when
ommended for use only by those who need its unique XML is used for exchanging highly structured data be-
features.[37] tween applications, which was not its primary design goal.
Other criticisms attempt to refute the claim that XML is a
Prior to its fifth edition release, XML 1.0 differed from
self-describing language[41] (though the XML specifica-
XML 1.1 in having stricter requirements for characters
tion itself makes no such claim). JSON, YAML, and S-
available for use in element and attribute names and
Expressions are frequently proposed as alternatives (see
unique identifiers: in the first four editions of XML 1.0
Comparison of data serialization formats);[42] that focus
the characters were exclusively enumerated using a spe-
on representing highly structured data rather than doc-
cific version of the Unicode standard (Unicode 2.0 to
uments, which may contain both highly structured and
Unicode 3.2.) The fifth edition substitutes the mecha-
relatively unstructured content.
nism of XML 1.1, which is more future-proof but re-
duces redundancy. The approach taken in the fifth edi-
tion of XML 1.0 and in all editions of XML 1.1 is that
3.1.10 3dm
only certain characters are forbidden in names, and ev-
erything else is allowed to accommodate suitable name
3dm is or was a tool for performing three-way merging
characters in future Unicode versions. In the fifth edi-
and differencing of XML files. Unlike line-based tools,
tion, XML names may contain characters in the Balinese,
such as diff and diff3, 3dm is aware of the tree structure
Cham, or Phoenician scripts among many others added to
of the input documents. 3dm detects and merges subtree
Unicode since Unicode 3.2.[36]
update, insert, delete, and move operations. The tool is
Almost any Unicode code point can be used in the char- not reliant on edit histories; the only input needed are the
acter data and attribute values of an XML 1.0 or 1.1 doc- XML files.[43][44]
ument, even if the character corresponding to the code
point is not defined in the current version of Unicode.
In character data and attribute values, XML 1.1 allows 3.1.11 See also
the use of more control characters than XML 1.0, but,
for “robustness”, most of the control characters intro- • List of XML markup languages
duced in XML 1.1 must be expressed as numeric charac-
ter references (and #x7F through #x9F, which had been • List of XML schemas
allowed in XML 1.0, are in XML 1.1 even required to be • Comparison of layout engines (XML)
expressed as numeric character references[38] ). Among
the supported control characters in XML 1.1 are two line • Comparison of data serialization formats
break codes that must be treated as whitespace. Whites-
pace characters are the only control codes that can be • Binary XML
written directly.
• EBML
There has been discussion of an XML 2.0, although no
organization has announced plans for work on such a • WBXML
project. XML-SW (SW for skunkworks), written by one
of the original developers of XML,[39] contains some pro- • XHTML
posals for what an XML 2.0 might look like: elimination • XML Protocol
of DTDs from syntax, integration of namespaces, XML
Base and XML Information Set into the base standard.
The World Wide Web Consortium also has an XML Bi- 3.1.12 Notes
nary Characterization Working Group doing preliminary
research into use cases and properties for a binary encod- [1] i.e., embedded quote characters would be a problem
ing of XML Information Set. The working group is not [2] A common example of this is CSS class or identifier
chartered to produce any official standards. Since XML names.
is by definition text-based, ITU-T and ISO are using the
name Fast Infoset for their own binary infoset to avoid
confusion (see ITU-T Rec. X.891 and ISO/IEC 24824- 3.1.13 References
1).
[1] “XML Media Types, RFC 7303”. Internet Engineering
Task Force. July 2014.
70 CHAPTER 3. DATA STRUCTURES

[2] “XML 1.0 Specification”. World Wide Web Consortium. [26] “ISO/IEC 19757-3”. ISO/IEC. 1 June 2006: vi.
Retrieved 22 August 2010.
[27] Bray, Tim (February 2005). “A conversation with Tim
[3] “XML and Semantic Web W3C Standards Timeline” Bray: Searching for ways to tame the world’s vast stores
(PDF). Retrieved 14 August 2016. of information”. Association for Computing Machinery’s
[4] “W3C DOCUMENT LICENSE”. “Queue site”. Retrieved 16 April 2006.

[5] “XML 1.0 Origin and Goals”. Retrieved 14 August 2016. [28] edited by Sueann Ambron; Kristina Hooper & foreword
by John Sculley. (1988). “Publishers, multimedia, and
[6] Fennell, Philip (June 2013). “Extremes interactivity”. Interactive multimedia. Cobb Group. ISBN
of XML”. XML London 2013: 80–86. 1-55615-124-1.
doi:10.14337/XMLLondon13.Fennell01. ISBN
978-0-9926471-0-0. [29] Eliot Kimber (2006). “XML is 10”.
[7] “XML Applications and Initiatives”.
[30] The working group was originally called the “Editorial Re-
[8] “appleexaminer.com: “PLIST files"". The Apple Exam- view Board.” The original members and seven who were
iner. added before the first edition was complete, are listed at
the end of the first edition of the XML Recommendation,
[9] M. Murata; D. Kohn & C. Lilley (24 September 2009). at http://www.w3.org/TR/1998/REC-xml-19980210.
“Internet Drafts: XML Media Types”. Internet Engineer-
ing Task Force. Retrieved 29 February 2012.
[31] “Reports From the W3C SGML ERB to the SGML
[10] “Extensible Markup Language (XML) 1.0 (Fifth Edi- WG And from the W3C XML ERB to the XML SIG”.
tion)". World Wide Web Consortium. 2008-11-26. Re- W3.org. Retrieved 31 July 2009.
trieved 23 November 2012.
[32] Jon Bosak: The Birth of XML
[11] “Extensible Markup Language (XML) 1.1 (Second Edi-
tion)". World Wide Web Consortium. Retrieved 22 Au- [33] “Extensible Markup Language (XML)". W3.org. 1996-
gust 2010. 11-14. Retrieved 31 July 2009.
[12] “Characters vs. Bytes”.
[34] Jon Bosak; Sun Microsystems (2006-12-07). “Closing
[13] “Autodetection of Character Encodings”. Keynote, XML 2006”. 2006.xmlconference.org.
Archived from the original on 2007-07-11. Retrieved 31
[14] It is allowed, but not recommended, to use "<" in XML July 2009.
entity values: Extensible Markup Language (XML) 1.0
(Fifth Edition): EntityValue definition [35] “Extensible Markup Language (XML) 1.0 (Third Edi-
tion)". W3.org. Retrieved 22 August 2010.
[15] “W3C I18N FAQ: HTML, XHTML, XML and Control
Codes”.
[36] “Extensible Markup Language (XML) 1.1 (Second Edi-
[16] “Extensible Markup Language (XML)". W3C. Section tion) , Rationale and list of changes for XML 1.1”. W3C.
“Comments” Retrieved 20 January 2012.

[17] Pilgrim, Mark (2004). “The history of draconian error [37] Harold, Elliotte Rusty (2004). Effective XML. Addison-
handling in XML”. Archived from the original on 2011- Wesley. pp. 10–19. ISBN 0-321-15040-6.
07-26. Retrieved 18 July 2013.
[38] “Extensible Markup Language (XML) 1.1 (Second Edi-
[18] “There are no exceptions to Postel’s Law [dive into
tion)". W3.org. Retrieved 22 August 2010.
mark]". Web.archive.org. Archived from the original on
2011-05-14. Retrieved 22 April 2013.
[39] Tim Bray: Extensible Markup Language, SW (XML-SW).
[19] “XML Notepad”. 2002-02-10

[20] “XML Notepad 2007”. [40] Jeff Atwood (2009): XML: The Angle Bracket Tax
[21] Push, Pull, Next! by Bob DuCharme, at XML.com
[41] “The Myth of Self-Describing XML” (PDF). September
[22] “XML Serialization in the .NET Framework”. 2003.
Msdn.microsoft.com. Retrieved 31 July 2009.
[42] Stackoverflow: What usable alternatives to XML syntax
[23] “Processing XML with E4X”. Mozilla Developer Center. do you know?
Mozilla Foundation.

[24] “XML Shell: Core Syntax”. xmlsh. 2010-05-13. Re- [43] Tancred Lindholm (2004). “A Three-way Merge for
trieved 22 August 2010. XML Documents”. ACM Symposium on Document En-
gineering.
[25] “Resource Description Framework (RDF): Concepts and
Abstract Syntax”. W3.org. Retrieved 22 August 2010. [44] http://tdm.berlios.de/ - The homepage of 3dm
3.2. JSON 71

3.1.14 Further reading JSON is a language-independent data format. It was de-


rived from JavaScript, but as of 2017 many programming
• Annex A of ISO 8879:1986 (SGML) languages include code to generate and parse JSON-
format data. The official Internet media type for JSON is
• Lawrence A. Cunningham (2005). “Language, application/json. JSON filenames use the extension .json.
Deals and Standards: The Future of XML Con-
tracts”. Washington University Law Review. SSRN Douglas Crockford originally specified the JSON format
in the early 2000s; two competing standards, RFC 7159
900616 .
and ECMA-404, defined it in 2013. The ECMA standard
• Bosak, Jon; Bray, Tim (May 1999). “XML and describes only the allowed syntax, whereas the RFC cov-
[2]
the Second-Generation Web”. Scientific American. ers some security and interoperability considerations.
Archived from the original on 1 October 2009. RFC 7493 defines a restricted profile of JSON, known
as I-JSON (short for “Internet JSON”), which seeks to
• Kelly, Sean (February 6, 2006). “Making Mistakes
overcome some of the interoperability problems with
with XML”. Developer.com. Retrieved 26 October
JSON. Every I-JSON document is a valid JSON docu-
2010.
ment but not every valid JSON document is a valid I-
[3]
• St. Laurent, Simon (February 12, 2003). “Five JSON document.
years later, XML..”. O'Reilly XML Blog. O'Reilly
Media. Retrieved 26 October 2010.
3.2.1 History
• “W3C XML is Ten!". World Wide Web Consor-
tium. 12 February 2008. Retrieved 26 October
2010.

• “Introduction to XML” (PDF). Course Slides. Pierre


Geneves. October 2012.

3.1.15 External links


• W3C XML homepage

• XML 1.0 Specification

• Retrospective on Extended Reference Concrete


Syntax by Rick Jelliffe

• XML, Java and the Future of the Web (1997) by Jon


Bosak

• http://validator.w3.org/ The Official [W3C]


Markup Validation Service

• The XML FAQ originally for the W3C’s XML SIG


by Peter Flynn

3.2 JSON Douglas Crockford first specified JSON. Image from 2007.

“Json” redirects here. For people with similar names, JSON grew out of a need for stateful, real-time server-to-
see J Son. browser communication protocol without using browser
plugins such as Flash or Java applets, the dominant meth-
In computing, JSON (canonically pronounced /ˈdʒeɪsən/ ods used in the early 2000s.
JAY-sən;[1] sometimes JavaScript Object Notation) is Douglas Crockford first specified[4] and popularized the
an open-standard format that uses human-readable text to JSON format. The acronym originated at State Software
transmit data objects consisting of attribute–value pairs. (originally named Veil Networks, Inc.), a company co-
It is the most common data format used for asynchronous founded by Crockford, F. Randall “Randy” Farmer (left
browser/server communication, largely replacing XML, to work at 3DO), Greg Macdonald, Chip Morningstar,
and is used by AJAX. Robert F. Napiltonia and Dominik Zynis in March 2001.
72 CHAPTER 3. DATA STRUCTURES

State Software was funded by Tesla Ventures with $1.8 2013 as the ECMA-404 standard.[12] In the same year
Million in October 2011, and attempted to trademark RFC 7158 used ECMA-404 as reference. In 2014 RFC
the word “State”. The co-founders agreed to build a sys- 7159 became the main reference for JSON’s internet uses
tem that used standard browser capabilities and provided (ex. MIME application/json), and obsoletes RFC 4627
an abstraction layer for Web developers to create state- and RFC 7158 (but preserving ECMA-262 and ECMA-
ful Web applications that had a persistent duplex connec- 404 as main references).
tion to a Web server by holding two HTTP connections
open and recycling them before standard browser time-
outs if no further data were exchanged. The co-founders 3.2.2 Data types, syntax and example
had a round-table discussion and voted whether to call the
data format JSML or JSON, as well as under what license JSON’s basic data types are:
type to make it available. Crockford, being inspired by
the words of then President Bush, should also be cred-
ited with coming up with the “evil-doers” JSON license • Number: a signed decimal number that may contain
(“The Software shall be used for Good, not Evil.”) in or- a fractional part and may use exponential E nota-
der to open-source the JSON libraries, but force (troll) tion, but cannot include non-numbers like NaN. The
corporate lawyers, or those who are overly pedantic, to format makes no distinction between integer and
seek to pay for a license from State. Morningstar de- floating-point. JavaScript uses a double-precision
veloped the idea for the State Application Framework at floating-point format for all its numeric values, but
State Software.[5][6] On the other hand, this clause lead to other languages implementing JSON may encode
license compatibility problems of the JSON license with numbers differently.
other open-source licenses.[7]
A precursor to the JSON libraries was used in a chil- • String: a sequence of zero or more Unicode char-
dren’s digital asset trading game project named Cartoon acters. Strings are delimited with double-quotation
Orbit at Communities.com (the State co-founders had marks and support a backslash escaping syntax.
all worked at this company previously) for Cartoon Net-
work, which used a browser side plug-in with a propri- • Boolean: either of the values true or false
etary messaging format to manipulate DHTML elements
(this system is also owned by 3DO). Upon discovery of • Array: an ordered list of zero or more values,
early Ajax capabilities, digiGroups, Noosh, and others each of which may be of any type. Arrays
used frames to pass information into the user browsers’ use square bracket notation with elements being
visual field without refreshing a Web application’s visual comma-separated.
context, realizing real-time rich Web applications using
only the standard HTTP, HTML and JavaScript capa- • Object: an unordered collection of name/value pairs
bilities of Netscape 4.0.5+ and IE 5+. Crockford then where the names (also called keys) are strings. Since
found that JavaScript could be used as an object-based objects are intended to represent associative ar-
messaging format for such a system. The system was rays,[12] it is recommended, though not required,[13]
sold to Sun Microsystems, Amazon.com and EDS. The that each key is unique within an object. Objects
JSON.org Web site was launched in 2002. In December are delimited with curly brackets and use commas
2005, Yahoo! began offering some of its Web services to separate each pair, while within each pair the
in JSON.[8] Google started offering JSON feeds for its colon ':' character separates the key or name from
GData web protocol in December 2006.[9] its value.
JSON was originally intended to be a subset of the
JavaScript scripting language (specifically, Standard • null: An empty value, using the word null
ECMA−262 3rd Edition—December 1999[10] ) and is
commonly used with Javascript, but it is a language- Limited whitespace is allowed and ignored around or be-
independent data format. Code for parsing and generat- tween syntactic elements (values and punctuation, but not
ing JSON data is readily available in many programming within a string value). Only four specific characters are
languages. JSON’s Web site lists JSON libraries by lan- considered whitespace for this purpose: space, horizon-
guage. tal tab, line feed, and carriage return. In particular, the
Though JSON was originally advertised and believed to byte order mark must not be generated by a conforming
be a strict subset of JavaScript and ECMAScript,[11] it in- implementation (though it may be accepted when parsing
advertently allows some unescaped characters in strings JSON). JSON does not provide any syntax for comments.
that are illegal in JavaScript and ECMAScript strings. Early versions of JSON (such as specified by RFC 4627)
See Data portability issues below. required that a valid JSON “document” must consist of
JSON itself became an ECMA international standard in only an object or an array type, which could contain other
types within them.
3.2. JSON 73

Example the JavaScript eval() function to parse JSON data. Due


to the issue with parsing of Unicode line terminators dis-
The following example shows a possible JSON represen- cussed in the preceding section, the eval function needs
tation describing a person. to perform a string replacement.[14]
{ “firstName": “John”, “lastName": “Smith”, “isAlive": var p = eval('(' + json_string.replace(/\u2028/g,'\\u2028').replace(/\u2029/g,
true, “age": 25, “address": { “streetAddress": “21 2nd '\\u2029') + ')');
Street”, “city": “New York”, “state": “NY”, “postal-
Code": “10021-3100” }, “phoneNumbers": [ { “type": This is unsafe if the string is untrusted. Instead, a JSON
“home”, “number": “212 555-1234” }, { “type": “of- parser library or JavaScript’s native JSON support should
fice”, “number": “646 555-4567” }, { “type": “mobile”, be used for reading and writing JSON.
“number": “123 456-7890” } ], “children": [], “spouse":
null } var p = JSON.parse(json_string);

A correctly implemented JSON parser only accepts valid


JSON, preventing potentially malicious code from being
Data portability issues inadvertently executed.

Although Douglas Crockford originally claimed that Since 2010, web browsers such as Firefox and Internet
JSON is a strict subset of JavaScript, his specification Explorer have included support for parsing JSON. As na-
actually allows valid JSON documents that are invalid tive browser support is more efficient and secure than
JavaScript. Specifically, JSON allows the Unicode line eval(), native JSON support is included in Edition 5 of
terminators U+2028 LINE SEPARATOR and U+2029 the ECMAScript standard.[15]
PARAGRAPH SEPARATOR to appear unescaped in
quoted strings, while JavaScript does not.[14] This is a
Unsupported native data types
consequence of JSON disallowing only “control charac-
ters”. For maximum portability, these characters should
JavaScript syntax defines several native data types that
be backslash-escaped. This subtlety is important when
are not included in the JSON standard:[13] Map, Set,
generating JSONP.
Date, Error, Regular Expression, Function, Promise, and
JSON documents can be encoded in UTF-8, UTF-16 or undefined.[note 1] These JavaScript data types must be rep-
UTF-32, the default encoding being UTF-8.[13] These en- resented by some other data format, with the programs
codings support the full Unicode character set, includ- on both ends agreeing on how to convert between the
ing those characters outside the Basic Multilingual Plane types. As of 2011, there are some de facto standards,
(U+10000 to U+10FFFF). However, if escaped, those e.g., converting from Date to String, but none universally
characters must be written using UTF-16 surrogate pairs, recognized.[16][17] Other languages may have a different
a detail missed by some JSON parsers. For example, to set of native types that must be serialized carefully to deal
include the Emoji character U+1F602 FACE WITH with this type of conversion.
TEARS OF JOY in JSON:
{ “face": " " } // or { “face": "\uD83D\uDE02” }
3.2.3 Schema and metadata
Numbers in JSON are agnostic with regard to their repre- JSON Schema
sentation within programming languages. No differenti-
ation is made between an integer and floating-point value: JSON Schema[18] specifies a JSON-based format to de-
some implementations may treat 42, 42.0, and 4.2E+1 as fine the structure of JSON data for validation, documen-
the same number while others may not. Furthermore, no tation, and interaction control. A JSON Schema provides
requirements are made regarding implementation issues a contract for the JSON data required by a given applica-
such as overflow, underflow, loss of precision, or round- tion, and how that data can be modified.
ing. Additionally, JSON says nothing about the treat-
JSON Schema is based on the concepts from XML
ment of signed zeros: whether 0.0 is distinct from −0.0.
Schema (XSD), but is JSON-based. The JSON data
Most implementations that use the IEEE 754 floating-
schema can be used to validate JSON data. As in XSD,
point standard, including JavaScript, preserve signed ze-
the same serialization/deserialization tools can be used
ros; but not all JSON implementations may do so.
both for the schema and data. The schema is self-
describing.
Using JSON in JavaScript JSON Schema is an Internet Draft currently in its 5th ver-
sion, which was released on October 13, 2016[19] (version
Since JSON was derived from JavaScript and its syntax 4 had expired on August 4, 2013,[20] leading to a lapse of
is (mostly) a subset of the language, it is possible to use more than 3 years). There are several validators avail-
74 CHAPTER 3. DATA STRUCTURES

able for different programming languages,[21] each with the same dynamic web page methodology as Ajax, but
varying levels of conformance. There are no standard file instead of XML, JSON is the data format. AJAJ is a
extension, but some suggested .schema.json.[22] web development technique that provides for the ability
Example JSON Schema (draft 4): of a webpage to request new data after it has loaded into
the web browser. Typically it renders new data from the
{ "$schema": "http://json-schema.org/schema#", “title": server in response to user actions on that webpage. For
“Product”, “type": “object”, “required": ["id”, “name”, example, what the user types into a search box, client-
“price"], “properties": { “id": { “type": “number”, side code then sends to the server, which immediately re-
“description": “Product identifier” }, “name": { “type": sponds with a drop-down list of matching database items.
“string”, “description": “Name of the product” }, “price":
{ “type": “number”, “minimum": 0 }, “tags": { “type": The following JavaScript code is an example of a client
“array”, “items": { “type": “string” } }, “stock": { using XMLHttpRequest to request data in JSON format
“type": “object”, “properties": { “warehouse": { “type": from a server. (The server-side programming is omitted;
“number” }, “retail": { “type": “number” } } } } } it must be set up to service requests to the url containing
a JSON-formatted string.)

The JSON Schema above can be used to test the validity var my_JSON_object; var http_request = new
of the JSON code below: XMLHttpRequest(); http_request.open(“GET”,
url, true); http_request.responseType = “json";
{ “id": 1, “name": “Foo”, “price": 123, “tags": [ “Bar”, http_request.onreadystatechange = function () { var done
“Eek” ], “stock": { “warehouse": 300, “retail": 20 } } = 4, ok = 200; if (http_request.readyState === done
&& http_request.status === ok) { my_JSON_object =
http_request.response; } }; http_request.send(null);

3.2.4 MIME type


The official MIME type for JSON text is 3.2.6 Security issues
“application/json”.[23] Although most modern im-
plementations have adopted the official MIME type, JSON is intended as a data serialization format. However,
many applications continue to provide legacy support for its design as a non-strict subset of the JavaScript scripting
other MIME types. Many service providers, browsers, language poses several security concerns. These concerns
servers, web applications, libraries, frameworks, and center on the use of a JavaScript interpreter to execute
APIs use, expect, or recognize the (unofficial) MIME JSON text dynamically as embedded JavaScript. This
type “text/json” or the content-type “text/javascript”. exposes a program to errant or malicious scripts. This
Notable examples include the Google Search API,[24] is a serious issue when dealing with data retrieved from
Yahoo!,[24][25] Flickr,[24] Facebook API,[26] Lift frame- the Internet. This easy and popular but risky technique
work,[27] Dojo Toolkit 0.4,[28] etc. exploits JSON’s compatibility with the JavaScript eval()
function, which is described below.

3.2.5 Applications
JavaScript eval()
JSON-RPC
Some developers mistakenly believe that JSON-
JSON-RPC is a remote procedure call (RPC) protocol formatted text is also syntactically legal JavaScript code
built on JSON, as a replacement for XML-RPC or SOAP. though certain valid JSON strings are actually not valid
It is a simple protocol that defines only a handful of data JavaScript code.[29] Because of that, they believe an easy
types and commands. JSON-RPC lets a system send no- way for a JavaScript program to parse JSON-formatted
tifications (information to the server that does not require data would be to use the built-in JavaScript eval()
a response) and multiple calls to the server that can be function, which was designed to evaluate JavaScript
answered out of order. Example of a JSON-RPC 2.0 re- expressions. Rather than using a JSON-specific parser,
quest and response using positional parameters. the JavaScript interpreter itself is thus used to execute
the JSON data, producing native JavaScript objects.
--> {"jsonrpc": “2.0”, “method": “subtract”, “params": This technique is risky, however, if there is any chance
[42, 23], “id": 1} <-- {"jsonrpc": “2.0”, “result": 19, that the JSON data might contain arbitrary JavaScript
“id": 1} code, which would then be executed also.
Unless precautions are taken to validate the data first,
the eval technique is subject to security vulnerabilities
AJAJ when the data and the entire JavaScript environment are
not within the control of a single trusted source. For
Asynchronous JavaScript and JSON (or AJAJ) refers to example, if the data is itself not trusted, it is subject
3.2. JSON 75

to malicious JavaScript code injection attacks. Such Implementation-specific issues


breaches of trust also can create vulnerabilities for data
theft, authentication forgery, and other potential misuses Various JSON parser implementations suffered in the
of data and resources. past from denial-of-service attack and mass assignment
[43][44]
The RFC that defines JSON (RFC 4627) suggests using vulnerability.
the following code to validate JSON using a regular ex-
pression before evaluating it (the variable 'text' is the input
JSON):[30] 3.2.7 Object references
var my_JSON_object = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u The JSON standard does not support object references,
\n\r\t]/.test( text.replace(/"(\\.|[^"\\])*"/g, ''))) && but an IETF draft standard for JSON-based object
eval('(' + text + ')'); references exists.[45] The Dojo Toolkit supports ob-
ject references using standard JSON; specifically, the
However, this validation is now known to be dojox.json.ref module provides support for several
insufficient.[31] forms of referencing including circular, multiple, inter-
message, and lazy referencing.[46][47][48] Alternatively,
A new function, JSON.parse(), was thus developed as
non-standard solutions exist such as the use of Mozilla
a safer alternative to eval(). It is specifically intended
JavaScript Sharp Variables. However this functionality
to process JSON data and not JavaScript. It was origi-
became obsolete with JavaScript 1.8.5 and was removed
nally planned for inclusion in the Fourth Edition of the
in Firefox version 12.[49]
ECMAScript standard,[32] but this did not occur. It was
first added to the Fifth Edition,[33] and is now supported
by the major browsers given below. For older ones, a
compatible JavaScript library is available at JSON.org.
3.2.8 Comparison with other formats
An additional issue when parsing JSON using the eval() See also: Comparison of data serialization formats
function is that there are some Unicode characters that
are valid in JSON strings but invalid in JavaScript, so ad-
JSON is promoted as a low-overhead alternative to XML
ditional escaping may be needed in some cases.[29]
as both of these formats have widespread support for cre-
ation, reading, and decoding in the real-world situations
Native encoding and decoding in browsers where they are commonly used.[50] Apart from XML,
examples could include OGDL, YAML and CSV. Also,
Web browsers now have or plan to have native JSON en- Google Protocol Buffers can fill this role, although it is
coding and decoding. This eliminates the eval() security not a data interchange language.
problem above, and can increase performance compared
to the JavaScript libraries commonly used before. As of
June 2009, the following browsers have native JSON sup- YAML
port, via JSON.parse() and JSON.stringify():
YAML version 1.2 is a superset of JSON; prior versions
• Mozilla Firefox 3.5+ [34] were “not strictly compatible”. For example, escaping a
slash (/) with a backslash (\) is valid in JSON, but was not
• Microsoft Internet Explorer 8+[35] valid in YAML. (This is common practice when injecting
JSON into HTML to protect against cross-site scripting
• Opera 10.5+[36] attacks.) Nonetheless, many YAML parsers can natively
• WebKit-based browsers (Apple Safari) [37] parse the output from many JSON encoders.[51]

• Blink-based browsers (e.g. Google Chrome, Opera)


XML
At least five popular JavaScript libraries have committed
to use native JSON, if available: XML has been used to describe structured data and to
serialize objects. Various XML-based protocols exist to
• YUI Library [38] represent the same kind of data structures as JSON for
the same kind of data interchange purposes. Data can be
• Prototype[39] encoded in XML several ways. The most expansive form
using tag pairs results in a much larger representation than
• jQuery[40] JSON, but if data is stored in attributes and 'short tag'
• Dojo Toolkit [41] form where the closing tag is replaced with '/>', the rep-
resentation is often about the same size as JSON or just a
• MooTools[42] little larger. If the data is compressed using an algorithm
76 CHAPTER 3. DATA STRUCTURES

like gzip, there is little difference because compression is number="212 555-1234"/> <phoneNumber type="fax”
good at saving space when a pattern is repeated. number="646 555-4567"/> </phoneNumbers> <gender
XML also has the concept of schema. This permits type="male"/> </person>
strong typing, user-defined types, predefined tags, and
formal structure, allowing for formal validation of an The XML encoding may therefore be comparable in
XML stream in a portable way. There is, however, an length to the equivalent JSON encoding. A wide range of
IETF draft proposal for a schema system for JSON . XML processing technologies exist, from the Document
XML supports comments, but JSON does not.[52] Object Model to XPath and XSLT. XML can also be
styled for immediate display using CSS. XHTML is a
form of XML so that elements can be passed in this form
Samples ready for direct insertion into webpages using client-side
scripting.
JSON sample { “firstName": “John”, “lastName":
“Smith”, “age": 25, “address": { “streetAddress":
“21 2nd Street”, “city": “New York”, “state": “NY”, 3.2.9 See also
“postalCode": “10021” }, “phoneNumber": [ { “type":
• JSON Streaming
“home”, “number": “212 555-1234” }, { “type": “fax”,
“number": “646 555-4567” } ], “gender": { “type": • Other formats
“male” } }
• HOCON—Human-Optimized Config Object
Notation, a superset of JSON
Both of the following examples carry the same kind of in- • YAML—Another datastorage format that is a
formation as the JSON example above in different ways. superset of JSON[56]
There is a powerful jq language and tool to deal with
• S-expression—the comparable LISP format
JSON.[53][54][55]
for trees as text.
• JSONP—JSON with Padding, a pattern of
YAML sample The JSON code above is also en- usage commonly employed when retrieving
tirely valid YAML. YAML also offers an alternative syn- JSON across domains
tax intended to be more human-accessible by replacing • GeoJSON—an open format for encoding a va-
nested delimiters like {}, [], and " marks with off-side riety of geographic data structures
indentation.[51] • JSON-LD—JavaScript Object Notation for
--- firstName: John lastName: Smith age: 25 address: Linked Data, currently a W3C Recommenda-
streetAddress: 21 2nd Street city: New York state: NY tion
postalCode: '10021' phoneNumber: - type: home num- • JSON-RPC
ber: 212 555-1234 - type: fax number: 646 555-4567 • SOAPjr—a hybrid of SOAP and JR (JSON-
gender: type: male RPC)
• JsonML
• Binary encodings for JSON
XML samples <person> <first-
Name>John</firstName> <last- • BSON
Name>Smith</lastName> <age>25</age> <ad- • MessagePack
dress> <streetAddress>21 2nd Street</streetAddress> • Smile
<city>New York</city> <state>NY</state> <postal- • UBJSON
Code>10021</postalCode> </address> <phoneNum-
• EXI4JSON (EXI for JSON)—representation
bers> <phoneNumber> <type>home</type> <num-
by means of the Efficient XML Interchange
ber>212 555-1234</number> </phoneNumber>
(EXI) standard
<phoneNumber> <type>fax</type> <number>646 555-
4567</number> </phoneNumber> </phoneNumbers> • Implementations:
<gender> <type>male</type> </gender> </person>
• Jayrock—an open source implementation of
JSON for the .NET Framework.
The properties can also be serialized using attributes in- • Ember data server implementations for PHP,
stead of tags: Node.js, Ruby, Python, Go, .NET and Java.
<person firstName="John” lastName="Smith” • Other
age="25"> <address streetAddress="21 2nd Street”
city="New York” state="NY” postalCode="10021” • Comparison of data serialization formats
/> <phoneNumbers> <phoneNumber type="home” • Jq (programming language)
3.2. JSON 77

3.2.10 Notes [7] Apache and the JSON license on LWN.net by Jake Edge
(November 30, 2016)
[1] The undefined type was left out of the JSON standard, and
one finds suggestions that null be used instead. In fact, the [8] Yahoo!. “Using JSON with Yahoo! Web services”.
current standard says that for a sparse array such as: Archived from the original on October 11, 2007. Re-
var v = [0]; v[3] = 3; trieved July 3, 2009.
which behaves in JavaScript as if it were:
var vx = [0, undefined, undefined, 3]; [9] Google. “Using JSON with Google Data APIs”. Re-
with the undefined entries being only implicit rather than trieved July 3, 2009.
explicit, should translate to JSON as if it were: [10] Crockford, Douglas (May 28, 2009). “Introducing
var vx = [0, null, null, 3]; JSON”. json.org. Retrieved July 3, 2009.
with explicit null fillers for the undefined entries. Fur-
thermore, in JavaScript {a: undefined} often behaves the [11] Douglas Crockford (2016-07-10). “JSON in JavaScript”.
same as {}. Both translate as "{}" in JSON. However Retrieved 2016-08-13.
undefined as an explicit property value does have use in
JavaScript inheritance situations such as: [12] “The JSON Data Interchange Format” (PDF). ECMA
var x = {a: 1}; var xi = Object.create(x); xi.a = undefined; International. October 2013. Retrieved 23 September
where the inheritance of x’s property a is overridden in xi 2016.
and makes it pretty much behave as if nothing was inher-
ited. JSON.stringify itself ignores inherited values - it only [13] “JSON Web Token (JWT)". IETF. May 2015. Retrieved
translates the enumerable own properties as given by Ob- 23 September 2016.
ject.keys(y). The default stringification, while not encod-
[14] Holm, Magnus (15 May 2011). “JSON: The JavaScript
ing inheritance, can (except for undefined values) encode
subset that isn't”. The timeless repository. Retrieved 23
enough of an object to reconstruct it in an environment
September 2016.
that knows what inheritance it should have. To encode
JavaScript objects that contain explicit undefined values [15] “Standard ECMA-262”. ecma-international.org. Re-
a convention for representing undefined must be estab- trieved 13 September 2015.
lished, such as mapping it to the string “UNDEFINED”.
One can then pass JSON.stringify the optional replacer ar- [16] “jquery - Format a Microsoft JSON date? - Stack Over-
gument to translate with this convention: flow”. stackoverflow.com. Retrieved 13 September 2015.
var y = {a: undefined}; var ys = JSON.stringify(y, func-
tion (k, v){return (v === undefined) ? “UNDEFINED” : [17] “Tales from the Evil Empire - Dates and JSON”. asp.net.
v}); Retrieved 13 September 2015.
Converting this JSON back into JavaScript is not as
straightforward. While JSON.parse can take an optional [18] “JSON Schema and Hyper-Schema”. json-schema.org.
reviver argument that is, essentially, the inverse of a re- Retrieved 13 September 2015.
placer, it can't be used in this situation. If that function
[19] “draft-wright-json-schema-00 - JSON Schema: A Me-
returns undefined, the JSON.parse logic interprets this to
dia Type for Describing JSON Documents”. json-
mean to not define a property rather than define one with
schema.org/. Retrieved 17 February 2017.
a undefined value. Instead one has to explicitly post pro-
cess the result from JSON.parse replacing each “UNDE- [20] “draft-zyp-json-schema-04 - JSON Schema: core defi-
FINED” with undefined. nitions and terminology”. ietf.org. Retrieved 17 March
2016.

3.2.11 References [21] “JSON Schema Software”. json-schema.org. Retrieved


13 September 2015.
[1] “Doug Crockford “Google Tech Talks: JavaScript: The
Good Parts"". 7 February 2009. [22] http://stackoverflow.com/a/10507586/287948

[2] Bray, Tim. “JSON Redux AKA RFC7159”. Ongoing. [23] “Media Types”. iana.org. Retrieved 13 September 2015.
Retrieved 16 March 2014.
[24] “Handle application/json & text/json by benschwarz · Pull
[3] Bray, Tim (ed.), The I-JSON Message Format, Internet En- Request #2 · mislav/faraday-stack”. GitHub. Retrieved 13
gineering Task Force (IETF), RFC 7493 September 2015.

[4] “Douglas Crockford — The JSON Saga”. YouTube. 28 [25] “Yahoo!, JavaScript, and JSON”. ProgrammableWeb.
August 2011. Retrieved 23 September 2016. Retrieved 13 September 2015.

[5] “Chip Morningstar Biography”. n.d. [26] “Make JSON requests allow text/javascript content
by jakeboxer · Pull Request #148 · AFNetwork-
[6] “State Software Breaks Through Web App Development ing/AFNetworking”. GitHub. Retrieved 13 September
Barrier With State Application Framework: Software 2015.
Lets Developers Create Truly Interactive Applications;
Reduces Costs, Development Time and Improves User [27] “lift/Req.scala at master · lift/lift · GitHub”. GitHub. Re-
Experience”. PR Newswire. February 12, 2002. trieved 13 September 2015.
78 CHAPTER 3. DATA STRUCTURES

[28] “BrowserIO.js in legacy/branches/0.4/src/io – Dojo [50] “JSON: The Fat-Free Alternative to XML”. json.org. Re-
Toolkit”. dojotoolkit.org. Retrieved 13 September 2015. trieved 14 March 2011.

[29] “JSON: The JavaScript subset that isn't”. Magnus Holm. [51] “YAML Ain't Markup Language (YAML™) Version
Retrieved 16 May 2011. 1.2”. yaml.org. Retrieved 13 September 2015.

[30] Douglas Crockford (July 2006). “IANA Considerations”. [52] Saternos, Casimir (2014). Client-server web apps with
The application/json Media Type for JavaScript Object No- Javascript and Java. p. 45. ISBN 9781449369316.
tation (JSON). IETF. sec. 6. RFC 4627. https://tools.
ietf.org/html/rfc4627#section-6. Retrieved October 21, [53] Janssens has a couple of examples showing the use of jq:
2009. Janssens, Jeroen (2014). Data Science at the Command
Line. O'Reilly Media. ISBN 978-1-4919-4785-2.
[31] Stefano Di Paola. “Minded Security Blog: Ye Olde
Crockford JSON regexp is Bypassable”. mindedsecu- [54] stackoverflow has a lot of Q&A regarding jq: “jq Q&A
rity.com. Retrieved 13 September 2015. on stackoverflow”. stackoverflow.com.

[32] Crockford, Douglas (December 6, 2006). “JSON: The [55] jq is open source; ready usable executables, documenta-
Fat-Free Alternative to XML”. Retrieved July 3, 2009. tion and a tutorial are available: Stephen Dolan. “jq is a
lightweight and flexible command-line JSON processor”.
[33] “ECMAScript Fifth Edition” (PDF). Retrieved March 18, github.io. Retrieved 2016-02-27.
2011.
[56] Oren Ben-Kiki; Clark Evans; Ingy döt Net. “YAML Ain't
[34] “Using Native JSON”. June 30, 2009. Retrieved July 3, Markup Language (YAML™) Version 1.2”. Retrieved 29
2009. August 2015.

[35] Barsan, Corneliu (September 10, 2008). “Native JSON in


IE8”. Retrieved July 3, 2009. 3.2.12 External links
[36] “Web specifications supported in Opera Presto 2.5”. • Format home page
March 10, 2010. Retrieved March 29, 2010.
• The JavaScript Object Notation (JSON) Data Inter-
[37] Hunt, Oliver (June 22, 2009). “Implement ES 3.1 JSON
change Format (RFC 7159)
object”. Retrieved July 3, 2009.
• ECMA-404—The JSON Data Interchange Format
[38] “YUI 2: JSON utility”. September 1, 2009. Retrieved
October 22, 2009. • CBOR—A binary encoding for JSON
[39] “Learn JSON”. April 7, 2010. Retrieved April 7, 2010.

[40] “Ticket #4429”. May 22, 2009. Retrieved July 3, 2009. 3.3 YAML
[41] “Ticket #8111”. June 15, 2009. Retrieved July 3, 2009.
YAML (/ˈjæməl/, rhymes with camel) is a human-
[42] “Ticket 419”. October 11, 2008. Retrieved July 3, 2009. readable data serialization language. It is commonly used
[43] “Denial of Service and Unsafe Object Creation Vulnera- for configuration files, but could be used in many appli-
bility in JSON (CVE-2013-0269)". Retrieved January 5, cations where data is being stored (e.g. debugging out-
2016. put) or transmitted (e.g. document headers). YAML tar-
gets many of the same communications applications as
[44] “Microsoft .NET Framework JSON Content Processing XML, but has taken a more minimal approach which in-
Denial of Service Vulnerability”. Retrieved January 5, tentionally breaks compatibility with SGML.[1] YAML
2016. 1.2 is a superset of JSON, another minimalist data serial-
[45] Zyp, Kris (September 16, 2012). Bryan, Paul C., ed. ization format where braces and brackets are used instead
[2]
“JSON Reference: draft-pbryan-zyp-json-ref-03”. Inter- of indentation.
net Engineering Task Force. Custom data types are allowed, but YAML natively en-
[46] Zyp, Kris. “dojox.json.ref”. Dojo.
codes scalars (such as strings, integers, and floats), lists,
and associative arrays (also known as hashes or dictionar-
[47] Zyp, Kris (June 17, 2008). “JSON referencing in Dojo”. ies). These data types are based on the Perl programming
SitePen. Retrieved July 3, 2009. language, though all commonly-used high-level program-
ming languages share very similar concepts. YAML sup-
[48] von Gaza, Tys (Dec 7, 2010). “JSON referencing in
ports both Python-style indentation to indicate nesting,
jQuery”. NUBUNTU. Archived from the original on May
and a more compact format that uses [] for lists and {}
7, 2015. Retrieved Dec 7, 2010.
for hashes.[1] The colon-centered syntax used to express
[49] “Sharp variables in JavaScript”. Mozilla Developer Net- key/value pairs is inspired by electronic mail headers as
work. April 4, 2015. Retrieved 21 April 2012. defined in RFC 0822, and the document separator "--" is
3.3. YAML 79

borrowed from MIME (RFC 2045). Escape sequences or enclosed in curly braces ({ }) and separated by
are reused from C, and whitespace wrapping for multi- comma space (, ).
line strings is inspired from HTML. Lists and hashes can
contain nested lists and hashes, forming a tree structure; • An associative array key may be prefixed with
arbitrary graphs can be represented using YAML aliases a question mark (?) to allow for liberal multi-
(similar to XML in SOAP).[1] YAML is intended to be word keys to be represented unambiguously.
read and written in streams, a feature inspired by SAX.[1] • Strings (scalars) are ordinarily unquoted, but may be
Support for reading and writing YAML is available for enclosed in double-quotes ("), or single-quotes (').
several programming languages.[3] Some source code ed-
• Within double-quotes, special characters may
itors such as Emacs[4] and various integrated develop-
be represented with C-style escape sequences
ment environments[5][6][7] have features that make edit-
starting with a backslash (\). According to the
ing YAML easier, such as folding up nested structures or
documentation the only octal escape supported
automatically highlighting syntax errors.
is \0.
• Block scalars are delimited with indentation with
3.3.1 History and name optional modifiers to preserve (|) or fold (>) new-
lines.
YAML was first proposed by Clark Evans in 2001,[8]
who designed it together with Ingy döt Net[9] and Oren • Multiple documents within a single stream are sep-
Ben-Kiki.[9] Originally YAML was said to mean Yet An- arated by three hyphens (---).
other Markup Language,[10] referencing its purpose as a
markup language with the yet another construct, but it • Three periods (...) optionally end a document
was then repurposed as YAML Ain't Markup Language, within a stream.
a recursive acronym, to distinguish its purpose as data- • Repeated nodes are initially denoted by an
oriented, rather than document markup. ampersand (&) and thereafter referenced with an
asterisk (*).
3.3.2 Design • Nodes may be labeled with a type or tag using the
exclamation point (!!) followed by a string, which
Syntax can be expanded into a URI.

A compact cheat sheet as well as a full specification are • YAML documents in a stream may be preceded by
available at the official site.[11] The following is a synopsis 'directives’ composed of a percent sign (%) followed
of the basic elements. by a name and space delimited parameters. Two di-
rectives are defined in YAML 1.1:
The YAML language accepts the entirety of the Uni-
code character set, except for some of the control char- • The %YAML directive is used to identify the
acters. All of the accepted characters may be used in version of YAML in a given document.
the YAML document. The YAML document may be en-
• The %TAG directive is used as a shortcut for
coded in UTF-8, UTF-16 and UTF-32 (though UTF-32
URI prefixes. These shortcuts may then be
is not mandatory, it is a must if the parser is to have JSON
used in node type tags.
compatibility).[12]

YAML requires that colons and commas used as list sep-


• Whitespace indentation is used to denote structure;
arators be followed by a space so that scalar values con-
however tab characters are never allowed as inden-
taining embedded punctuation (such as 5,280 or http:
tation.
//www.wikipedia.org) can generally be represented with-
• Comments begin with the number sign (#), can start out needing to be enclosed in quotes.
anywhere on a line and continue until the end of the Two additional sigil characters are reserved in YAML for
line. Comments must be separated from other to- possible future standardisation: the at sign (@) and accent
kens by white space characters.[13] If they appear grave (`).
inside of a string, then they are number sign (#) lit-
erals.
Basic components
• List members are denoted by a leading hyphen (-
) with one member per line, or enclosed in square YAML offers an “in-line” style for denoting associative
brackets ([ ]) and separated by comma space (, ). arrays and lists. Here is a sample of the components.
• Associative arrays are represented using the colon Conventional block format uses a hyphen+space to begin
space (: ) in the form key: value, either one per line a new item in list.
80 CHAPTER 3. DATA STRUCTURES

--- # Favorite movies - Casablanca - North by Northwest being fully described each time.
- The Man Who Wasn't There # sequencer protocols for Laser eye surgery --- - step:
&id001 # defines anchor label &id001 instrument: Lasik
Optional inline format is delimited by comma+space and 2000 pulseEnergy: 5.4 pulseDuration: 12 repetition:
enclosed in brackets (similar to JSON).[14] 1000 spotSize: 1mm - step: &id002 instrument: Lasik
--- # Shopping list [milk, pumpkin pie, eggs, juice] 2000 pulseEnergy: 5.0 pulseDuration: 10 repetition:
500 spotSize: 2mm - step: *id001 # refers to the first
step (with anchor &id001) - step: *id002 # refers to
Keys are separated from values by a colon+space. In- the second step - step: <<: *id001 spotSize: 2mm #
dented blocks, common in YAML data files, use in- redefines just this key, refers rest from &id001 - step:
dentation and new lines to separate the key/value pairs. *id002
Inline Blocks, common in YAML data streams, use
comma+space to separate the key/value pairs between
braces. Explicit data typing is seldom seen in the majority
of YAML documents since YAML autodetects simple
--- # Indented Block name: John Smith age: 33 --- # types. Data types can be divided into three categories:
Inline Block {name: John Smith, age: 33} core, defined, and user-defined. Core are ones expected
to exist in any parser (e.g. floats, ints, strings, lists, maps,
Strings do not require quotation. There are two ways to ...). Many more advanced data types, such as binary data,
write multi-line strings, one preserving newlines (using are defined in the YAML specification but not supported
the | character) and one that folds the newlines (using the in all implementations. Finally YAML defines a way to
> character), both followed by a newline character. extend the data type definitions locally to accommodate
user-defined classes, structures or primitives (e.g. quad-
data: | There once was a short man from Ealing Who got precision floats).
on a bus to Darjeeling It said on the door “Please don't
spit on the floor” So he carefully spat on the ceiling YAML autodetects the datatype of the entity. Sometimes
one wants to cast the datatype explicitly. The most com-
mon situation is where a single-word string that looks like
By default, the leading indent (of the first line) and trail- a number, boolean or tag requires disambiguation by sur-
ing white space is stripped, though other behavior can be rounding it with quotes or using an explicit datatype tag.
explicitly specified.
--- a: 123 # an integer b: “123” # a string, disambiguated
data: > Wrapped text will be folded into a single para- by quotes c: 123.0 # a float d: !!float 123 # also a float via
graph Blank lines denote paragraph breaks explicit data type prefixed by (!!) e: !!str 123 # a string,
disambiguated by explicit type f: !!str Yes # a string via
Folded text converts newlines to spaces and removes lead- explicit type g: Yes # a boolean True (yaml1.1), string
ing whitespace. “Yes” (yaml1.2) h: Yes we have No bananas # a string,
“Yes” and “No” disambiguated by context.
- {name: John Smith, age: 33} - name: Mary Smith age:
27
men: [John Smith, Bill Jones] women: - Mary Smith - Not every implementation of YAML has every
Susan Williams specification-defined data type. These built-in types
use a double exclamation sigil prefix (!!). Particularly
interesting ones not shown here are sets, ordered maps,
timestamps, and hexadecimal. Here’s an example of
Advanced components base64 encoded binary data.
--- picture: !!binary |
Two features that distinguish YAML from the capabilities R0lGODdhDQAIAIAAAAAAANn
of other data serialization languages are structures[15] and Z2SwAAAAADQAIAAACF4SDGQ
data typing. ar3xxbJ9p0qa7R0YxwzaFME 1IAADs=
YAML structures enable storage of multiple documents
within single file, usage of references for repeated nodes, Many implementations of YAML can support user-
and usage of arbitrary nodes as keys.[15] defined data types for object serialization. Local data
For clarity, compactness, and avoiding data entry errors, types are not universal data types but are defined in the
YAML provides node anchors (using &) and references application using the YAML parser library. Local data
(using *). References to the anchor work for all data types types use a single exclamation mark (!).
(see the ship-to reference in the example below). --- myObject: !myClass { name: Joe, age: 15 }
Below is an example of a queue in an instrument se-
quencer in which two steps are reused repeatedly without
3.3. YAML 81

Example Non-hierarchical data models

Data structure hierarchy is maintained by outline inden- Unlike JSON, which can only represent data in a hierar-
tation. chical model with each child node having a single parent,
YAML also offers a simple relational scheme that allows
--- receipt: Oz-Ware Purchase Invoice date: 2012-08-06
repeats of identical data to be referenced from two or
customer: first_name: Dorothy family_name: Gale
more points in the tree rather than entered redundantly
items: - part_no: A4786 descrip: Water Bucket (Filled)
at those points. This is similar to the facility IDREF built
price: 1.47 quantity: 4 - part_no: E1628 descrip: High
into XML.[16] The YAML parser then expands these ref-
Heeled “Ruby” Slippers size: 8 price: 133.7 quantity:
erences into the fully populated data structures they im-
1 bill-to: &id001 street: | 123 Tornado Alley Suite
ply when read in, so whatever program is using the parser
16 city: East Centerville state: KS ship-to: *id001
does not have to be aware of a relational encoding model,
specialDelivery: > Follow the Yellow Brick Road to the
unlike XML processors, which do not expand references.
Emerald City. Pay no attention to the man behind the
This expansion can enhance readability while reducing
curtain. ...
data entry errors in configuration files or processing pro-
tocols where many parameters remain the same in a se-
Notice that strings do not require enclosure in quotations. quential series of records while only a few vary. An exam-
The specific number of spaces in the indentation is unim- ple being that “ship-to” and “bill-to” records in an invoice
portant as long as parallel elements have the same left are nearly always the same data.
justification and the hierarchically nested elements are in-
dented further. This sample document defines an associa-
tive array with 7 top level keys: one of the keys, “items”,
contains a 2-element list, each element of which is itself
an associative array with differing keys. Relational data Practical considerations
and redundancy removal are displayed: the “ship-to” as-
sociative array content is copied from the “bill-to” asso- YAML is line-oriented and thus it is often simple to con-
ciative array’s content as indicated by the anchor (&) and vert the unstructured output of existing programs into
reference (*) labels. Optional blank lines can be added YAML format while having them retain much of the
for readability. Multiple documents can exist in a single look of the original document. Because there are no
file/stream and are separated by --−. An optional ... can closing tags, braces, or quotation marks to balance, it is
be used at the end of a file (useful for signaling an end in generally easy to generate well-formed YAML directly
streamed communications without closing the pipe). from distributed print statements within unsophisticated
programs. Likewise, the whitespace delimiters facilitate
quick-and-dirty filtering of YAML files using the line-
oriented commands in grep, awk, perl, ruby, and python.
In particular, unlike mark-up languages, chunks of con-
3.3.3 Features secutive YAML lines tend to be well-formed YAML doc-
uments themselves. This makes it very easy to write
Indented delimiting parsers that do not have to process a document in its en-
tirety (e.g. balancing opening and closing tags and navi-
gating quoted and escaped characters) before they begin
Because YAML primarily relies on outline indentation extracting specific records within. This property is partic-
for structure, it is especially resistant to delimiter col-
ularly expedient when iterating in a single, stateless pass,
lision. YAML’s insensitivity to quotes and braces in over records in a file whose entire data structure is too
scalar values means one may embed XML, JSON or even large to hold in memory, or for which reconstituting the
YAML documents inside a YAML document by simply entire structure to extract one item would be prohibitively
indenting it in a block literal (using | or >): expensive.
--- example: > HTML goes into YAML without modi- Counterintuitively, although its indented delimiting might
fication message: | <blockquote style="font: italic 12pt seem to complicate deeply nested hierarchies, YAML
Times"> <p>"Three is always greater than two, even for handles indents as small as a single space, and this may
large values of two"</p> <p>--Author Unknown</p> achieve better compression than markup languages. Ad-
</blockquote> date: 2007-06-01 ditionally, extremely deep indentation can be avoided en-
tirely by either: 1) reverting to “inline style” (i.e. JSON-
YAML may be placed in JSON by quoting and escaping like format) without the indentation; or 2) using relational
all interior quotes. YAML may be placed in XML by anchors to unwind the hierarchy to a flat form that the
escaping reserved characters (<, >, &, ', ") and converting YAML parser will transparently reconstitute into the full
whitespace, or by placing it in a CDATA section. data structure.
82 CHAPTER 3. DATA STRUCTURES

Security a wide range of open-source, free and commercial pro-


cessors and libraries.
YAML is purely a data representation language and thus
The YAML specification identifies an instance document
has no executable commands.[17] While validation and
as a “Presentation” or “character stream”.[26] The pri-
safe parsing is inherently possible in any data language,
mary logical structures in a YAML instance document
implementation is such a notorious pitfall that YAML’s
are scalar, sequence, and mapping.[27] The YAML speci-
lack of an associated command language may be a rela-
fication also indicates some basic constraints that apply to
tive security benefit.
these primary logical structures. For example, according
However, YAML allows language-specific tags so that ar- to the specification, mapping keys do not have an order.
bitrary local objects can be created by a parser that sup- In every case where node order is significant, a sequence
ports those tags. Any YAML parser that allows sophisti- must be used.[28]
cated object instantiation to be executed opens the poten-
Moreover, in defining conformance for YAML proces-
tial for an injection attack. Perl parsers that allow loading
sors, the YAML specification defines two primary oper-
of objects of arbitrary class create so-called “blessed” val-
ations: dump and load. All YAML-compliant processors
ues. Using these values may trigger unexpected behavior,
must provide at least one of these operations, and may op-
e.g. if the class uses overloaded operators. This may lead
tionally provide both.[29] Finally, the YAML specification
to execution of arbitrary Perl code.
defines an information model or “representation graph”,
The situation is similar for Python parsers. According to which must be created during processing for both dump
the PyYAML documentation:[18] and load operations, although this representation need not
be made available to the user through an API.[30]
Note that the ability to construct an ar-
bitrary Python object may be dangerous if
you receive a YAML document from an un- 3.3.4 Comparison with JSON
trusted source such as the Internet. The func-
tion yaml.safe_load limits this ability to simple JSON syntax is a basis of YAML version 1.2, which
Python objects like integers or lists. was promulgated with the express purpose of bring-
ing YAML “into compliance with JSON as an official
subset”.[31] Though prior versions of YAML were not
Data processing and representation strictly compatible,[32] the discrepancies were rarely no-
ticeable, and most JSON documents can be parsed by
The XML[19][20] and YAML specifications[21] provide some YAML parsers such as Syck.[33] This is because
very different logical models for data node representa- JSON’s semantic structure is equivalent to the optional
tion, processing, and storage. “inline-style” of writing YAML. While extended hierar-
The primary logical structures in an XML instance docu- chies can be written in inline-style like JSON, this is not
ment are element and attribute.[22] For these primary log- a recommended YAML style except when it aids clarity.
ical structures, the base XML specification does not de- YAML has many additional features lacking in JSON, in-
fine constraints regarding such factors as duplication of cluding comments, extensible data types, relational an-
elements or the order in which they are allowed to ap- chors, strings without quotation marks, and mapping
pear. Note, however, that the XML specification does types preserving key order.
define an “Element Content Model” for XML instance
documents that include validity constraints. Validity con-
straints are user-defined and not mandatory for a well- 3.3.5 Comparison with XML
formed XML instance document. http://www.w3.org/
TR/xml11/#sec-element-content. In the case of dupli- YAML lacks the notion of tag attributes that are found
cate Element attribute declarations, the first declaration is in XML. Instead YAML has extensible type declarations
binding and later declarations are ignored.[23] In defining (including class types for objects).
conformance for XML processors, the XML specifica- YAML itself does not have XML’s language-defined doc-
tion generalizes them into two types: validating and non-
ument schema descriptors that allow, for example, a doc-
validating.[24] The XML specification asserts no detailed
ument to self-validate. However, there are several ex-
definitions for an API, processing model, or data repre-
ternally defined schema descriptor languages for YAML
sentation model, although several are defined in separate
(e.g. Doctrine, Kwalify and Rx) that fulfill that role.
specifications that a user or specification implementer Moreover, the semantics provided by YAML’s language-
may choose independently. These include the Document defined type declarations in the YAML document itself
Object Model and XQuery. frequently relaxes the need for a validator in simple, com-
A richer model for defining valid XML content is the mon situations. Additionally, YAXML, which represents
W3C XML Schema standard.[25] This allows for full YAML data structures in XML, allows XML schema im-
specification of valid XML content and is supported by porters and output mechanisms like XSLT to be applied
3.3. YAML 83

to YAML. [7] Ruth Kusterer. “NetBeans IDE - Ruby and Ruby on Rails
Development”. Netbeans.org. Retrieved 2016-12-05.

3.3.6 Implementation idiosyncrasies [8] Evans, Clark (May 11, 2001). “YAML Draft 0.1”. Ya-
hoo! Tech groups: sml-dev. Retrieved 2008-08-02.
Some implementations of YAML, such as Perl’s [9] “YAML Ain't Markup Language: About”. Retrieved
YAML.pm, will load an entire file (stream) and parse 2010-06-16.
it en-masse. Conversely, YAML::Tiny only reads the
first document in the stream and stops. Other imple- [10] “Yet Another Markup Language (YAML) 1.0”. Retrieved
mentations like PyYaml are lazy and iterate over the 2008-11-24.
next document only upon request. For very large files in [11] “Reference Card”. YAML.org. Retrieved March 21,
which one plans to handle the documents independently, 2014.
instantiating the entire file before processing may be
prohibitive. Thus in YAML.pm, occasionally one must [12] “YAML Ain't Markup Language (YAML™) Version
chunk a file into documents and parse those individually. 1.2”. Yaml.org. Retrieved 2016-09-07.
Fortunately, YAML makes this easy since this simply [13] “YAML Ain't Markup Language (YAML™) Version
requires splitting on the document separator, which 1.2”. Yaml.org. Retrieved 27 May 2015.
is m/^---$/ (once whitespace is stripped) as a regular
expression in Perl. [14] “Cloud Based Management apps”. JigoCloud.com. Re-
trieved 2016-09-28.
Simple YAML files (e.g. key value pairs) are readily
parsed with regular expressions without resort to a for- [15] “YAML 1.2 specification of Structures”. Yaml.org. Re-
mal YAML parser. YAML emitters and parsers for many trieved 22 April 2014.
popular languages written in the pure native language it-
[16] “Extensible Markup Language (XML) 1.0 (Second Edi-
self exist, making it portable in a self-contained manner.
tion)". W3.org. Retrieved 27 May 2015.
Bindings to C-libraries also exist when speed is needed.
[17] A proposed “yield” tag will allow for simple arithmetic
calculation.
3.3.7 See also
[18] “PyYAML Documentation, Loading YAML”.
• AsciiDoc Pyyaml.org. Retrieved 2016-09-28.

• Comparison of data serialization formats [19] “Extensible Markup Language (XML) 1.0 (Fourth Edi-
tion)". W3.org. Retrieved 2007-11-04.
• List of lightweight markup languages
[20] “Extensible Markup Language (XML) 1.1 (Second Edi-
• OGDL tion)". W3.org. Retrieved 2007-11-04.
• Plist [21] “YAML Ain't Markup Language (YAML) Version 1.1”.
W3.org. Retrieved 2007-11-04.
• S-expression
[22] “Extensible Markup Language (XML) 1.1 (Second Edi-
• Simple Outline XML tion)". W3.org. Retrieved 27 May 2015.
• Xupl [23] “Extensible Markup Language (XML) 1.0 (Fifth Edi-
tion)". W3.org. Retrieved 2016-09-28.
3.3.8 References [24] “Extensible Markup Language (XML) 1.0 (Fifth Edi-
tion)". W3.org. Retrieved 27 May 2015.
[1] “Yet Another Markup Language (YAML) 1.0 / Working
Draft”. 10 Dec 2001. [25] “W3C XML Schema”. W3.org. Retrieved 2016-09-28.

[2] “YAML Ain't Markup Language (YAML™) Version [26] “Ain't Markup Language (YAML) Version 1.1”.
1.2”. yaml.org. Retrieved 13 September 2015. YAML.org. Retrieved 2016-09-28.
[3] yaml.org [27] Additional, optional-use, logical structures are enu-
merated in the YAML types repository.“Language-
[4] “Yaml Mode”. EmacsWiki. 2015-06-12. Retrieved
Independent Types for YAML Version 1.1”. Yaml.org.
2016-12-05.
Retrieved 2007-11-04.The tagged types in the YAML
[5] aukaost. “Pretty YAML - Packages - Package Control”. types repository are optional and therefore not essential
Packagecontrol.io. Retrieved 2016-12-05. for conformant YAML processors. “The use of these tags
is not mandatory.”
[6] “yaml | Eclipse Plugins, Bundles and Products - Eclipse
Marketplace”. Marketplace.eclipse.org. Retrieved 2016- [28] “YAML Ain't Markup Language (YAML) Version 1.1”.
12-05. Yaml.org. Retrieved 27 May 2015.
84 CHAPTER 3. DATA STRUCTURES

[29] “Ain't Markup Language (YAML) Version 1.1”.


Yaml.org. Retrieved 2016-09-28.

[30] “YAML Ain't Markup Language (YAML) Version 1.1”.


Yaml.org. Retrieved 27 May 2015.

[31] “YAML Ain't Markup Language (YAML™) Version


1.2”. Yaml.org. Retrieved 27 May 2015.

[32] The incompatibilities were as follows: JSON allows ex-


tended character sets like UTF-32 and had incompati-
ble unicode character escape syntax relative to YAML;
YAML required a space after separators like comma,
equals, and colon while JSON does not. Some non-
standard implementations of JSON extend the grammar
to include Javascript’s /*...*/ comments. Handling such
edge cases may require light pre-processing of the JSON
before parsing as in-line YAML. See also .

[33] Parsing JSON with SYCK. Note that e.g. Symfony’s


YAML parser does not support line breaks inside [] or {}
structures, which is a major incompatibility with JSON.

3.3.9 External links


• YAML Quick Reference card
• YAML.org

• YAML Specification
• YAML improves on XML. Intro to YAML in
Python
Chapter 4

Frameworks

4.1 Prototype JavaScript Frame- The $() function reduces the code to:
work $(“id_of_element”).setStyle({color: '#ffffff'});

For other uses, see Prototype-based programming. The $() function can also receive an element as parameter
and will return, as in the previous example, a prototype
extended object.
The Prototype JavaScript Framework is a JavaScript
framework created by Sam Stephenson in February 2005 var domElement = docu-
as part of the foundation for Ajax support in Ruby on ment.getElementById(“id_of_element”); // Usual
Rails.[1] It is implemented as a single file of JavaScript object reference returned var prototypeEnhanced-
code, usually named prototype.js. Prototype is dis- DomElement = $(domElement); // Prototype extended
tributed standalone, but also as part of larger projects, object reference
such as Ruby on Rails, script.aculo.us and Rico. As of
November 2015, according to one survey, Prototype is
used by 2.2% of all websites.[2] Note: Like the underscore (_), the $ character
is a legal “word character” in JavaScript iden-
tifiers, and has no other significance in the lan-
4.1.1 Features guage. It was added to the language at the same
time as support for regular expressions, so that
Prototype provides various functions for developing the Perl-like matching variables could be emu-
JavaScript applications. The features range from pro- lated, such as $` and $'.
gramming shortcuts to major functions for dealing with
XMLHttpRequest. The $F() function
Prototype also provides library functions to sup-
port classes and class-based objects,[3] something the Building on the $() function: the $F() function returns the
JavaScript language lacks.[4][5] In JavaScript, object cre- value of the requested form element. For a 'text' input,
ation is prototype-based instead: an object creating func- the function will return the data contained in the element.
tion can have a prototype property, and any object as- For a 'select' input element, the function will return the
signed to that property will be used as a prototype for the currently selected value.
objects created with that function. The Prototype frame- $F(“id_of_input_element”)
work is not to be confused with this language feature.

4.1.2 Sample utility functions The $$() function

The $() function The dollar dollar function is Prototype’s CSS Selector
Engine. It returns all matching elements, following the
The dollar function, $(), can be used as shorthand for same rules as a selector in a CSS stylesheet. For exam-
the getElementById function. To refer to an element in ple, if you want to get all <a> elements with the class
the Document Object Model (DOM) of an HTML page, “pulsate”, you would use the following:
the usual function identifying an element is: $$(“a.pulsate”)
document.getElementById(“id_of_element”).style.color
= "#ffffff"; This returns a collection of elements. If you are using the
script.aculo.us extension of the core Prototype library,

85
86 CHAPTER 4. FRAMEWORKS

you can apply the “pulsate” (blink) effect as follows: 4.1.4 Problems
$$(“a.pulsate”).each(Effect.Pulsate);
Unlike other JavaScript libraries like jQuery, Prototype
extends the DOM. There are plans to change this in the
next major version of the library.[6]
In April 2010, blogger Juriy 'kangax' Zaytsev (of Proto-
The Ajax object type Core) described at length the problems that can fol-
low from monkey patching new methods and properties
In an effort to reduce the amount of code needed to into the objects defined by the W3C DOM.[6] These ideas
run a cross-browser XMLHttpRequest function, Proto- echo thoughts published in March 2010 by Yahoo! devel-
type provides the Ajax object to abstract the different oper Nicholas C. Zakas[7] They have been summarized as
browsers. It has two main methods: Ajax.Request() and follows[8]
Ajax.Updater(). There are two forms of the Ajax object.
Ajax.Request returns the raw XML output from an AJAX • Cross browser issues: host objects are not subject to
call, while the Ajax.Updater will inject the return inside rules, non-compliant IE DOM behavior, etc.
a specified DOM object. The Ajax.Request below finds
the current values of two HTML form input elements, • Chance of name collisions
issues an HTTP POST request to the server with those
• Performance overhead
element name/value pairs, and runs a custom function
(called showResponse below) when the HTTP response
is received from the server: By 2008, specific issues with using DOM-extension
methods in older versions of Prototype, combined with
new Ajax.Request("http://localhost/server_script", { pa- newer versions of current browsers, were already be-
rameters: { value1: $F(“form_element_id_1”), value2: ing documented.[9] Rather than adding new methods and
$F(“form_element_id_2”) }, onSuccess: showResponse, properties to pre-existing 'host' DOM objects such as El-
onFailure: showError }); ement, like element.hide(), the solution to these issues is
to provide wrapper objects around these host objects and
implement the new methods on these. jQuery is such a
wrapper object in the library of that name.[6]
4.1.3 Object-oriented programming It is now widely expected that the majority of these ideas
and issues will be addressed in the release of Prototype
Prototype also adds support for more traditional object- 2.0, but Prototype developers will have to learn to work
oriented programming. The Class.create() method is with an altered syntax,[8] and much existing Prototype code
used to create a new class. A class is then assigned a will become outdated.
prototype which acts as a blueprint for instances of the
class.
4.1.5 See also
var FirstClass = Class.create( { // The initialize method
serves as a constructor initialize: function () { this.data • Ajax (programming)
= “Hello World"; } });
• Comparison of JavaScript frameworks

Extending another class: • script.aculo.us


Ajax.Request = Class.create( Ajax.Base, { // Over- • Mootools JavaScript Framework
ride the initialize method initialize: function(url,
options) { this.transport = Ajax.getTransport(); • jQuery
this.setOptions(options); this.request(url); }, // ...more
methods add ... });
4.1.6 References
The framework function Object.extend(dest, src) takes [1] http://prototypejs.org/core
two objects as parameters and copies the properties of the
[2] Usage of JavaScript libraries for websites
second object to the first one simulating inheritance. The
combined object is also returned as a result from the func- [3] Defining classes and inheritance, in the Prototype docu-
tion. As in the example above, the first parameter usually mentation
creates the base object, while the second is an anonymous
[4] Class-based vs prototype-based languages, in
object used solely for defining additional properties. The
mozilla.org’s JavaScript guide
entire sub-class declaration happens within the parenthe-
ses of the function call. [5] Inheriting Properties, in mozilla.org’s JavaScript guide
4.2. SCRIPT.ACULO.US 87

[6] kangax (5 April 2010). “What’s wrong with extending the effects there are over 16 additional effects using combi-
DOM”. Retrieved 6 April 2010. nations of the core effects out of the box. Programmers
can also extend existing and create new effects.
[7] Zakas, Nicholas C. (2 March 2010). “Maintainable
JavaScript: Don't modify objects you don't own”. Re- Enabling an effect is a matter of assigning an element with
trieved 6 April 2010. an ID name and one line of code for the effect. Below is
an example for the Effect.Fade effect applied to a DOM
[8] Almaer, Dion (6 April 2010). “Prototype 2.0 will not ex- element with an ID of 'message-box':
tend the DOM”. Retrieved 6 April 2010.
new Effect.Fade('message-box');
[9] Resig, John (26 March 2008).
“getElementsByClassName pre Prototype 1.6”. Re-
This will cause the target ID to fade in opacity and end
trieved 6 April 2010.
by setting the CSS “display” property to “none”.
Various other settings within the effect can be modified,
4.1.7 Bibliography such as the duration of the effect and the range of the
effect:
• Orchard, Leslie M.; Pehlivanian, Ara; Koon, Scott;
new Effect.Fade('message-box', { duration: 2.0, from:
Jones, Harley (August 31, 2009). Professional
0.0, to: 0.8 });
JavaScript Frameworks: Prototype,YUI, ExtJS, Dojo
and MooTools (1st ed.). Wrox Press. p. 888. ISBN
978-0-470-38459-6. This would fade the element, but stop when the effect is
80% complete (with an opacity of 20%).

4.1.8 External links


Controls
• Official website
Controls offers user interface elements including:
• Official Prototype API documentation
• Drag And Drop
• Prototype Examples
• Draggables
• Droppables
4.2 script.aculo.us
• Sortables
script.aculo.us is a JavaScript library built on the • Slider
Prototype JavaScript Framework, providing dynamic vi-
sual effects and user interface elements via the Document • Autocompletion
Object Model (DOM).
• In Place Editing
It is most notably included with Ruby on Rails and
Seaside, but also provided separately to work with other
web frameworks and scripting languages. Builder
script.aculo.us was extracted by Thomas Fuchs from his
Builder allows creating DOM elements dynamically. Us-
work on fluxiom, a web based digital asset management
ing the sample code below:
tool by the design company wollzelle.[1] It was first re-
leased to the public in June 2005. element = Builder.node('div',{id:'ghosttrain'},[
Builder.node('div',{className:'controls’,style:'font-size:
11px'},[ Builder.node('h1','Ghost Train'),
4.2.1 Features “testtext”, 2, 3, 4, Builder.node('ul',[
Builder.node('li',{className:'active',
script.aculo.us extends the Prototype JavaScript Frame- onclick:'test()'},'Record') ]) ]) ]);
work by adding visual effects, user interface controls, and
utilities. ...creates the following (without whitespace):
<div id="ghosttrain"> <div class="controls”
Visual effects style="font-size:11px"> <h1>Ghost
Train</h1> testtext234 <ul> <li class="active”
There are five core effects script.aculo.us offers: Opacity, onclick="test()">Record</li> </ul> </div> </div>
Scale, MoveBy, Highlight, and Parallel. Through these
88 CHAPTER 4. FRAMEWORKS

4.2.2 References
[1] Ajaxian » Audible Ajax Episode 12: Thomas Fuchs of
Script.aculo.us

4.2.3 External links


• Official website

• scriptaculous on GitHub

• script.aculo.us documentation wiki


• Unofficial Prototype & Script.aculo.us wiki and
FAQ created by community members
Chapter 5

Text and image sources, contributors, and


licenses

5.1 Text
• HTML Source: https://en.wikipedia.org/wiki/HTML?oldid=772253968 Contributors: Lee Daniel Crocker, Brion VIBBER, Uriyan, Zun-
dark, The Anome, Koyaanis Qatsi, JeLuF, Gianfranco, SJK, William Avery, Mjb, Hirzel, Patrick, Michael Hardy, Chris-martin, Fred
Bauder, Voidvector, Tannin, Wapcaplet, Dramatic, Ixfd64, Cyde, Eurleif, Arthur3030, Skysmith, Eric119, Alfio, Tregoweth, CesarB,
Ahoerstemeier, HarmonicSphere, Haakon, Mac, Ronz, Jpatokal, Den fjättrade ankan~enwiki, Александър, Llull, Andres, Palfrey, Rl,
Ghewgill, Mydogategodshat, Hashar, Okome~enwiki, PatriceNeff, Crissov, Jay, Fuzheado, Rednblu, Traal, Haukurth, Tpbradbury, Fur-
rykef, Alexfiles, Mattworld, Omegatron, Traroth, Joy, Jens Meiert, Jusjih, Guppy, Jeffq, Shantavira, Rogper~enwiki, RickBeton, Saqib
(usurped)~enwiki, Robbot, Chealer, Noldoaran, Pigsonthewing, Fredrik, RedWolf, Moondyne, Psychonaut, Lowellian, Costello, Postdlf,
Rholton, Rursus, Texture, Caknuck, Hadal, Profoss, Ledgerbob, Jor, Fab, Tea2min, David Gerard, Enochlau, Dave6, Giftlite, Philwiki,
Smjg, DocWatson42, SamB, Kerttie, Andy, Inter, Lethe, Herbee, Bradeos Graphon, Everyking, Markus Kuhn, Filceolaire, Rick Block,
LLarson, Lurker, Guanaco, Tom-, Mboverload, Siroxo, AlistairMcMillan, Horatio, Richard cocks, Neilc, Chowbok, DocSigma, Wasabie,
Antandrus, Beland, OverlordQ, Oneiros, Mzajac, OwenBlacker, Fuper, Mysidia, QuiTeVexat, MishaChan, Anirvan, Kelson, Urhixidur,
Burschik, Joyous!, Goobergunch, Jh51681, Karl Dickman, BeakerK44, Mmj, Eliazar, Liquid Flash, Abdull, Zondor, Trevor MacInnis,
Canterbury Tail, Kate, Bluemask, DavidL (usurped), Mike Rosoft, Brianjd, D6, RossPatterson, Discospinster, Rich Farmbrough, Guanabot,
Mecanismo, Timsabin, YUL89YYZ, MeltBanana, Mani1, Pavel Vozenilek, Paul August, Blade Hirato~enwiki, Bender235, ZeroOne, Zy26,
Andrejj, Acq3, Kjoonlee, Breon, Jonathanischoice, Rich13, Plugwash, Violetriga, Bdk, Danakil, Cap'n Refsmmat, Zenohockey, RoyBoy,
Triona, Leif, Coolcaesar, Bobo192, Nigelj, Whosyourjudas, Smalljim, Shenme, SpeedyGonsales, Vystrix Nexoth, Unknown W. Brackets,
Minghong, Wrs1864, Maebmij, Sean Kelly, Nsaa, Lysdexia, Jumbuck, Zachlipton, Alansohn, Gary, Mduvekot, Rand~enwiki, Sheehan, In-
teriot, CyberSkull, Jeltz, NSK, Riana, Sade, Kurt Shaped Box, Kocio, Redfarmer, Mrholybrain, Hu, Llbbl (usurped), Jmh~enwiki, Velella,
TheRealFennShysa, Saga City, Vcelloho, Josh3736, RainbowOfLight, Sciurinæ, Mikeo, GeoffPurchase, Bsadowski1, A brisson, Versageek,
Mattbrundage, Redvers, Netkinetic, Trustle, Dan100, Html~enwiki, Kbolino, DanielVonEhren, Alfrin, Simetrical, Bushytails, OwenX,
Mindmatrix, Georgia guy, Ataru, Camw, LOL, Decrease789, Uncle G, Benbest, Scjessey, NeoChaosX, Ruud Koot, Dodiad, Jeff3000,
SergeiRichard, Damicatz, Dionyziz, Goystein~enwiki, Eyreland, Toussaint, Xiong Chiamiov, TNLNYC, Palica, Rufous, Tslocum, Qw-
ertyus, Galwhaa, David Levy, FreplySpang, CarbonUnit, KramarDanIkabu, Reisio, Sjö, Jorunn, Rjwilmsi, P3Pp3r, Koavf, China Crisis,
Ikh, Amire80, JoshuacUK, Tangotango, Pudleek, Salix alba, MZMcBride, Jollybengali, CQJ, R.e.b., N-Man, Bubba73, Afterwriting,
Williamborg, Aapo Laitinen, Sango123, Florihupf, Dionyseus, J2000ca, FlaBot, Ian Pitchford, RobertG, Heycam, Crazycomputers, Nivix,
RexNL, Gurch, Alexjohnc3, TheDJ, Intgr, Goeagles4321, Terrx, Jesse0986, Tysto, Joshebosh, Chobot, DVdm, Bgwhite, WriterHound,
Gwernol, Cornellrockey, Shervinafshar, The Rambling Man, Theymos, YurikBot, Wavelength, Klingoncowboy4, ThunderPeel2001, Spike-
Jones, Angus Lepper, RobotE, Sceptre, Poldi~enwiki, Todd Vierling, Hairy Dude, Gyre, Charles Gaudette, Fayte, Phantomsteve, Michael
Slone, Fabartus, Spainhour, SpuriousQ, Matt Fitzpatrick, Hydrargyrum, Stephenb, Gaius Cornelius, Rsrikanth05, Pseudomonas, Bovi-
neone, Bullzeye, NawlinWiki, ENeville, Wiki alf, Mipadi, UCaetano, Bachrach44, Test-tools~enwiki, Grafen, Nutiketaiel, Irishguy,
Saoshyant, Aaron Brenneman, Raven4x4x, Iancarter, Lomn, MySchizoBuddy, Zwobot, Snarius, Brat32, Av2917, DeadEyeArrow, Bota47,
Kewp, Snareklutz, Szhaider, Alpha 4615, Wknight94, Ms2ger, Mholland, Sumanthk, Tribaal, Lt-wiki-bot, Nacimota, Ageekgal, Closed-
mouth, Mike Selinker, Josh3580, GraemeL, Fram, JLaTondre, Dhavalhirdhav, ArielGold, Sitegod, Caballero1967, F. Cosoleto, David
Biddulph, Rwellington, RunOrDie, Suburbanslice, Katieh5584, Purple Sheep, NeilN, Minkus, Rwwww, KNHaw, DVD R W, Sepsis13,
Squirrel Boy, Luk, Veinor, BonsaiViking, SmackBot, MattieTK, Alan Pascoe, Pbb, Ashenai, Classicfilms, Moeron, Rtc, Incnis Mrsi, Knowl-
edgeOfSelf, Unyoyega, Pgk, C.Fred, Bazza 7, KocjoBot~enwiki, Jtneill, WookieInHeat, ElDakio, Frymaster, Brossow, WildElf, Canthusus,
Scott Paeth, Alsandro, Alex earlier account, Zzymyn, Yamaguchi , Aksi great, King Bob324, Gilliam, Ohnoitsjamie, Skizzik, Chaojoker,
Qtoktok, PJTraill, Fetofs, Anachronist, AstareGod, Chris the speller, Jamie C, Robert Wellock, CrookedAsterisk, Master of Puppets,
BabuBhatt, Oli Filth, EncMstr, King Arthur6687, James Fryer, Doug Patriarche, SchfiftyThree, Jerome Charles Potts, Nbarth, Vbigdeli,
DHN-bot~enwiki, Methnor, Konstable, YggY, Ado, Zsinj, Dethme0w, Tsca.bot, Can't sleep, clown will eat me, Shalom Yechiel, Tamfang,
Frap, Onorem, Tim Pierce, Jennica, Nixeagle, TheKMan, Rrburke, Bogtha, GeorgeMoney, Addshore, RedHillian, Midnightcomm, UU,
Answerthis, Mgearfan, Cybercobra, Nibuod, Makemi, Nakon, Teehee123, EVula, RolandR, Shadow1, Mistress Selina Kyle, Lcarscad,
Markymarkmagic, Taare, Drc79, Buidinhthiem, Evlekis, Bart v M, MOO, DKEdwards, Kukini, Homo sapiens, The undertow, Sashato-
Bot, Dave314159, Rory096, Iball, Xerocs, Zahid Abdassabur, Sunroof, Kuru, Ergative rlt, Euchiasmus, Simonkoldyk, Cadderly, Nellisks,
NeantHumain, JorisvS, Dumarest, Minna Sora no Shita, CaptainVindaloo, BioTube, Tbc42, Tasc, JRS124c41, Waggers, Dammit, Jgrahn,
Ryulong, MrDolomite, GorillazFanAdam, Rory O'Kane, Xihix, Hetar, BranStark, DouglasCalvert, Iridescent, Arntuuri, Michaelbusch,
Dreftymac, Theone00, Xaagkx, Wjejskenewr, Sander Säde, J Di, Huo Ma Ke, Igoldste, Blehfu, Rangi42, Adambiswanger1, Courcelles,

89
90 CHAPTER 5. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

Moocowisi, Tawkerbot2, Daniel5127, Jasrocks, Conrad.Irwin, Amniarix, SkyWalker, JForget, Sakurambo, Hetzer, Unixguy, CmdrObot,
Code E, Porterjoh, Mattbr, Makeemlighter, Gmd588, Ruslik0, KnightLago, Maxiom, Jaxad0127, Leujohn, The gergster, Madda, Kenny-
luck, Cydebot, Krauss, MC10, Vanished user vjhsduheuiui4t5hjri, Gogo Dodo, SetiHitchHiker, Bazzargh, Studerby, Hsivonen, Msreehar-
sha, Tawkerbot4, Clovis Sangrail, Shirulashem, Codetiger, Torc2, DumbBOT, Kozuch, Ward3001, Neustradamus, Omicronpersei8, JodyB,
MicahElliott, Geekosaurus, UberScienceNerd, Saintrain, Timbl, Epbr123, Bot-maru, Wermlandsdata, Monkle, Mbell, Dasani, Hervegirod,
Kablammo, Ucanlookitup, Mojo Hand, Trevyn, Marek69, John254, A3RO, Nezzadar, DavidLeeLambert, Lowercase, Jgr 94, Dfrg.msc,
NigelR, TFunk, CharlotteWebb, Tonyseeker, Cplot, Natalie Erin, Folic Acid, Escarbot, I already forgot, Martinvie, Mentifisto, Sidasta, An-
tiVandalBot, Chicgeek, Majorly, Luna Santin, Guy Macon, Mvjs, Seaphoto, Chacor, QuiteUnusual, Antique Rose, Prolog, Jj137, TexMur-
phy, LibLord, Farosdaughter, Gdo01, Zedla, DennisWithem, Wolf grey, Romestar, Carewolf, Jordan Rothstein, Myanw, Static17, Minun,
Gökhan, JonathanCross, Golgofrinchian, Swamilive, JAnDbot, Durrantm, Leuko, Barek, MER-C, The Transhumanist, Moneysaver67,
Andonic, Roleplayer, Faerycircle, Snowolfd4, PhilKnight, Doctorhawkes, LittleOldMe, Bencherlite, Typochimp, CrizCraig, Penubag, Ma-
gioladitis, Connormah, Pedro, Bongwarrior, VoABot II, Kuyabribri, JNW, Kakomu, Mbc362, Swpb, Think outside the box, A10brown,
Janadore, Tedickey, Rami R, Wileyc427, Jatkins, Skew-t, Twsx, JPG-GR, Cic, Aka042, Recurring dreams, Diegosolo, SparrowsWing,
Dsolovay, Animum, Adrian J. Hunter, Wwmbes, Allstarecho, Just James, EstebanF, Glen, DerHexer, Esanchez7587, Patstuart, -bilal92-,
Bitbit, Xhosan, 0612, Daviecat, MartinBot, PAK Man, Pádraig Coogan, ShaunL, Mattjs, JayJayKay~enwiki, Rettetast, Speck-Made, Face-
boyjim, Ramesh Chandra, Thirdright, An7drew, J.delanoy, Captain panda, Pharaoh of the Wizards, Trusilver, Svetovid, Think777, Pursey,
Jesant13, TwigsterX, Ginsengbomb, Eliz81, Extransit, Mianbao~enwiki, NerdyNSK, Satchy, Vanished user 342562, Darth Mike, Lau-
rusnobilis, Cpiral, SharkD, JAKEhp55, Dispenser, Arronax50, Pikminlover, Tannkremen, TomyDuby, McSly, Lordtopcat, Dabomb45,
Tbisonman123, AntiSpamBot, Xmonicleman, Plasticup, LtEarth, TomasBat, NewEnglandYankee, Nwbeeson, Aervanath, Gabrielhobro,
Master shepherd, Xander756, Ljgua124, Potatoswatter, Smitty, KylieTastic, Sarmenhb, Cometstyles, Lakeishikawa, Remember the dot,
ACBest, DorganBot, Nphase, Niceguydave, Sarregouset, Kvdveer, MartinRinehart, Bonadea, Izno, Howcome, Squids and Chips, Idioma-
bot, Funandtrvl, Joeinwap, Wikieditor06, Lights, X!, Chinneeb, VolkovBot, Jorioux, Zcorpan, Xyzu, Jeff G., Indubitably, Blackden-
imgumby, Rharding13, Lear’s Fool, Cenet47, Philip Trueman, TXiKiBoT, Oshwah, Zidonuke, Vanished user 98wiejfno34tijsfoiwefjlok5y,
Vipinhari, Rei-bot, Wikidemon, HarryAlffa, Drestros power, Arnon Chaffin, ScriptingMaster, Crazyhead4, Rick Jelliffe, Anna Lincoln,
Lradrama, Ontoraul, V.v.vinaybabu, JhsBot, Leafyplant, BwDraco, Hamitr, Drappel, DieBuche, IsaacGS, Cremepuff222, David Con-
drey, NetOracle, Csdorman, Liberal Classic, Fenring, Maxim, Opgfss, LamCarLL71, Madhero88, Odinjobs, Andy Dingley, Enigmaman,
Xieqi200, Rougieux, Meters, Synthebot, Falcon8765, Cole1234567890, Alone363, MelanieBeth, Drake2007, BlackCab, LittleBenW,
Logan, Yelling Bird, Legoktm, Zotag, Austriacus, Tbg connor, Demmy, Kbrose, The Random Editor, Illinoisavonlady, SieBot, Cof-
fee, Fsminc, Scarian, Nestea Zen, PanagosTheOther, Lordofnerds, Dawn Bard, Caltas, Eagleal, RJaguar3, Yintan, Gfonetobe, Vanished
user 82345ijgeke4tg, Purbo T, Purplepickle10, Xenophon777, Formerly the IP-Address 24.22.227.53, Bentogoa, Happysailor, Iitim4two,
Chridd, JSpung, Allmightyduck, Oxymoron83, Antonio Lopez, Lightmouse, Tombomp, SH84, KathrynLybarger, BenoniBot~enwiki, Sar-
venCapadisli, OKBot, Hornyman121, WOFall, JohnSawyer, Spitfire19, XU-engineer, Simplexplus, Mojoworker, StaticGull, Rcairnsjr, Sen
Mon, Adi necromancer, Hostime, Jacob.jose, Mygerardromance, Paulinho28, Lianmei, Denisarona, Escape Orbit, Vonones, VanishedUser
sdu9aya9fs787sads, WikipedianMarlith, Loren.wilton, ClueBot, Hightilidie, LAX, Binksternet, The Thing That Should Not Be, Dmoore-
satx, VsBot, Neelchauhan, Jan1nad, Donovans, Lawrence Cohen, Quinxorin, Enthusiast01, Supertouch, Taroaldo, Pomadgw, Freebul-
lets, Squash444, Will052690, LukeShu, AntiSlice, Lantay77, Timberframe, Shonda13, Ryoutou, Attlas, Blanchardb, Soc5555, Isoft isoft,
Μάριος Ζηντίλης, Manishearth, Popadooodle7, Robert Skyhawk, Excirial, Yaniv p, Lochsley, Gtachiki, Gwguffey, MorrisRob, Vivio
Testarossa, Rhododendrites, Brews ohare, NuclearWarfare, Cenarium, Wwwqwerty, Jotterbot, Leadv0cal, Dekisugi, Tempmj, Mikaey,
Oswald07, RuneScapez, MadMax45, Bald Zebra, Chiman9321, Thingg, Aitias, 7DaysForgotten, Boxing245, Egmontaz, Party, Akira-
otomo, Braddunbar, Tommyqiscow, DumZiBoT, Mrxwindows, Hogman500, Joeyman111, XLinkBot, Fastily, Ultramince, Spitfire, Gwan-
doya, RkOrton, Rror, Sakura Cartelet, OsoLeon, 007spyguy7, James-Y2J-fan, Nepenthes, WillOakland, Avoided, Burket, Sujgfjfgjhgjgj,
Mitch Ames, WikHead, Cmr08, Jswarchinghimer, Alexius08, Noctibus, RP459, Subversive.sound, HarlandQPitt, Vianello, Airplaneman,
Thatguyflint, Getsnoopy, Addbot, Xp54321, Gamekid276, Ifinditfunny, Willking1979, Some jerk on the Internet, Mabdul, TheGeek-
Head, Fyrael, Queux, Haruth, Kongr43gpen, Sparkmonkey7, Fgnievinski, Wtni, LovinHTML, Fieldday-sunday, CanadianLinuxUser,
Fluffernutter, EricCanada75, Protonk, PranksterTurtle, Glane23, Nate Wessel, Karl gregory jones, Waterret, Favonian, AtheWeather-
man, LinkFA-Bot, Jasper Deng, Tyw7, Tassedethe, Numbo3-bot, Prince-of-Life, Tide rolls, Tim Mckee, Worlddominater08, Jarble,
Bartledan, Manjo mandruva, Elizabeth Barnwell, Legobot, Yobot, Bunnyhop11, Ptbotgourou, Fraggle81, Tundra010, Yulelee, Leastmi-
nor, Tael, THEN WHO WAS PHONE?, Rajakhr, Jeffz1, Skaarlaw, Mrnobody228, Eric-Wester, Vampic, AnomieBOT, Cq142, One-
freeinternet, Chazubell, Message From Xenu, Jim1138, Galoubet, Penguinboyroy, 9258fahsflkh917fas, Piano non troppo, Hopscotch23,
Betax, Kingpin13, Flewis, Materialscientist, MorgothX, Frankenpuppy, Nifky?, Nut er, Gsmgm, Lturbine, Whileupper, Obersachsebot,
Xqbot, Costadelsponz, TinucherianBot II, Sionus, Addihockey10, Capricorn42, Armstrong1113149, Wperdue, 07w109, Morefight, Nas-
nema, Gilo1969, Grim23, Withoutmark, Jmundo, Ched, Galanothowns, L5138, StunitTeam, Tyrol5, Ruby.red.roses, KingHippo777, In-
ternoob, HDrake, Nasa-verve, Frosted14, Pandamonia, Shirik, RibotBOT, West Coast Gordo, Jetrink, Trevorpittz, Jacosi, Fert81, PO-
TUS270, Shadowjams, Miyagawa, Acka47, Sesu Prime, RetiredWikipedian789, Magic.Wiki, GT5162, EpiQ SkiLL, FrescoBot, Sajidsa13,
Logiphile, OspreyPL, Paine Ellsworth, Anton Sergeev, Lucy75, Uxgeoff, Charrua85, Johnnybravo2009, Djahmednawaz, Islamicinfo, Bri-
anreavis, Buzgun, Kwiki, Safinaskar, Jakesyl, Zorgelo, Flashesarenight, Redrose64, Ringling9, Pinethicket, ShadowRangerRIT, I dream
of horses, HRoestBot, Jonesey95, Wikiuser00008, MJ94, Calmer Waters, Jake11899, Mutinus, Hoo man, Carineduwez, Impala2009,
MastiBot, Serols, SpaceFlight89, Petree69, Sjpr73, DMBradbury, Prapsnot, Pcuser42, Arlo Barnes, Weylinp, Unbreakable comb, Pranay-
rocks23, Hiuhuhihiuh, Abc518, FoxBot, Sreeriz, Kakistocrator, Lotje, Nako16, Dinamik-bot, Vrenator, TBloemink, Extra999, Killr833,
Lilgamer64, Chat de jutiapa guatemala horcones, Mr.98, Spherems, Nman252, Jhone29, Ayansen1988, Diannaa, Gerhard Loeb, Ied-
itU4good, Genhuan, BaseballByrd, Reach Out to the Truth, Burns28, Sharon08tam, Aodonnel, DARTH SIDIOUS 2, Wolfhoundfeet,
Nations114, Sheatrevor, Onel5969, Mean as custard, Cliffsblog, Mrfencey, Bento00, DexDor, Amerias, Prosenzweig, Tomchen1989, Be-
critical, Thaqtipkilla, Kcmartz, Vickey Xiong, Chickenandpasta, Deagle AP, Lineplus, Bmsshubham, Pwt-wsu-ap, EmausBot, Orphan
Wiki, Tntc.tig, WikitanvirBot, Gfoley4, Beeshoney, Yt95, GoingBatty, RA0808, Np123456, Dcdspace, RenamedUser01302013, Van-
ished user zq46pw21, Yellow & Blue Music, Rabbabodrool, The Mysterious El Willstro, Dmsdjing, Tommy2010, Winner 42, Wikipelli,
Dcirovic, K6ka, Tudorol, Pielover88888, Thecheesykid, TheDrakoman, AlecFTW, Rima p.r, D'oh!, Josve05a, Traxs7, GranterOfMercy,
Wes.turner, Cfust, Briansince1988, MithrandirAgain, Maypigeon of Liberty, Enrique00a, ‫פארוק‬, Anir1uph, Empty Buffer, Asiansryum-
meh, Virtual Loïc, Dylthaavatar, Rizwanazizshaikh, Wasala555, Demonkoryu, Zap Rowsdower, Wayne Slam, Tolly4bolly, Gregoroq,
BrokenAnchorBot, Lipyn, Shyluv, Donner60, Wipsenade, Jamesamber, Bomazi, Chesshead123, Chesspapa, MainFrame, ChuispastonBot,
Forever Dusk, Epicchamantha, DASHBotAV, Hacker9001, George Makepeace, Dixwerr, Faramir1138, ClueBot NG, Unisubs, Aerospeed,
Frankdushantha, Matthiaspaul, MelbourneStar, Jcollumbell, Metinisim, Recon62, Satellizer, PaleCloudedWhite, Wiklinkwonder, Carbon
editor, Pokemonblackds, Andrew Kurish, O.Koslowski, Asukite, Ekphraster, 336, Widr, Telpardec, Blaise170, Anupmehra, Fltyingpig,
ZacharyM001, Helpful Pixie Bot, Chickenjock, Jrichardsing, Captain Superman, Titodutta, Thatspartanguy, Calabe1992, Wbm1058,
5.1. TEXT 91

Schuy B., Technical 13, Doorknob747, Lowercase sigmabot, BG19bot, Island Monkey, Nathanswan, Krlozanov, KamranMackey, Vagobot,
Way2tutorial, Iamjaypatel, AlphaBlogshow, Kangaroopower, Harkamal1001, MusikAnimal, Frze, OneCuteElmo, Ashutosh.ukey, Ram-
neek Sharma(MCT), Follishere, Mark Arsten, Compfreak7, Joshianurag21, Joydeep, NotinREALITY, RussiaRussia, Matthewp1998,
Spokestrip EMP, Tharinduewe, Vannhuthanh, Makandal14, DavidLeader, Gysenn, Insidiae, Glacialfox, Toto Mommam, Loriendrew,
Klilidiplomus, Ajsandbach, Shanky.lonely, Hanitirkey, BattyBot, FootholdTechnology, David.moreno72, Darylgolden, SupernovaExplo-
sion, Pratyya Ghosh, JDewint, Cyberbot II, Timothy Gu, GoShow, Jamila60, Sibtain 007, Worden.lee, EuroCarGT, Ducknish, JYBot,
Dexbot, Rezonansowy, Norazizahhashim, I call the big one bitey, Mogism, Killerkur1, SiBr4, Assisted Reputation, Mrkjohnson, Blake-
man909, Lugia2453, Frosty, Tayyab mm, Booruguru, Flrgf, Itchytoes, Jscbiss, CCamp2013, Anand Kishore Jha, Reatlas, Bluexephos
Sjin, Mark viking, Xela722, Jnelmark101, Crisskooper, FallingGravity, Marsupium, I am One of Many, Zaveri123, Htmlwiki, Jdbener,
Shivajivarma, Mompati Dikunwane, Tentinator, Waqaee, AnthonyJ Lock, Timmothytheman, Saleh0167, Jemee012, TechFilmer, Salam-
nam30, Haminoon, A owen1978, Blackraider7, LieutenantLatvia, Dexmediainc, Uwe Lück, My name is not dave, Ginsuloft, George8211,
Motemota9, JWNoctis, Sam Sailor, Thesloth34, Mustha jm, TCMemoire, Francois-Pier, Jyothiug17, Dvorapa, Dkwebsub, King.escanlar,
Meteor sandwich yum, Dastoger Bashar, CelesteMarkham, JaconaFrere, Jforjaxi, Himankpathak, Salton Finneger, Dixwerrr, RicoZep-
plin, Prestotron55, Your moms cousin, Adamali2002, Awesome Spider, Monkbot, Yugals20, BatmanArkhamOriginsV3, LucasandEmma,
Mdwhit, BOB34655, Notchrealm, TheQ Editor, சு.க.மணிவேல், Stronglolo, Ha1230, QueenFan, Sunmist, Sonia Terver, Lord Marcellus,
KH-1, ChamithN, Maths314, Gurjyottheman, Arvind asia, Zppix, TeaLover1996, Ertyupoi, Zabshk, Some Gadget Geek, Niki201, HTML-
Rulez, Muhammad Ijaz Javed, BoxOfChickens, Alefbeis, ToonLucas22, Hotsystem52, Keisuke3804, Tralala0, Bdurf, Amazingcf.cool, An-
drean rapz, Qsx753698, KasparBot, Milind Bordia BSHS, Waqas012, Gurbir Singh Dhaliwal, Thejas16496, Prajwal R Sajji, My Chemistry
romantic, Ross MacPhee, Glory of Space, Manasaramoju, AniruddhaChatterjeeOUA, Bigwilly10, Gorgond, Lemondoge, MonDavis, Za-
master4536, HTMLPanda, Garg.M2K, Amolyadav0099, EightTwoThreeFiveOneZeroSevenThreeOne, Yabgo Mubassir, Heeeheee10101,
Lukace8, Kutless02, GSS-1987, Callum.McTear, Krishna2636, Qzd, Doulph88, Stevan.keselj95, Shafran franzy, Jcmendo, Riddhi2015,
Amitmarkel, Justiceray1998, Cybergauntlet, NgYShung, Yadavrohit2003, Naveen Akash, Shaunyalad88, Shakibul Alam Risvy, GreenC
bot, UnidentifiedHuman721, DynaGirl, Werthert, Full Rune, AtlasDuane, VarunFEB2003, Hello8287556846, Rhowladar, Superuser56,
Shantoa0, Bender the Bot, Vk khandal, Sanjaunita23, DUBSSC, NAYAN 1, Kaustubh Gole, Sitfluseo, Fakejmeno, Bibek pudasaini and
Anonymous: 2210

• HTML5 Source: https://en.wikipedia.org/wiki/HTML5?oldid=772104631 Contributors: The Anome, Jrincayc, Pnm, Julesd, Glenn, Sug-
arfish, Ed Brey, Crissov, Jay, Thue, Bevo, Nickshanks, Indefatigable, Hankwang, Chealer, KeithH, Nurg, Pingveno, Rursus, Jleedev, File-
mon, Mdmcginn, BradNeuberg, David Gerard, Centrx, Giftlite, Tremolo, Philwiki, Anym, Graeme Bartlett, SamB, Fudoreaper, Ciantic,
Resistor, Michael Devore, LLarson, Itpastorn, Matt Darby, Pgan002, Beland, Oneiros, Eyewax, Mmj, Mike Rosoft, SimonEast, Perey,
Smyth, Traxer~enwiki, Bender235, RoyBoy, Causa sui, Nigelj, Artw, Hectigo, Tms, Tlaresch, RPaschotta, Quatermass, CyberSkull,
PatrickFisher, RoySmith, Sligocki, Kocio, Gpvos, CloudNine, Ubernostrum, BDD, HenryLi, Stemonitis, Noz92, Simetrical, Mindma-
trix, Asav, Oliphaunt, Armando, Sabin4232, Jenrzzz, GregorB, Meneth, Male1979, Mdale, RichardWeiss, DePiep, Reisio, Cortland-
Klein, Rjwilmsi, Koavf, JHMM13, MZMcBride, FlaBot, Ultimatewisdom, Volox, Ysangkok, Nogburt, Alexjohnc3, Riki, Spencerk,
Chobot, Pauldwaite, Todd Vierling, Hairy Dude, Bhny, Jengelh, Manop, Tenebrae, Rsrikanth05, SamJohnston, Anomalocaris, Srini-
vasasha, Saoshyant, CecilWard, Shepazu, ScottyWZ, Voidxor, Leotohill, Jeremy Visser, Smaines, Ms2ger, Rwxrwxrwx, LarryLACa,
Canley, Johnadowell, JLaTondre, Locke Cole, Veinor, SmackBot, Samdutton, Reedy, Andres Agudelo, Vald, Doctor Nick, BiT, Nil
Einne, Grawity, Dr. Elwin Ransom, Primaryspace, Yamaguchi , Gilliam, Brianski, Ohnoitsjamie, Ppntori, NickGarvey, Chris the
speller, Tantek, Thumperward, Snori, Gareth, Adpete, Emurphy42, Gyrobo, Onorem, Aubray1741, Racklever, Rrburke, Cybercobra,
Pwjb, Trbdavies, Mistress Selina Kyle, Daniel.Cardenas, Ser Amantio di Nicolao, Kuru, Iliev, Domokato, Dl2000, Stephen B Streater,
Ariel Pontes, JHP, Paul Foxworthy, RekishiEJ, Happy-melon, Meow, Grasshoppa, FatalError, FleetCommand, CRGreathouse, CmdrObot,
Deon, Tentonbricks, Phatom87, Cydebot, Krauss, MC10, JJC1138, Urashimataro, Blaisorblade, Hsivonen, Lachlan Hunt, Neustradamus,
Thijs!bot, Biruitorul, Eggsyntax, Webmaren, Bllix, Keithjgrant, Davidhorman, Philu, Darkwarriorblake, Widefox, Seaphoto, BenJWood-
croft, Willscrlt, Nelziq, Leinad, Darklilac, Hexene, Eamonnca1, Dogru144, MER-C, Vicsar, Nthep, Le Sage~enwiki, H3llbringer, Che-
lentano, Wllm, Jahoe, Repku, Philbayer, Bongwarrior, Rubenreyes, Data2action, Rugops, WhatamIdoing, GregU, Erikdw, Connor Behan,
Bitbit, AVRS, Nikpapag, R'n'B, Nunojpg, CommonsDelinker, DrFrench, Mange01, Jonathantneal, NerdyNSK, Ellisbjohns, Ignatzmice,
Maduskis, KohanX, Grshiplett, NewEnglandYankee, Nwbeeson, Ljgua124, MartinRinehart, Funandtrvl, Mcarrera, Zcorpan, TobyDZ,
Danchr, Station1, Wxidea, TXiKiBoT, Mizusajt, MichaelKohlhase, Eville84, Ontoraul, Wiikipedian, Jackfork, David Condrey, Fenring,
Milan Keršláger, Andy Dingley, PeterEasthope, Vdavid2, Darxus, SoopahMan, SieBot, Coffee, Dawn Bard, Yintan, Jerryobject, Alexbrn,
JLKrause, Nopetro, Jonsteroo, RW Marloe, Barry Fruitman, Alex.muller, WOFall, Svick, Inputdata, Winterheat, Digisus, Dolphin51,
Struway2, ClueBot, Prohlep, Binksternet, Artichoker, Zeptomoon, JWilk, ImperfectlyInformed, Nnemo, Gaia Octavia Agrippa, Adrianwn,
Gallaecio, 12cool725, Pointillist, AWiersch, Barkermn01, Kitsunegami, Jorge.casar, OzuYatamutsu, Sonicdrewdriver, CodeCaster, Clair-
voyant walrus, NikitaVasilev, StevenDH, Brianpeiris, DumZiBoT, XLinkBot, Sogle, Alexius08, Subversive.sound, Horrabin, Gabriel2008,
Macan55~enwiki, Addbot, Mortense, Annevk, Mabdul, Scottman1995, Knight of Truth, Runecats, Kankachi1980Kan, Scientus, De-
bloper, Bngsudheer, CarsracBot, Debresser, Favonian, Adagio67, Jasper Deng, Jarble, Luckyz, Snookerman, Ben Ben, Luckas-bot, Yobot,
Ptbotgourou, Anon1345, KamikazeBot, Kirov Airship, AnomieBOT, Rubinbot, 1exec1, NickK, Materialscientist, Kehtabp, Obersach-
sebot, Xqbot, Meewam, Peterdx, Eutelsat, Hkdobrev, Flying sheep, GrouchoBot, Grosshat, Kwoksir, Jetrink, Curtmcd, Hondarox715,
Thyako, Thehelpfulbot, Uusijani, FrescoBot, Anna Roy, LucienBOT, Lucy75, Nakakapagpabagabag, Teotocopulos, Sae1962, Democrat-
icmacguitarist, Takimata, Ankitasdeveloper, Maggyero, Wikipincompk, DrilBot, Pinethicket, Bandito4u, I dream of horses, Titomuerte,
Kalki101, Xyz98711, Spidermario, Hoo man, RedBot, Dog786, Lineslarge, Motherlover2012, ZxPezz, Famous anus, DixonDBot, Rod-
moten, Dinamik-bot, Everrob, KarlDubost, Extra999, Athaba, MrX, Aoidh, Henry hedden, Alex Chamberlain, Crysb, Jackdrogba, Gen-
huan, Macromediax, Melnakeeb, DARTH SIDIOUS 2, SlipperyGun, Onel5969, RjwilmsiBot, Bangsanegara, Notetp, Tomchen1989, Lop-
ifalko, Songcycle, Born2bgratis, EmausBot, WikitanvirBot, Angrytoast, BillyPreset, Dewritech, GoingBatty, TommmL, Marcos canbeiro,
AoV2, Icedragz, Solarra, Tommy2010, Vivekanandanpdy, Dcirovic, Yeepsi, AvicBot, D'oh!, MattCuts, John Cline, Cogiati, Mdagr8,
AmAnisa, Andrejbuday, Josve05a, Mikldt, Cfust, Flohsuchtliebe, Best Dog Ever, Html5, Azuris, Caspertheghost, Demonkoryu, Hwost,
JosJuice, Html5cn, L Kensington, Madsenfr, Palosirkka, It writer, Jcubic, Kasrjoel, Orange Suede Sofa, Captbalbo, Bomazi, MainFrame,
Norman.u.sy, ChuispastonBot, GermanJoe, Colejohnson66, Senator2029, FreedomCultist, PaulCager, Adila1360, ClueBot NG, Fijiweb-
design, Gareth Griffith-Jones, Jamesrdf, Greedohun, DokReggar, Candace Gillhoolley, TorayL, Samuel.G.Mills, Bluewind25, Masssly,
Unicomp21, Kevindeedavis, Lawsonstu, Kingbean1, Canceo, Rathigpe, Helpful Pixie Bot, Oppenheiter, Tart2000, Aurora1900, Achinikh,
Snakeskincowboy, BG19bot, Chikiliver, PhnomPencil, MusikAnimal, Nsda, Abhik0904, Compfreak7, Secarrie, Arjunpsd, Dvdjns234,
Crh23, TechGizmo, Html5gallery, Chmarkine, Harizotoh9, Shubhee, Bcxfu75k, Beleavali, Sdesalas, Victorgno, MC1302, Oren Bala-
ban, Rubinkumar, Html5cn org, Anbu121, Gsnedders, AllenZh, TimothyJPitt, Reliablesource12345, Turbohans, Swapnil raja, Brijesh-
gosai, ChrisGualtieri, Infotechnology, GoShow, Annieh129, SD5bot, Hnetsec, Saravanakumarc5, Rezonansowy, Thiagotpc, Jennifer-
reid2012, Codename Lisa, SoledadKabocha, Evad37, Agon Avdimetaj, HelicopterLlama, Sailee5, Techdude3331, Foonarres, NoMat-
92 CHAPTER 5. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

terTryAgain, Corn cheese, ChPietsch, Nyssen, Petrjaros, Melonkelon, Miningpyropony, Sawerchessread, Decodedlabs, Comp.arch, Gin-
suloft, SmeyHAcker, Html5forum, Sajid130, REM888, Speedok, Dvorapa, Mathian123, Villanator, Poponuro, Shubhamanandcs, TheEp-
Tic, ILeoable, TheSirLachlan, Mgt73, Punterf17, Lor, Ha1230, Jezzashum1, Ktb12, Donosauro, DSCrowned, Applekid2001, Magyar25,
KH-1, ChamithN, Bizzforest, Physicsmathftw, Calexander23, Ertyupoi, Html5beginners, Jonnymoon96, SoSivr, Tralala0, Dahal sanghar-
sha, , Gaelan, Nemoanon, AudA8, Rizwan201593, GreenC bot, Gulumeemee, MisterRandomized, NasssaNser, Bender the Bot,
Shantokabir999 and Anonymous: 546

• JavaScript Source: https://en.wikipedia.org/wiki/JavaScript?oldid=772802469 Contributors: Damian Yerrick, AxelBoldt, Carey Evans,


Brion VIBBER, Bryan Derksen, Zundark, Taw, Dragon Dave, Andre Engels, Arvindn, Nate Silva, Ben-Zin~enwiki, Hannes Hirzel, Maury
Markowitz, Ellmist, Mjb, Hirzel, Chuq, Milly, Jim McKeeth, Frecklefoot, Patrick, EvanProdromou, Oliver Pereira, Lousyd, Rp, Col-
labi, Wapcaplet, Seav, Tabrez, TakuyaMurata, GTBacchus, Geoffrey~enwiki, Minesweeper, Patrick Corcoran, Mkweise, Ahoerstemeier,
Ronz, Nanshu, Snoyes, Den fjättrade ankan~enwiki, Brettz9, Jonathan Chang, Poor Yorick, Scott, Wael Ellithy, Mxn, Ed Brey, Ylbis-
sop, Agtx, Emperorbma, Guaka, Timwi, Dcoetzee, Dysprosia, Jay, Geary, Kroum, Belgarat, Miernik, Greenrd, Zoicon5, Selket, Tp-
bradbury, Jake Nelson, Maximus Rex, Furrykef, Ed g2s, Wernher, Bevo, Dbabbitt, Finlay McWalter, Saqib (usurped)~enwiki, Robbot,
Mazin07, Chealer, Fredrik, R3m0t, RedWolf, Peak, Psychonaut, Rursus, Bergie, Idiotfromia, Andrew Levine, David Edgar, Eliashed-
berg, Ledgerbob, Jor, Mattflaschen, Peter L, Mfc, Tea2min, Filemon, David Gerard, McDutchie, Ancheta Wis, Centrx, Giftlite, Smjg,
Graeme Bartlett, DocWatson42, DavidCary, ComaVN, Nick8325, Chrisdolan, Lethe, Lupin, Brian Kendig, Zigger, Everyking, No Guru,
Gamaliel, Aoi, Wikibob, Presto8, Rick Block, Itpastorn, DO'Neil, Gilgamesh~enwiki, Quamaretto, Gracefool, Cloud200, Prosfilaes, Al-
istairMcMillan, Spe88, Neilc, Erich gasboy, Utcursch, Kjetil r, Dasch, Piotrus, Lesgles, The MoUsY spell-checker, Wzwz, Rdsmith4,
Oneiros, MFNickster, Kesac, Sam Hocevar, Troels Arvin, Tsemii, Wadsworth, Frau Holle, Asqueella, Corti, Guppyfinsoup, Rfl, Reinthal,
Imroy, Kenny TM~~enwiki, Discospinster, Rich Farmbrough, Rhobite, Guanabot, Hydrox, Qutezuce, Robmv, Ardonik, Rufustfirefly,
Smyth, Bender235, ESkog, Goplat, AdmN, Violetriga, Danakil, CanisRufus, BernhardBauer, Cap'n Refsmmat, 80N, Edward Z. Yang,
Chairboy, PhilHibbs, Muntfish, Jpgordon, Nigelj, Spalding, Stesmo, Irrbloss, Blonkm, Smalljim, Func, BrokenSegue, Shenme, Cmdr-
jameson, Wisdom89, Artw, Lhtown, Richi, L.Willms, SpeedyGonsales, Nk, B0at, Minghong, Runner1928, Sam Korn, Jumbuck, Plest,
Alansohn, Gary, Gerweck, ZmiLa, Guy Harris, Nealcardwell, Mikething, Fchoong, ABCD, Psz, Fistboy, Hu, DreamGuy, Snowolf,
Blobglob, Wtmitchell, Velella, Paul1337, Sciurinæ, Zin~enwiki, VoluntarySlave, Versageek, Zootm, MIT Trekkie, Chester br, Ring-
bang, Paul.irish, Mikenolte, Trustle, Forderud, ZakuSage, Kenyon, Oleg Alexandrov, Lego614, Daveydweeb, Mindmatrix, Recnilgiarc,
TarmoK, Uncle G, Oliphaunt, Stickguy, Jacobolus, Bratsche, Cpu111, JFG, Ruud Koot, Matijap, Sir Lewk, Grika, Damicatz, Gre-
gorB, Waldir, Wayward, Mckoss, Toussaint, Tokek, Chazwatson, Rufous, Gerbrant, Graham87, Magister Mathematicae, Quantum00,
Galwhaa, Charles Iliya Krempeaux, Reisio, Rjwilmsi, Tizio, Susan Davis, JVz, Koavf, Quale, Yuval Madar~enwiki, Jake Wartenberg,
Kinu, XP1, Amire80, Rschen7754, JonathanAquino, Zaak, Ekspiulo, Vegaswikian, NeonMerlin, CQJ, Brighterorange, Erkcan, The wub,
Keimzelle, Sleepyhead81, Andreas S., Fred Bradstadt, Aapo Laitinen, Sango123, ColinJF, FlaBot, VKokielov, Ysangkok, Crazycom-
puters, Who, Nivix, RexNL, Intgr, Jagginess, Delfuego, D.brodale, Tysto, Antimatter15, King of Hearts, Typhoonhurricane, Chobot,
Frappyjohn, DVdm, Bobdc, Bgwhite, Gwernol, PointedEars, The Rambling Man, PhilipR, YurikBot, Wavelength, Todd Vierling, Hairy
Dude, Charles Gaudette, Tophu, Martinhenz, Peter S., Pi Delport, Phantombantam, Groogle, SpuriousQ, Hydrargyrum, David Wood-
ward, CambridgeBayWeather, Rsrikanth05, Cryptic, Shanel, Insouciance, Wiki alf, Razorx, CecilWard, PlusMinus~enwiki, Mikeblas,
Leotohill, SFC9394, BOT-Superzerocool, Rwalker, Bota47, Hgmichna, Syed, Gzabers, Nlu, Ms2ger, Mütze, Donbert, Rbirkby, Zzuuzz,
Super Rad!, Jeresig, Ankles, Closedmouth, Astrobloby, GraemeL, Femmina, Enkauston, Allens, Kungfuadam, Tyomitch, GrinBot~enwiki,
Liujiang, David Wahler, Crystallina, A bit iffy, SmackBot, Slamb, Faisal.akeel, Moeron, Sebflipper, KnowledgeOfSelf, Georgeryp, Steve-
holt, Roberto Cruz, Maian, AndyZ, Ultramandk, I3enhamin, Hbackman, Cronium, Edgar181, Yamaguchi , Gilliam, Ohnoitsjamie,
Hmains, Skizzik, Chaojoker, Martin.kopta, BenAveling, Chris the speller, Davigoli, Rgqld, OzFred, SlimJim, Theone256, Thumperward,
Oli Filth, MalafayaBot, SineQ, OrangeDog, Jerome Charles Potts, Nbarth, Kungming2, DHN-bot~enwiki, Thekaleb, Zven, Javalenok,
DTR, NYKevin, PotatoEater, Shalom Yechiel, Frap, Nixeagle, Michael.Pohoreski, TheKMan, Bogtha, Anfernyjohnsun, SundarBot, UU,
Opticyclic, Radagast83, Cybercobra, Irish Souffle, Mrwigg1es, MichaelBillington, Dreadstar, Marc-André Aßbrock, Mistress Selina Kyle,
Brainyiscool, Derek R Bullamore, Acostin, DMacks, Matt.forestpath, Daniel.Cardenas, Er Komandante, Vasiliy Faronov, Jonhanson,
Ahda, Vriullop, JavaKid, Nezticle, OcarinaOfTime, Thefuzzballster, Mr.Clown, JorisvS, Sundström, Minna Sora no Shita, Joffeloff,
Scetoaux, Aleenf1, IronGargoyle, Spiel, 16@r, Jec, Tasc, Boomshadow, Optimale, Opticsnake, Rizome~enwiki, Larrymcp, Optakeover,
Manifestation, EdC~enwiki, RG~enwiki, Vanished user tj4iniosefjoisdkwk4ej5, SubSeven, Hu12, Jack Waugh, Iridescent, Dreftymac,
Greenie2600, JuanIgnacioIglesias, Sander Säde, IvanLanin, Vocaro, Paul Foxworthy, Igoldste, Shwaza, Oobug, Aeons, LeeU, Tawker-
bot2, BBuchbinder, Grayczyk, Slippyd, FatalError, SkyWalker, JForget, Linuxerist, Ludwig Boltzmann, Ahy1, Dycedarg, RedRoller-
skate, JohnCD, Nczempin, Engelec, Joncnunn, DaveK@BTC, Caspian Tern, NickW557, Ieee8023, WeggeBot, Cwillm2, AndrewHowse,
Cydebot, Samuell, Gogo Dodo, ST47, Guitardemon666, Garyp01, Christian75, Herorev, DumbBOT, Sweecoo, Kozuch, Trigger hurt,
MarK~enwiki, Scarpy, Arb, Nol888, Mcclurmc, Nearfar, ScalarField, Weka, Hervegirod, Superslacker87, Vertium, Afrobuddy, SomeS-
tranger, Mnemeson, Hcobb, EdJohnston, CharlotteWebb, Griba2010, SusanLesch, Stybn, I already forgot, Dantheman531, Hires an editor,
AntiVandalBot, Widefox, Obiwankenobi, Prolog, CForrester, DennisWithem, Yellowdesk, Carewolf, JAnDbot, Xhienne, Husond, Barek,
MER-C, The Transhumanist, Drizzd~enwiki, Fetchcomms, Faerycircle, Eliot1785, Wllm, Wasell, SteveSims, Bencherlite, Magioladi-
tis, Bongwarrior, VoABot II, Transcendence, Think outside the box, Tedickey, Broofa, Jlerner, Steven Walling, Aka042, Mouchoir le
Souris, Jmartinsson, SparrowsWing, Cat-five, GroovySandwich, Ensign beedrill, Jobanjohn, Stuffandthings, A3nm, Toddcs, Spellmaster,
MarekPro, Jodi.a.schneider, Avijitguharoy, InvertRect, Epochbb, IlliterateSage, Oroso, Gwern, Salarmehr, Ian Bailey, AVRS, Greenminz,
MartinBot, Shantirao, AmitDeshwar, Combustablejo, Matifibrahim, Bobcat hokie, Artemis-Arethusa, Nikpapag, Yaron K., Andytuba, Ar-
cholman, R'n'B, CommonsDelinker, Ramesh Chandra, Akronym, Jmccormac, LedgendGamer, Michaelmorrison, Felipe1982, Thirdright,
Ex-dude329.4, J.delanoy, Pharaoh of the Wizards, Rgoodermote, Philcha, Macaldo, Rhinestone K, Technome, Darkride, Jesant13, Qat-
ter, KeybladeSephi, Neonmario, MatheoDJ, Cpiral, Eskimospy, SharkD, Paercebal, Illicium, Charles.2345, Dispenser, Mahewa, McSly,
Ryan Postlethwaite, Gurchzilla, Pyrospirit, Chriswiki, Daniel5Ko, Illeoebnbbu, Sayer55512, Moonyfruit, SJP, Zojj, Largoplazo, Mile-
fool, Juliancolton, Inomyabcs, Prakshal, Tigerwolf753, Rbucci, Ajfweb, MartinRinehart, Bonadea, Sjforman, Useight, BBilge, Idioma-bot,
Funandtrvl, Sceeuk, Gunuag, Deor, VolkovBot, ABF, The Wild Falcon, Grumpycraig, AlastairIrvine, Markcsg, Kengaroo, Suprcel, TXiKi-
BoT, Oshwah, Enozkan, Tumblingsky, Dindon~enwiki, Miranda, Nxavar, Rei-bot, Muzzamo, JokarMan, Rich Janis, Martin451, Don4of4,
Tpk5010, Lambyte, Aerton, PDFbot, Inseeisyou, Andrewrost3241981, Caiguanhao, Neilerdwien, Saturn star, CO, Nali4Freedom, Andy
Dingley, Brendan Eich, Anna512, AgentCDE, Digita, Someguyonthestreet, Why Not A Duck, LittleBenW, Hongguo, Thron7, Bfpage,
S-n-ushakov, SieBot, Coffee, Gorpik, ThirdSide, Malcolmxl5, Caltas, Matthew Yeager, Eagleal, RJaguar3, Execvator, Bamkin, Jerry-
object, Happysailor, Flyer22 Reborn, Dlexc, Jwadeo, Jimthing, Sleventis, Oxymoron83, Antonio Lopez, Bionicseraph, Hello71, Cépey,
AlanUS, Neilshermer, StaticGull, Cyfal, Marklbarrett, Dodecagon12, WikiLaurent, Echo95, Bpeps, Lianmei, Familyguy0108, Mypall-
mall~enwiki, Tuntable, Explicit, Dlrohrer2003, Extremecircuitz, Martarius, 31stCenturyMatt, ClueBot, Urbanus Secundus, Surfeited, Ciu-
dadanoGlobal, The Thing That Should Not Be, VsBot, Jan1nad, Quinxorin, Cptmurdok, ColinHelvensteijn, Mild Bill Hiccup, Boing! said
5.1. TEXT 93

Zebedee, Yamakiri, Yamakiri on Firefox, Niceguyedc, Nate879~enwiki, Edknol, BinaryWeapon, Mikehtw~enwiki, Excirial, Robbie098,
Cash cab, Resoru, 12 Noon, Njuuton, Marcoxa, Lartoven, JackyBrown, Gaurav21r, Cenarium, Arjayay, ModDJesus, Ennajm, Nashleyj,
JustinStolle, Sealican, MilesAgain, Calor, Thingg, TOReilly, Bwickery, Johnuniq, Justie1220, Aaroniba, Griffdb, DumZiBoT, Psychcf,
Kiensvay, XLinkBot, Spitfire, Rror, Lucas Malor~enwiki, W0ozy5ho0t3r, Avoided, TFOWR, Mifter, HundoUno, BBL5660, Thatguyflint,
Udittmer, Addbot, Mortense, Ghettoblaster, Clsdennis2007, Mabdul, Pearll’s sun, Ronhjones, Mr. Wheely Guy, Samwr1234, Canadian-
LinuxUser, Mariano.viola, Garrycl, Odaravlaac, Looie496, Cst17, Skyezx, MrOllie, Protonk, Flager, Nickin, Glass Sword, AndersBot,
AnnaFrance, Mob590, Jasper Deng, Tassedethe, Prince-of-Life, Lightbot, Gail, Jarble, Margin1522, Legobot, Yobot, Aman2008, Mid-
inastasurazz, Fraggle81, Legobot II, Becky Sayles, Adam Hauner, Azylber, QueenCake, KamikazeBot, Mbarone911, Wonderfl, Birdie-
Galyan, Rohitjs, Synchronism, AnomieBOT, Brenhein, Wikieditoroftoday, Apollo1758, Cliciu, The Parting Glass, Message From Xenu,
Jim1138, IRP, Wickorama, Royote, Brilliant trees, Piano non troppo, Betax, Kingpin13, Gowr, BP7865, Lukasblakk, RandomAct, Sam-
fosteriam, Materialscientist, ImperatorExercitus, To Fight a Vandal, Citation bot, RealityApologist, Nifky?, Xqbot, Pacoup, Fwerdna,
James.abley, Capricorn42, Dhtml, Singhvivender, Visualpiano, DSisyphBot, 1wolfblake, Psalmstrist cheifprosperity, ANGGUN, Choron-
zon111, Greatfermat, Xedret, OLENJONNE123, Srich32977, Fornitani, HDrake, Florencefc4eva, Omnipaedista, RibotBOT, Amaury,
Abhkum, January2009, Mangst, GigAtomixxX, Phette23, Toyotabedzrock, Tabledhote, Joaquin008, E0steven, Sclark23, A.amitkumar,
Sushiflinger, Themasternerd, Krinkle, Amitie 10g, FrescoBot, Mark Renier, W Nowicki, Lucy75, Recognizance, Canonical Rush, D'ohBot,
Josneville, Website-andrew, Astroman3D, Sae1962, Mfwitten, Machine Elf 1735, Citation bot 1, Maggyero, Winterst, Pinethicket, I dream
of horses, Vicenarian, Grammarspellchecker, Ngyikp, Sboy365, Hoo man, RedBot, Amgc56, Serols, Σ, Lemon octopus, Xudifsd, Ran-
domStringOfCharacters, Jandalhandler, CH3374H, Beao, Juanr2099, Civilis~enwiki, Userask, Monority, HyperCapitalist, Desiblast, Para-
dox7798, Txt.file, Necromantiarian, FoxBot, TobeBot, Vishwanatharondekar, DixonDBot, Jesus Presley, Mnemonicof, ItsZippy, Lotje,
Nako16, Zakawer, TheMuffinWalkers, Zvn, Delcnsltmd, Drsquirlz, Aoidh, Antipastor, TheTechFan, Diannaa, Genhuan, Tbhotch, Jeep-
daySock, Cazyius, DARTH SIDIOUS 2, NameIsRon, Wikieat, Killab14, Dexterv, NerdyScienceDude, Yuki Konno, Skamecrazy123, Lae-
sod, Ljr1981, Lacqui, EmausBot, John of Reading, Chrisman247, MVelliste, Dewritech, GoingBatty, Jteplitz602, JaeDyWolf, Weirdo134,
Wikipelli, K6ka, AsceticRose, Jasonanaggie, Alisha.4m, Kkm010, Hosmich, Daonguyen95, Ida Shaw, Elefectoborde, Knutkj, Shuipzv3,
Hblank, SlowByte, Lanxiazhi, DonToto, MithrandirAgain, Westley Turner, Lateg, Grunny, Derekleungtszhei, The Nut, Csusbdt, Wa-
terfalls12, Stemoc, Fred Gandt, AquaGeneral, Dhtmlkitchen, Demonkoryu, AManWithNoPlan, Samliew, Benjaminoakes, Sbmeirow,
Rostz, L Kensington, තඹරු විජේසේකර, Donner60, Gm4, Jcubic, Mohammad khallad, Denbosch, Eventualentropy, Matthewrbowker,
Kookiethebird, Marioluigi98, Abhishekitmbm, Mister Mormon, 28bot, Gregersrygg, Nanud, ClueBot NG, Joeytje50, Smtchahal, Bad-
man11, Gilderien, Javalikescript, Mmick66, Vikingurinn, Frietjes, Muon, Glen 3B, Widr, Microgoal, Theopolisme, Lukestanley, Helpful
Pixie Bot, Titodutta, Troy.hester, Lowercase sigmabot, B1KWikis, BG19bot, Krenair, Iselilja, Misericord, Iamjaypatel, Waldred, Iamy-
ourdoom61, Abc123456person, Neøn, StudioFortress, Nathan2055, MusikAnimal, Bacon and the Sandwich, Geraldo Perez, Pertekm,
Davidiad, Alexlur, Official Spokesman, AdamTReineke, Suzukaze-c, Khaled0147, Compfreak7, Altaïr, LongLiveMusic, GGShinobi,
Kincc, Boshomi, Butch566, Bob Re-born, Writ Keeper, Rulojuka, Lexprfuncall, CreamPies, Jnigam33, Klilidiplomus, Saken kun, Dav-
eed84x, Conifer, Rickynails, Fuse809, M k amin, Jfd34, FootholdTechnology, David.moreno72, Cimorcus, Ferdaw, Osoviejo, Madhusu-
dan N, Kshtiz005, Arr4, Mrt3366, Cyberbot II, TheColdestFusion, Vibhabamba, Cccrrraaaiiiggg, ChrisGualtieri, Vossfeldt, Abody97,
MithunRT, Eagleeyes91, Ylandra, Rezonansowy, Jollysunbro, Codename Lisa, Webclient101, Nozomimous, TwoTwoHello, Lugia2453,
Graphium, Jamesx12345, Zziccardi, LMANSH, Samee, Cslayden, Mrcoles, Faizan, Theo’s Little Bot, Demonking123, Bill the hairy troll,
Miller9904, UltimateSupreme, François Robere, Dogoteacher, Danielsig89, Ferdinandojfoo, Funfeat, Voddan, Ericleads, DavidLeighEllis,
Jdaudier, Jemee012, JimABC123, Impinball, Comp.arch, Chacho3x, Ugog Nizdast, Pseliger, Edilbert.fernando, Ginsuloft, George8211,
Dejansp, DavidGamote, Dvoudheusden, Softzen, Ehhthing, FockeWulf FW 190, Dough34, Dee59, VeryCrocker, Wingtat, Coolmtl,
YETIURL, DylanYang963, Wyattbergeron1, Nil4you, Xue Fuqiao, 22merlin, Sapper-fi, Monkbot, Codestorm, SelkeyMoonbeam, San-
tiLak, C1776M, HiRayne, Nadipaty, Cameronwil, Domsacraft, LibertyChick1776, Nobody particular, HMSLavender, Gowtham ganguri,
Thelegender, Nelsonkam, Amanda Smalls, Chris.lajoie, Blakewenloe, ❃Adelaide❃, NekoKatsun, Trommelbohne, ModerationIsTheKey,
TheCORRECTiNFO101, AdlenGharbi, IK80813, Minibiswas, DanBhentschel, Eric0928, KasparBot, RippleSax, Supaplex, Sirodoht,
Surf770, Oluwa2Chainz, , Daniellacapriato, Ross MacPhee, CAPTAIN RAJU, Marinintim, Lemondoge, ProgrammingGeek,
Avisinthetoolbarn, Johanvanl, 7144217137gay, Frenchua, Jae Whot, Wilson simanjuntak or wilsonowners, Qzd, Doulph88, Sequoia se-
quoia, Hyperforin, Xeridanguy, Elaenia, GreenC bot, Devodevo2002, Rajnandu, WikiAltron64, Membean, SavbeGrm2Z, Prahlad balaji,
Superchunk22, Opensourcenutter, Sdfovdsdfns, I2padams, Cyrus noto3at bulaga, Javascript123, Le fieber, MereTechnicality, Jake Brock-
man, DrStrauss, Hyperbolick, LibraryJess17, Jack535, OmanAly, OmarAlyi, Haz 001, Gmariani, Gamedeveloper44, COREA155 and
Anonymous: 1603

• Cascading Style Sheets Source: https://en.wikipedia.org/wiki/Cascading_Style_Sheets?oldid=772368595 Contributors: Derek Ross, BF,


Mav, Bryan Derksen, Zundark, Tarquin, Ed Poor, Andre Engels, Hari, SimonP, Ben-Zin~enwiki, Hannes Hirzel, Hirzel, Mintguy, Rbrwr,
Edward, Bdesham, Patrick, Michael Hardy, Pnm, Sam Francis, Wapcaplet, Dramatic, Ixfd64, Cyde, TakuyaMurata, Islandboy99, Paul
A, Repabil, Minesweeper, Tregoweth, CesarB, Ellywa, Ahoerstemeier, Sam Hughes, Mac, Nanshu, Angela, Brettz9, Darkwind, Andrewa,
Aarchiba, Andres, Rl, Mxn, Crissov, Davidzuccaro, Andrevan, Natekoechley, Sanxiyn, Zoicon5, 4serendipity, Furrykef, Tero~enwiki, Jnc,
Omegatron, Bevo, Gamera2, Nickshanks, Joy, Indefatigable, Jens Meiert, Skrim, Pilaf~enwiki, Robbot, Lambda, Noldoaran, Pigsonthew-
ing, Fredrik, Andymatic, RedWolf, Moondyne, Altenmann, Psychonaut, Nurg, Lowellian, Sverdrup, Academic Challenger, Sheridan, Wik-
ibot, Profoss, Aetheling, Diberri, Gwicke~enwiki, Mattflaschen, MikeCapone, Tea2min, Alerante, Albatross2147, Philwiki, DocWatson42,
Ryanrs, Gtrmp, Ævar Arnfjörð Bjarmason, Rick Block, LLarson, Guanaco, Tom-, Mboverload, AlistairMcMillan, Wranga~enwiki, Dar-
rien, Pne, Uzume, Christopherlin, Utcursch, Alexf, Jim Dabell, LucasVB, Goog, Beland, Onco p53, Ricky~enwiki, Taka, Ilgiz, MFNickster,
Unkenmann~enwiki, Maximaximax, Bodnotbod, Two Bananas, Sam Hocevar, Wevah, Mschlindwein, Bbpen, M1ss1ontomars2k4, Zondor,
Grunt, Thorwald, Shagie, Dbaron, Schmiddy, Rfl, AliveFreeHappy, Reinthal, Imroy, Lifefeed, RossPatterson, Discospinster, Rich Farm-
brough, Pmsyyz, Wikiacc, Smyth, Roybb95~enwiki, Bender235, ESkog, Andrejj, Kjoonlee, Violetriga, Nabla, Macinta, Kwamikagami,
Buxtor, Root4(one), RoyBoy, Femto, Kgaughan, Bobo192, Nigelj, Spalding, Circeus, Army1987, Smalljim, John Vandenberg, Orbst,
Enric Naval, Shenme, SpeedyGonsales, Jerryseinfeld, Tomgally, Unknown W. Brackets, B0at, Minghong, Sam Korn, SilasM, Pharos,
Jumbuck, Alansohn, Gary, Will.law, Trhaynes, Guy Harris, Rand~enwiki, CyberSkull, Verdlanco, SlimVirgin, Water Bottle, Hoary, Roy-
Smith, Snowolf, Wtmitchell, TheRealFennShysa, Hadlock, Godheval, Suruena, Danhash, Match, Henry W. Schmitt, Dzhim, Computerjoe,
Jtrainor, Versageek, MIT Trekkie, Timdorr, Mattbrundage, Redvers, HaleakalAri, Richwales, Feezo, Weyes, NantonosAedui, Makeyour-
self, Simetrical, OwenX, Stevo99, Mindmatrix, Ohyoko, Ataru, CrazyDreamer, Webdinger, Ae-a, Jpers36, Snodnipper, Jacobolus, JFG,
Qaddosh, Dodiad, Netdragon, GregorB, Plrk, Waldir, Zeerus, Hughcharlesparker, Toussaint, Tokek, Brownsteve, Fi9, Nick1nildram, Pal-
ica, Rufous, Rgbea, Mandarax, Avnit, Jannetta, Graham87, Magister Mathematicae, Lastorset, Webzero, BD2412, Yurik, GrundyCamellia,
Matt.Ramos, Dweinberger, Reisio, Jshadias, Rjwilmsi, EktoGamat, Mzhao, Amire80, Quiddity, Pudleek, Captmondo, Crazynas, Acrea-
ture, The wub, Sleepyhead81, Fred Bradstadt, Aapo Laitinen, FlaBot, AJR, Abrooks, Gurch, Ahunt, Smartsmith, Typhoonhurricane,
Mikeb2204, Chobot, DVdm, Bgwhite, PKates, Gwernol, Banaticus, Elfguy, Raelx, The Rambling Man, YurikBot, Wavelength, Borgx,
94 CHAPTER 5. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

Aleahey, Eraserhead1, Sceptre, Todd Vierling, Gyre, Adam1213, Arado, Hydrargyrum, Chensiyuan, Rsrikanth05, Bovineone, Wiki alf,
ONEder Boy, Lee Begg, Nick, Aaron Brenneman, Brandon, CecilWard, Azazell0, Dputig07, Iancarter, Misza13, Alex43223, Xompanthy,
Jcranfordteague, DeadEyeArrow, Robertbyrne, Smaines, Elysianfields, Ms2ger, Rwxrwxrwx, Vonfraginoff, Zzuuzz, Cedar101, Gulliveig,
SMcCandlish, Tvarnoe~enwiki, Petri Krohn, GraemeL, Thany, Naught101, PhS, Smurfy, David Biddulph, ViperSnake151, CIreland, Bog-
gie~enwiki, SG, Sardanaphalus, Stalfur, SmackBot, Moeron, ThreeDee912, KnowledgeOfSelf, TestPilot, Unyoyega, KocjoBot~enwiki,
Mzanime, Yamaguchi , Gilliam, Ohnoitsjamie, Folajimi, Hmains, Tantek, Bluebot, Jaderobbins, Thumperward, Snori, Oli Filth, Es-
tellevw, DHN-bot~enwiki, Tarikash, A. B., Sct72, Hgrosser, Deenoe, DTR, Kotra, Can't sleep, clown will eat me, Mulder416, Frap,
Parasti, TheKMan, Bogtha, Sam*, UU, Sp0ngebong, Demm, Andrew c, Neshatian, Memiux, Daniel.Cardenas, LeoNomis, Dririan, Karl-
Hofmann, Charivari, Will Beback, SashatoBot, Gennaro Prota, LtPowers, Rklawton, Solascriptura, Attys, Zearin, Longsight, Sunroof,
Kuru, MarcMacé, Ninjagecko, Rigadoun, Sercotec, Skigamemaker, JorisvS, Teknobo, Greg9885, IronGargoyle, PseudoSudo, 16@r,
Loadmaster, Kompere, Spazquest, Pixelate, Saerdnaer, Tmcw, Emil Stenström, Dr.K., MTSbot~enwiki, MyOwnLittlWorld, Lee Carre,
GorillazFanAdam, Rory O'Kane, Mvsrhollywood, Dreftymac, Rssaddict, Joseph Solis in Australia, IvanLanin, The editor1, Vorkronor,
Shwaza, RekishiEJ, Amakuru, Claudelepoisson, Rangi42, Tawkerbot2, Pantoufle, Dan1679, ChrisCork, FatalError, SkyWalker, Be-
coming, Kodiak3000, WeggeBot, Moreschi, Zinjixmaggir, Katecat, HalJor, Cydebot, Fnlayson, Krauss, Treybien, MC10, DavidHN,
Jwilkinson, Voodoochilli, Garyp01, Kiramonin, Energetic is francine@yahoo.com, Kevpatt, Fashionablelovelyelysia@yahoo.com, Lach-
lan Hunt, Geekosaurus, Mbabb, Thijs!bot, Epbr123, SESchreiber, Joltinjoe@madclaw.com, Ucanlookitup, Teh tennisman, Mojo Hand,
Jojan, Cplot, Escarbot, Dainis, I already forgot, AntiVandalBot, Ais523, Luna Santin, Seaphoto, JoaoPinheiro, Edokter, Rballou, Care-
wolf, Nyltimes, Canadian-Bacon, Dreaded Walrus, JAnDbot, Blahbleh, Formation, MER-C, Chelentano, 100110100, Wllm, Jahoe, Siob-
hanHansa, Bibi Saint-Pol, Magioladitis, Bongwarrior, VoABot II, Nyq, Garrettcollins, TheSlyFox, Janadore, Dotjay, Twsx, T3gk, Mar-
linsRule, VegKilla, Toddcs, DerHexer, Lenticel, WLU, Patstuart, Falcor84, Bitbit, ENIAC, Gwern, AliaGemma, Hemidemisemiquaver,
MartinBot, Noodlenozzle, R'n'B, Ramesh Chandra, Whale plane, Thirdright, J.delanoy, Pharaoh of the Wizards, Megabytephreak, Philcha,
Think777, Jdevalk, Darkride, Jesant13, Adys, Extransit, Hippi ippi, Barts1a, Spyforthemoon, LordAnubisBOT, Berrie Leigh, Torf~enwiki,
Starnestommy, AntiSpamBot, Doom-chronicle, SmilesALot, Shoessss, Ultra two, Entropy, Mirithing, Rbucci, MartinRinehart, Bonadea,
Xetrov, Idioma-bot, Funandtrvl, Idarin, King Lopez, Xyzu, Jeff G., Voronwae, WOSlinker, Philip Trueman, Oshwah, Zurishaddai, Anony-
mous Dissident, HarryAlffa, Forpublic, Sintaku, Elyada, Retpyrc, BotKung, David Condrey, Ben Ward, Billinghurst, Andy Dingley, Fuz-
ztrek, Synthebot, Daypick, Digita, RaseaC, LittleBenW, EmxBot, Jonah22, Austriacus, S.Örvarr.S, SieBot, Dusti, Wikiweezil, BotMulti-
chill, Jack Merridew, Acasson, Eagleal, Robwbell, X-Fi6, Yintan, Althena, Byteful, Quest for Truth, Flyer22 Reborn, Momo san, Nopetro,
Jimthing, JSpung, R39525, Axelbaxel1, Oxymoron83, Mcpatnaik, KPH2293, AnonGuy, Lightmouse, Loving2007, Axistive, Djh00ligan,
Gladiool, OKBot, Inputdata, Hamranhansenhansen, WikiLaurent, Devbhagat, Superbeecat, Wisergirl, Lianmei, Hoplon, Atif.t2, Martar-
ius, Czert, Fmsgirl2, ClueBot, Samuel Grant, WurmWoode, The Thing That Should Not Be, Rodhullandemu, Danopticon, Vacio, Jan1nad,
ImperfectlyInformed, Zach4636, Mx3, Ohhllaaraven, ColinHelvensteijn, Artyom, PolarYukon, Darth NormaN, Blanchardb, Warriorccc0,
Alexbot, M4gnum0n, Goodone121, Erebus Morgaine, Lcchueri, Technobadger, NuclearWarfare, Airada, Jack-A-Roe, La Pianista, Aitias,
Indiejade, DumZiBoT, Mrxwindows, Fionagj, XLinkBot, Libcub, WikiDao, Gggh, Captainbenno, Tbuchber, Addbot, Mortense, Ghetto-
blaster, Mabdul, Betterusername, C3r4, Vishnava, Tweek787, CarsracBot, SHolte, Glane23, Favonian, Happysidhu, Jasper Deng, Quercus
solaris, RedXII, Tassedethe, Numbo3-bot, Andy1838, Pplperson, Hello. I'm new here, but I'm sure I can help out., Lightbot, OlEnglish,
A.I., Luckas-bot, Yobot, Lord chiggins monkey, Fraggle81, Jnivekk, Pcap, THEN WHO WAS PHONE?, Nallimbot, Jeffz1, KamikazeBot,
Skip405, Rohitjs, AnomieBOT, Truetech, Paulthomas2, 2o345h, Andresbuzzio, Wikieditoroftoday, Sabarigr, Jim1138, IRP, Piano non
troppo, Kingpin13, Mahmudmasri, Materialscientist, Citation bot, Phistuck, ArthurBot, Quebec99, Obersachsebot, Xqbot, NSK Niko-
laos S. Karastathis, Meewam, DSisyphBot, Hanberke, Cantons-de-l'Est, Omnipaedista, Shirik, Arcnova, Thoti, Shadowjams, Xenmor-
pha, LucienBOT, Techauthor, Johnnybravo2009, IvanM89, Ceblu, ZenerV, Enotia, Drew R. Smith, Neelam-user, Lutzmanfred, Jone-
sey95, Yerayo, Taimurkazmi, TedderBot, Trappist the monk, Haaninjo, Lotje, Nako16, Callanecc, Vrenator, Fhineman, Benbelly, Miller-
medeiros, Aojnews, Schmei, Gabaix, Josephndenton, Mean as custard, Ifly6, Ripchip Bot, Becritical, Robkelk, Mandolinface, Yakura,
EmausBot, WikitanvirBot, Nick1234554321, Heymid, Solarra, Tommy2010, Dcirovic, Entalpia2, Sepguilherme, AvicBot, Derekleungt-
szhei, Iwoeque, MountainHiker, Makecat, Selch, Benjaminoakes, L Kensington, Champion, Mikerq, It writer, Wikiloop, ChuispastonBot,
Senator2029, Opop12345678, TYelliot, Sven Manguard, Kompromissis, ClueBot NG, Smtchahal, Jnorton7558, Touranaut, Matthiaspaul,
Staylor67, Peterkingalexander, Wdchk, Pokemonblackds, Glen 3B, Kevindeedavis, Widr, Akmalzhon, Helpful Pixie Bot, Cssondss, Mu-
dassar16, Iprathik, Strike Eagle, Wbm1058, BG19bot, Iamjaypatel, GKFX, Joey836, The Great Bard, Butch566, Mtmacdonald, Astorije,
Ianb821, Superpiolopascual, Klilidiplomus, Anbu121, Winston Chuen-Shih Yang, Maniandram01, Constillationsconstillations, BattyBot,
Menseung, Swapnil raja, Timothy Gu, ChrisGualtieri, Kevin874, Pierre-Mael Cretinon, CarrieVS, TheRotarynotion, JYBot, Dexbot,
Rezonansowy, Dhanuthilaka, Hmainsbot1, Mogism, SiBr4, VistaMusa, Rbryanh, No or yes, SFK2, Jochen Burghardt, Vishuthegreat,
Qzykcc, Reatlas, TvojaStara, Epicgenius, HFEO, Lemnaminor, Postovalov, François Robere, Eyesnore, Waqaee, Anita13113, Sturoba-
bly, Babitaarora, Sitioparaprueba, Andrew Stiff, Mandruss, Bruno repert, Joerex101, Shawk, OutofTheBoxThinker, Dkwebsub, Stuntd-
dude, Amsfaithsoftware, Valentino1973, Meteor sandwich yum, JaconaFrere, Ediada, TheEpTic, AdamPro, Designyea, Monkbot, Funke
Makanjuola, Nescophe, Oweosc12, OMPIRE, Cluelesshobo, Tattoo360-digital, GiorgioMalvone, SeanR111, Webpromote1234, Properis,
Omkarsoft, Dibyendushome, ADeviloper, ScrapIronIV, Premkumar1991, LikeABaws2, Shortstackmomentum, KasparBot, Emily0077,
My Chemistry romantic, , Ross MacPhee, Kuljeetsinghseo, Lemondoge, Guizeler, Bpreston5, InternetArchiveBot, Webseol-
ogy, Ahoogabooga, GdTbDy, Centurytreedesigns, Devodevo2002, Marvellous Spider-Man, MBlairMartin, Robert R89442, Hein Ko Zin,
FOUAD1223, Sanjaunita23, Afifah Sausan, Sitefluseo, Mpoplili, Rajalakshmi Sridharan, OmarAlyi and Anonymous: 1007

• Dynamic HTML Source: https://en.wikipedia.org/wiki/Dynamic_HTML?oldid=771073610 Contributors: Peter Winnberg, Uriyan, Tar-


quin, SimonP, Ben-Zin~enwiki, Hannes Hirzel, Hirzel, Proteles, Frecklefoot, Karada, Haakon, Mac, Snoyes, Xamian, Nikai, Rl, Mxn,
Adam Conover, Harris7, Johnh123, Furrykef, Bloodshedder, Raul654, Robbot, Vespristiano, Pingveno, Texture, Wikibot, Andy, Lee J
Haywood, Noriirity, Curps, EdwardSabol, Mark T, AlistairMcMillan, Alan Au, Jrdioko, Christopherlin, Ato, Pgan002, Beland, Kusunose,
Lesgles, Icairns, Abdull, Smyth, Eric Shalov, Hhielscher, Plugwash, Andybak, Shanes, Richi, Minghong, Twexler, Jumbuck, Babajobu, Wa-
ter Bottle, Burn, Suruena, Henry W. Schmitt, Versageek, Mattbrundage, Adrian.benko, Ian Moody, Mindmatrix, Jacobolus, Firien, SDC,
Rufous, Graham87, Reisio, The-mart, Lugnad, Ravik, Sleepyhead81, Aapo Laitinen, Diablo-D3, FlaBot, Delfuego, WouterBot, Chobot,
YurikBot, Hydrargyrum, Akamad, CambridgeBayWeather, Alvinrune, Odii, Joshf, Welsh, Robchurch, Mikeblas, Jcranfordteague, Ms2ger,
Cyborg, GraemeL, David Biddulph, SmackBot, Samdutton, Mithril Cloud, Ohnoitsjamie, Kurykh, CrookedAsterisk, Thumperward, Oli
Filth, Extender~enwiki, DHN-bot~enwiki, Tsca.bot, GeorgeMoney, Warren, Spiritia, Kuru, RandomPrecision, Ehheh, Manifestation,
Blamblamblam, Reverie98, Francl, IvanLanin, Wpbasti, Ceran, FatalError, Linuxerist, Randhirreddy, Nczempin, Jcubed, Dan Fuhry,
Mtmtmt, Simon Brady, Jack Phoenix, Ebrahim, Thijs!bot, Jagadish.arsanapallai, Ascelieno~enwiki, Trlkly, LindySoul, Joseph Sturtevant,
Manushand, JAnDbot, Jahoe, SiobhanHansa, VoABot II, Pulpulpullie, JamesBWatson, Fisher777, Dabizi~enwiki, MartinBot, Centpacrr,
Ramesh Chandra, Macaldo, Rbucci, Ajfweb, Vox Humana 8', VolkovBot, TXiKiBoT, Yugsdrawkcabeht, Alaa.moustafa, Andy Dingley,
Haseo9999, Digita, Pujols55, SieBot, Dwandelt, Alex.muller, ClueBot, BigRedPK, Mild Bill Hiccup, Excirial, XLinkBot, SwapsRulez,
5.1. TEXT 95

Alexius08, Mortense, Jncraton, Debresser, Pplperson, Ricvelozo, Legobot, Luckas-bot, Bunnyhop11, Amirobot, Materialscientist, Xqbot,
Šedý, Vanished user giiw8u4ikmfw823foinc2, Chenkie, Lemon octopus, Mbiama, DixonDBot, Nako16, Zvn, EmausBot, Demonkoryu,
ChuispastonBot, ClueBot NG, Gilderien, Dav-FL-IN-AZ-id, MultWiki, BG19bot, AvocatoBot, Ravikumar853, GoShow, AhmedYasser-
Salama, Carocad, Riceissa, TheFox21, , Skrishnasantosh, Edwinm and Anonymous: 212
• Ajax (programming) Source: https://en.wikipedia.org/wiki/Ajax_(programming)?oldid=770489771 Contributors: Damian Yerrick,
NathanBeach, Zundark, Yooden, Arvindn, Enchanter, SJK, SimonP, Shii, Frecklefoot, Edward, K.lee, Patrick, EvanProdromou, Bewilde-
beast, Wm, Kku, SGBailey, Wwwwolf, Ixfd64, Tregoweth, Egil, Ahoerstemeier, Mac, Ronz, Jebba, Ericross, Xamian, Kevin Baas, Palfrey,
GCarty, Olego, Ebruchez, David costanzo, Furrykef, Tempshill, James Skarzinskas, Ed g2s, Mdchachi, Bevo, Nickshanks, Rosdec, Jeffq,
Robbot, Chealer, Fredrik, RedWolf, Jmabel, Nurg, Pingveno, Academic Challenger, DHN, Rrjanbiah, Mervyn, Garrett Albright, Fuel-
bottle, Dina, Filemon, Hooloovoo, Cedars, Ancheta Wis, DocWatson42, SamB, Fennec, DavidCary, Akadruid, MeirM, Ferkelparade,
Bkonrad, Knut~enwiki, Rick Block, Frencheigh, JimD, Ceejayoz, Mboverload, Siroxo, AlistairMcMillan, Horatio, Khalid hassani, Pne,
Orrc, Golbez, Utcursch, M4rk, Pgan002, Nova77, Xmnemonic, Knutux, Beland, Dasch, MarkSweep, Mattd, Mahemoff, Jossi, Taka,
OwenBlacker, ICTlogist~enwiki, Jareha, Talrias, Ajdecandis, Cynical, Tzarius, TreyHarris, RainerBlome, John Mark Williams, TiMike,
Eric B. and Rakim, JoDiamonds, Jcw69, Ianneub, Seefeld~enwiki, Andreas Kaufmann, Master Of Ninja, Zondor, Adashiel, Frangibil-
ity, Safety Cap, RandalSchwartz, Ornil, Kmccoy, Rob cowie, Freakofnurture, Reinthal, Archer3, CharlesClarkson, Discospinster, Rich
Farmbrough, Rhobite, Rydel, Pmsyyz, Kjd, JimR, Notinasnaid, Abelson, Jovrtn, Zazou, Pavel Vozenilek, Paul August, Dmr2, Bender235,
Tooto, Spayrard, Furrygeek, Zscout370, Kiand, Kwamikagami, Aude, Shanes, Triona, Neilrieck, Leif, Perfecto, Bobo192, Nigelj, We-
stonRuter, Blonkm, Shenme, LeonardoGregianin, Archfalhwyl, Api, Apoltix, Srl, Artw, Elementalish, Khakbaz, Giraffedata, Chbarts,
Zwilson, Renwique, MrCalifornia, Quill18, Zr40, B0at, Sleske, Minghong, BillyTFried, Stmontgomery, Sam Korn, Pharos, CKlunck,
Bigtrick, Melah Hashamaim, Anderiv, Alansohn, Gary, SnowFire, Borkweb, Karlthegreat, Fadookie, Barte, Jesset77, Swarve, Demi,
Lightdarkness, Viridian, Kel-nage, Dedrick, Gblaz, Cdc, KJK::Hyperion, Dhartung, Matthewpun, Peter McGinley, Evil Monkey, Harej,
Sciurinæ, Wadems, Computerjoe, A brisson, Anamanfan, Versageek, H3h, Drbreznjev, Mattbrundage, Redvers, J$, Lindsay-mclennan,
Umapathy, Saxifrage, Harshadoak, Kenyon, Skeejay, Feezo, Billfromhk, Ian Moody, Thryduulf, Kelly Martin, Simetrical, Jeffrey O.
Gustafson, Justavo, OwenX, Woohookitty, Mindmatrix, TigerShark, Justinlebar, Camw, LOL, Toveling, Dandv, Mlemos, Rocastelo, De-
crease789, Jacobolus, Samyem, Before My Ken, Ruud Koot, Cookiecrook, Fred J, Thruston, Bbatsell, Damicatz, Payrard, Isnow, An-
maFinotera, Josenaves~enwiki, Zzyzx11, Wayward, Rufous, Mandarax, RichardWeiss, Yoric~enwiki, Ashmoo, Graham87, Voorhies,
Galwhaa, Zzedar, Dave Cohoe, Reisio, Mendaliv, Muthuveerappan, Canderson7, Asharism, JVz, Koavf, Syndicate, Wikibofh, Vary,
Bill37212, XP1, Anatolpanom~enwiki, Tangotango, Xmuskrat, Tawker, Habap, Heezy, Oblivious, CQJ, The wub, Bhadani, Sleepy-
head81, Dar-Ape, Fred Bradstadt, Husky, Jevon, Yamamoto Ichiro, Reedbeta, Bash, SystemBuilder, Therearenospoons, PaulHoadley,
Rpenner, Winhunter, Dirkbike, Crazycomputers, Alhutch, Harmil, Sophrosune, Pathoschild, RexNL, Gurch, Riki, Fosnez, Intgr, Del-
fuego, Simishag, GreyCat, Bmicomp, Gurubrahma, Windharp, HumbertoDiogenes~enwiki, Jarchitect, Eman502, Chobot, Bornhj, DVdm,
NiceGuyAlberto~enwiki, Korg, Stephen Compall, Cactus.man, NSR, Gwernol, Stadler~enwiki, Imsoclever, PointedEars, UkPaolo, Brightc,
YurikBot, Albanaco, NTBot~enwiki, Cabiria, JoeWalker, Kafziel, StuffOfInterest, Pip2andahalf, RussBot, Michael Slone, Wengier,
Junky, Hede2000, BTLizard, Ceiton, DanMS, SpuriousQ, IByte, Edward301, Hydrargyrum, Manop, Debackerl, Klimpong, Akhristov,
Bovineone, Wimt, SamJohnston, Thane, Gustavb, Bjhecht, NawlinWiki, Falling Cloud, Joshf, Dijxtra, Długosz, RazorICE, Shinmawa,
Peter Delmonte, PhilipO, Bgrayless, Qviri, Raven4x4x, Mikeblas, Kks krishna, DanBri, Marky1124, Booch, Syrthiss, Aaron Schulz,
PrimeCupEevee, Mysid, Brat32, Jemptymethod, DeadEyeArrow, Klutzy, Gobik, Nescio, Hgmichna, Petr.adamek, Sleepnomore, Xp-
client, KTyson, Nkatsaras, Jesusjonez, Pentapenguin, Johndrinkwater, Orchid Righteous, Orioane, Tomkarlo, Fmccown, Zzuuzz, En-
cephalon, Tom Sponheim, Chase me ladies, I'm the Cavalry, Closedmouth, Donald Albury, Pietdesomere, Virexmachina, SMcCan-
dlish, Sarefo, GraemeL, JoanneB, Chatmeprise, Fram, Plyd, Mixx941, Kevin, Stefanostraus, JLaTondre, Spookfish, Curpsbot-unicodify,
Mikus, Ben kenobi 00, Mr datawolf, Katieh5584, Fergalbreen, Snaxe920, Teryx, ChrisHibbert, Rayngwf, Jouk pleiter, Dcaron, Jepc,
Zvika, Willemo, Draicone, Vanished user 99034jfoiasjq2oirhsf3, Eenu, Marty Pauley, Luk, Rcronk, Amalthea, Coder cotton, SmackBot,
Gamol, Shon~enwiki, Tarun2701, Waltercruz~enwiki, Ajaxdevil, Unschool, Arminbachmann, TedGoddard, Irnavash, Henrikb4, Bobet,
Nihonjoe, Smpdawg, Slashme, Anarchist42, Pgk, Thunderboltz, Oben, Jaspsoft, Fenin~enwiki, Gmauruthi, Moralis, Gilliam, Donama,
Ohnoitsjamie, Skizzik, Amux, Chris the speller, LinguistAtLarge, Quinsareth, MK8, Rs564, Thumperward, Oli Filth, StephenHill, Tim-
neu22, Laksono, Alexei.white, Deathanatos, DHN-bot~enwiki, Wisden17, Jdthood, Darth Panda, Kelner~enwiki, Robert Stephen Spiegel,
Wikilinus, Royboycrashfan, Iainsproat, Ben@atmail.nl, Can't sleep, clown will eat me, AntiVan, Sheiko, Aleksandar Šušnjar, Greggob-
ridges, Frap, Typofixer76, GuyBehindtheGuy, Pkchan, TheKMan, RHJesusFreak40, QubitOtaku, Beradrian, Bogtha, Henricchen, Abul-
fazl, Campustr, UU, Idearat, Tomyeh, Jmlk17, Emre D., Cybercobra, Irish Souffle, Af1218, Jonovision, Mr Minchin, MichaelBilling-
ton, Dream out loud, Praveen bv, Monotonehell, Shadow1, Kirils, Jeffmcfarland, Josh-Levin@ieee.org, Warren, Mini-Geek, Supern-
erd~enwiki, SanDiegoPolitico, Weregerbil, RobGonda, Betamod, Jklin, DMacks, Ultraexactzz, Daniel.Cardenas, Sayden, Gnome of Fury,
Vina-iwbot~enwiki, Pilotguy, Carlosp420, Davipo, IGod, Mg cristi, Vriullop, Robomaeyhem, Swatjester, Quendus, Doug Bell, Rklaw-
ton, Guyjohnston, AdrianLozano, Sugarskane, Brentashley, AmiDaniel, Vigna, Disavian, Cahtye@cruzio.com, Soumyasch, Breno, Ynod,
JorisvS, Brian Gunderson, Robferrer, Wnorris, Rookstar, Osbus, Aleenf1, PseudoSudo, Camilo Sanchez, Anguis, FiRe, 16@r, Kom-
pere, Sshoberi, Renmiri, Fuzzy510, Huwleslie, Makyen, Beetstra, Rfernand, Mr Stephen, Thebes7, Mauri1980, Waggers, Hoosierplew,
Nakkeeran~enwiki, Funnybunny, Dcflyer, Ryulong, RMHED, Cbuckley, Rubencepeda, Galactor213, Alexa Foster, Snezzy, Syberguru,
The Real Walrus, Beefyt, Hu12, Stephen B Streater, Norm mit, Clamum, Tomwood0, Khadlock, CzarB, Dreftymac, John Seward, Gree-
nie2600, Pegasus1138, IvanLanin, Paul Foxworthy, Onkarshinde, Wpbasti, Shwaza, Saturday, Pimlottc, CapitalR, AvengeX, Color probe,
Courcelles, Booles, Gham367, Fdp, LeeU, Tawkerbot2, Jlbeezer, Dan1679, Angelpeream, MightyWarrior, Amniarix, Switchercat, Fa-
talError, Athenasoft, Zealotgi, Guilherme Blanco, SCPearson, Tanthalas39, Spankman, Wafulz, Pyrowolf, Sir Vicious, Insanephantom,
Gmd588, Rawling, Zanejin, Drinibot, Alcalazar, Mohanrl, Trails, StormTide, Aigan, Ycherkashin, Moreschi, E.au, Tibbetts2c, Departe-
dUser2, Ajaxtoday, Rgarcia09, Cydebot, Ugictox, MC10, Unclejedd, Red Director, JFreeman, Ymendel, Gpatnude, Samdeskin, Chasing-
sol, Firstauthor, Cakeman, Dancter, Tawkerbot4, Christian75, Ben-oni, M. B., Jr., Viridae, Kozuch, Omicronpersei8, Johayek, EvocativeIn-
trigue, ThylekShran, Cascadiadude@gmail.com, Thijs!bot, Diophantus, Epbr123, Markmarucot, Bllix, Hervegirod, Memty Bot, Pctopp,
Stuc1, Aleph-4, Danlevine, TXiKi, Kamal006, Davidhorman, EdJohnston, CharlotteWebb, MichaelMaggs, Dr. Zaret, Dawnseeker2000,
RoboServien, Andykitchen, Porqin, AntiVandalBot, Luna Santin, CPWinter, Opelio, TheRaytracer, Jacecole, Khakman, Latrippi, Har-
borsparrow, Alexhop, TexMurphy, Usquared, Rsocol, MajykHands, TravisCross, VictorAnyakin, Storkk, Bukharin, Myanw, KHaskell,
Canadian-Bacon, TuvicBot, Mr buick, JAnDbot, Oazabir, Deflective, AniRaptor2001, Roman à clef, MER-C, Skomorokh, Marktmil-
ligan, Pjdonnelly, Eloi.sanmartin~enwiki, Vunutus, BCube, Roleplayer, Cameltrader, Acroterion, Raanoo, Camerojo, Jeet020, Glenp,
Dannymo, SeanR, Bongwarrior, VoABot II, LunaticBeatnik, AlexMorozov, Jay Gatsby, VTChevalier, Ling.Nut, Jancikotuc, Singularity,
Jatkins, Crowdes, Destynova, Faustnh, Jobanjohn, Wagnermr14, Gabrielsroka, Leandro Cardoso, Pkrecker, EstebanF, Glen, Kovyrin,
Tigrisek, Seba5618, DRogers, Faelomx, MartinBot, DoSiDo, STBot, ARCG, Tholly, Benawhite, Mschel, Softguyus, Ento~enwiki, Ricar-
doAmador, Danicc, J.delanoy, Macaldo, Brest, Eliz81, Seanhan, One Random Fellow, AlexaW, C++ Template, Cpiral, Charles.kendrick,
96 CHAPTER 5. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

Dispenser, Hallandnash, DarkFalls, LordAnubisBOT, Gypsydoctor, Mehraj, AntiSpamBot, Phuntism, Jutiphan, Jupition, Tippler, Ja-
songaylord, Ronchristie, Salilkaul, Jainvineet, MKoltnow, Lunakid, Chelsel, Largoplazo, Milefool, KevinLocker, Uberdude85, Tiggerjay,
Remember the dot, Tagus, Ajfweb, Cyjpat, Pickatutorial, BBilge, Ottershrew, Chinneeb, Marc.GZR, VolkovBot, Thedjatclubrock, Seat-
tleJazzMan, FireWeed, Alexandria, Ajaxbee, Philip Trueman, TXiKiBoT, SynonymousEconomist, Williamlund, Qwayzer, Soeren1611,
Rei-bot, Rosswnelson, Alaa.moustafa, Qxz, Rpawlitzek, Hellclanner, Tuvok77, Sintaku, Rich Janis, Leaf of Silver, Majid khonji, ZeikJT,
Leafyplant, Hypnoticcyst, Caldini, Softtest123, Odinjobs, Dougbertram, Michelle192837, Vaubin, BankingBum, Jahleeldaruis, Insanity
Incarnate, Michael Frind, XGraham, TKGerson, FlyingLeopard2014, HybridBoy, Ironfistofanarchy, WiniWidiWici, Milnivri, Jesdisciple,
Euryalus, Eagleal, Triwbe, Zelchenko, Hegh, Execvator, Xelgen, Mxl, Ham Pastrami, Dmwtechnologies, Jerryobject, JohnManuel, Makyz,
Coolbeka, Mpeachey, Taboca, KiaThr, Rabidpoobear, Oxymoron83, Razordaze, Lightmouse, Ctkeene, AlanUS, Catrope, Anakin101, Mr-
berryman, Kithplana, Wikiajax, Nickmurdoch, Cfinazzo, Moonside, Reallyjoel, Lianmei, Tuntable, Dlrohrer2003, Mx. Granger, Nitin-
shah23, Loren.wilton, Dkcreatto, ClueBot, DmitryKoterov, The Thing That Should Not Be, Aashish.59, Franamax, Bipin Jethwani, Tu-
rionTzukosson, Uncle Milty, Keppx0r, Akronymn, Blanchardb, Jonathanrcoxhead, Satheeaseelan, RidinHood25, TimmmmCam, Mas-
terXC, Maxmaxb, DragonBot, Excirial, Brclancy111, CodeAdams, Printer222, SaltyDawg, Qebafhzn, Uniwalk, SoxBot III, Ssergi, Avik21,
DumZiBoT, Lishugo, Rl.rosa, XLinkBot, Nathan Johnson, BRPXQZME, Ost316, Skarebo, TehSpud, Swordofsaya, Galzigler, Mistsrider,
Trogera, Jabberwoch, Johndci, Addbot, Derivator, Ramu50, Mortense, Logain2006, Mabdul, Tnicky, Anthonyfrey, Bgupta55, MrOllie,
Glane23, Debresser, Roux, LinkFA-Bot, Piovertwo, MrMoran, Suwa, Mknouse, Luckas-bot, Kartano, Tohd8BohaithuGh1, D.taveira,
Boulevardier, Csega, KamikazeBot, Wonderfl, Rohitjs, Dmarquard, AnomieBOT, Rubinbot, 1exec1, Fox Aquatis, Killiondude, Jim1138,
Kingpin13, Materialscientist, ArthurBot, Gacpro, Xqbot, Zad68, Capricorn42, Hanberke, Stajler, SuperFatBan, Robmanson, Protection-
TaggingBot, Danyuyou, Khaderv, Felix.rivas, Kaylanimis, Mark Schierbecker, RibotBOT, SassoBot, Cyberhitesh, RoyLeban, Fusionde-
veloper, Dougofborg, D'Artagnol, Nakakapagpabagabag, Thorenn, Jriffel, Sae1962, Citation bot 1, Velociostrich, Atif.mod, Susen2008,
Tom.Reding, Darwin226, Pikiwyn, SpaceFlight89, Jamesinderbyshire, Quilokos, PB0305, Bgpaulus, Radiier, Quaternionic, Weylinp,
PrometheeFeu~enwiki, Yunshui, Throwaway85, Jonkerz, Nako16, Zvn, Xephero, Tbhotch, Minimac, DARTH SIDIOUS 2, Mean as
custard, Woogee, ArwinJ, RjwilmsiBot, Digitxpsp3, Rollins83, Maoj-jb, DASHBot, Pwt-wsu-mg, Siddhartha 90, Acather96, GoingBatty,
Alekseenkokirill, Minimac’s Clone, Dcirovic, Jppaul, Tudorol, Nickmjohnson, Seriouswikifan, Cfust, H3llBot, Dpaner, Chris Kuehl, Mark-
didj, L Kensington, Julyscripter, Petrb, ClueBot NG, Phanuruch8555, Anand mr, Lowercase sigmabot, BG19bot, Matlo49, MusikAnimal,
Compfreak7, Takman187, Chief Red Eagle, Sdesalas, Minsbot, ~riley, Aaron Nitro Danielson, The Illusive Man, Quiethoo, Dexbot, Ju-
nior5a, Sauwiki, Darcourse, Alex haley89, Sunzongbao2007, Okgoood, Mohnsonj, TwoTwoHello, Zziccardi, Agrecascino, Alexwho314,
Miller9904, Danielbullis, Tentinator, Jemee012, PhilipZalesak, Babitaarora, Ginsuloft, Vaab, JavaScriptKiddie, Lollol7969, TheDragon-
Fire, Tyler2222, Lagoset, Monkbot, SantiLak, HMSLavender, DidsMain, Eric0928, KasparBot, Wheatbyproducts, Ethanwilloner, Imduffy,
InternetArchiveBot, Gulumeemee and Anonymous: 2893

• Hypertext Transfer Protocol Source: https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol?oldid=772223419 Contributors:


Damian Yerrick, The Anome, Grouse, Wayne Hardman, Andre Engels, Rmhermen, Aldie, SJK, William Avery, Ben-Zin~enwiki, Mjb,
Bernfarr, Nknight, Edward, Patrick, Chris-martin, Modster, Lezek, Nixdorf, Pnm, Meekohi, Martin BENOIT~enwiki, Ixfd64, Sheldon
Rampton, TakuyaMurata, Delirium, Iluvcapra, Karingo, Tregoweth, Ellywa, Ahoerstemeier, Haakon, Nanshu, Yaronf, Lupinoid, Scott, IM-
SoP, Samuel~enwiki, Nikola Smolenski, Ehn, Hashar, Universimmedia, Dcoetzee, Tpbradbury, Furrykef, Paul-L~enwiki, Bevo, Wonko,
Nickshanks, Betterworld, Pakaran, Flockmeal, Finlay McWalter, Jeffq, Robbot, Chealer, Fredrik, R3m0t, RedWolf, Psychonaut, Nurg,
Babbage, Ashley Y, Kwi, Yacht, Jleedev, Tea2min, Alerante, Giftlite, Lproven, Lee J Haywood, Lethe, Ferkelparade, No Guru, Jonathan
O'Donnell, Tromer, Itpastorn, Cloud200, Pascal666, AlistairMcMillan, Jaan513, Jackol, SWAdair, Vadmium, Utcursch, Pgan002, Knu-
tux, Beland, Oneiros, Kesac, Icairns, Atemperman, Gscshoyru, TiMike, Joyous!, Karl Dickman, BeakerK44, Mmj, Abdull, Reschke,
Bluemask, MikeF, Mormegil, Tordek ar, Imroy, JTN, RossPatterson, Discospinster, Rich Farmbrough, Hydrox, Cool-RR, Alistair1978,
Delicates, Horsten, Bg~enwiki, El C, Mdf, Mnot, Sietse Snel, Tbannist, Femto, Bobo192, Nigelj, John Vandenberg, BrokenSegue, Unqui-
etwiki, Richi, Kundor, Daf, Maebmij, Helix84, Krellis, Nevyn, Mdd, Lysdexia, Timmywimmy, Jumbuck, Checking, Zachlipton, Alansohn,
Guy Harris, Interiot, Pforret, Jeltz, John Quiggin, Damnreds, Lightdarkness, Kocio, Mbloore, Wtmitchell, BaronLarf, Eli the Bearded,
BanyanTree, Cburnett, Stephan Leeds, Suruena, Evil Monkey, Josh3736, RainbowOfLight, TenOfAllTrades, Krellion, Ent, Nightstallion,
Voxadam, DarTar, Woohookitty, Mindmatrix, RHaworth, Stolee, Uncle G, DanBishop, Jacobolus, Niqueco, Joeyconnick, JHolman, ^de-
mon, Paul Mackay~enwiki, Asteiner, Ruud Koot, Dionyziz, Eyreland, Meneth, Jonnabuz, Brownsteve, Kesla, RichardWeiss, Graham87,
Seb-Gibbs, Yurik, Canderson7, Sjö, Rjwilmsi, Koavf, Hans Genten, Bruce1ee, MZMcBride, Jdowland, HappyCamper, ElKevbo, The
wub, Ravik, Fred Bradstadt, Aapo Laitinen, Lotu, Syced, FlaBot, Spaceman85, Mathiastck, Hashproduct, RexNL, ChongDae, Intgr,
Fresheneesz, TeaDrinker, Alphachimp, Benanhalt, Imnotminkus, Chobot, Frappyjohn, DVdm, GioeleBarabucci, Adoniscik, YurikBot,
Wavelength, Angus Lepper, Todd Vierling, Huw Powell, Charles Gaudette, Pip2andahalf, Kymacpherson, RussBot, Sparky132, Yuhong,
Stephenb, Gaius Cornelius, SteveLoughran, Cryptic, Anomalocaris, NawlinWiki, ENeville, Catamorphism, A!eX, JonoF, Saoshyant, Js-
trater, CecilWard, Moe Epsilon, SixSix, Alex43223, Syrthiss, Htonl, DeadEyeArrow, Arch o median, Hrvoje Simic, Nlu, Trygvis, Graciella,
BenBildstein, Ninly, Macademe, Cedar101, Ka-Ping Yee, Pb30, KGasso, Dspradau, Sean Whitton, Kungfuadam, Benandorsqueaks, Grin-
Bot~enwiki, TuukkaH, Tom Morris, Jarkspratt, AndrewWTaylor, Mlibby, Amalthea, Drcwright, SmackBot, Elving, KAtremer, Incnis Mrsi,
Hydrogen Iodide, Unyoyega, Basil.bourque, C.Fred, KocjoBot~enwiki, Gilliam, Betacommand, Englishrose, Lady Serena, Rmosler2100,
Marc Kupper, Anwar saadat, Persian Poet Gal, Dr bab, Thumperward, Timneu22, Jerome Charles Potts, Deathanatos, Omniplex, Baa,
DHN-bot~enwiki, Bil1, Firetrap9254, Gracenotes, Audriusa, George Ho, WDGraham, Schwallex, Dethme0w, Can't sleep, clown will eat
me, SheeEttin, Frap, Neo139, Blade44, Jennica, Nixeagle, Avb, Chruck, VMS Mosaic, UU, JustAnotherJoe, Ddas, MureninC, Nakon,
T-borg, Valenciano, HarisM, Astroview120mm, Mwtoews, Acdx, Daniel.Cardenas, DKEdwards, SashatoBot, Nellisks, A-moll9, Bjanku-
loski06en~enwiki, Tlesher, SpyMagician, CyrilB, Mr. Vernon, Stupid Corn, Mr Stephen, Ryulong, KurtRaschke, MTSbot~enwiki, Ne-
grulio, Yoderj, Kvng, Beefyt, Lee Carre, Hu12, Iridescent, Newone, Sander Säde, Sjb72, Chrisamaphone, Tawkerbot2, Brian.fsm, Earth-
lyreason, Kylu, SoftX, Stevenup7002, Pewwer42, Equendil, Phatom87, Cydebot, Cahk, Mblumber, Agupte, Davilima, UncleBubba, Corpx,
Chasingsol, JamesLucas, Christian75, Alaibot, Ivko, Tobias382, Lyverbe, Epbr123, Marek69, Vertium, Electron9, TheJosh, James086,
Nezzadar, Sakkath, Uruiamme, AlefZet, Escarbot, K12worker, KrakatoaKatie, AntiVandalBot, Yonatan, Luna Santin, Widefox, Guy
Macon, MsDivagin, Blmatthews, Sstteevvee, Gdo01, Lannm, Dougher, VictorAnyakin, Myanw, MikeLynch, JAnDbot, Barek, Bull3t,
Mwarren us, Cameltrader, SiobhanHansa, Enjoi4586, Danculley, Abu ali, Magioladitis, Bongwarrior, VoABot II, Transcendence, Davidjk,
JamesBWatson, Bgwwlm, Tpirfan28, DerHexer, Kgfleischmann, Esanchez7587, GordonMcKinney, MartinBot, BetBot~enwiki, Onlynone,
GimliDotNet, Rainman-sr~enwiki, Anaxial, Ore4444, Mschel, KTo288, Ash, PrestonH, Lilac Soul, RockMFR, J.delanoy, Captain panda,
Mange01, Mehfuz, Trusilver, Think777, Uncle Dick, Extransit, Suppie, Andareed, LordAnubisBOT, Produke, Gurchzilla, AntiSpam-
Bot, Chiswick Chap, Raise exception, NewEnglandYankee, Ivank06, Doria, Rwessel, SJP, Babedacus, STBotD, Ajfweb, CardinalDan,
Idioma-bot, Funandtrvl, Wikieditor06, Fuzzygenius, VolkovBot, Part Deux, CWii, Alexandria, Perceptes, Philip Trueman, TXiKiBoT,
Oshwah, GcSwRhIc, Elimerl, Retiono Virginian, Anna Lincoln, MackSalmon, Leafyplant, Don4of4, Broadbot, Yomcat, David in DC,
Wiae, Saturn star, Madhero88, TonyAiuto, Sses401, Petero9, Haseo9999, Gen. von Klinkerhoffen, Tomaxer, Mohammedsheikh786,
5.1. TEXT 97

BOTijo, Okyea, Monty845, Praefectorian, Nightraider0, Scottywong, EmxBot, Kbrose, SieBot, Nubiatech, Graham Beards, Rystheguy,
Dawn Bard, Caltas, Edmund Patrick, RJaguar3, Smsarmad, Yintan, Beinder, Bamkin, Bevan7, Ham Pastrami, Keilana, Android Mouse,
Pxma, Happysailor, Flyer22 Reborn, Wizzard2k, TechTony, Coroberti, DanBLOO, Oxymoron83, Avnjay, Iain99, Nyelvmark, OKBot, La
Parka Your Car, RandomHumanoid, Konniret3, Lloydpick, Mpeylo, ObfuscatePenguin, Asj123fds, De728631, ClueBot, The Thing That
Should Not Be, Enthusiast01, Spandrawn, Ajonlime, Boing! said Zebedee, DigitalNinja, Blanchardb, Callmederek, Grantglendinning,
Daniboydl07, PMDrive1061, Cedy, Sekro, Socrates2008, Jusdafax, M4gnum0n, SkE, Mumia-w-18, Lartoven, Hrafnkell.palsson~enwiki,
Dmyersturnbull, Jotterbot, Morel, Saebjorn, Thehelpfulone, Calor, Sdrtirs, Th.matt.wiki, Aitias, DerBorg, Scalhotrod, Versus22, Qwfp,
Johnuniq, Apparition11, DumZiBoT, Chris1834, XLinkBot, Fastily, Rror, OsoLeon, Nepenthes, Orbnauticus, C. A. Russell, SilvonenBot,
InfoRetrieval, Gamernotnerd, RyanCross, Dsimic, HexaChord, Addbot, Mortense, Habbabuba91, Jojhutton, Mabdul, Magaman dude,
Non-dropframe, Hyperthermia, Tothwolf, AkhtaBot, Ronhjones, Marx01, Scientus, CanadianLinuxUser, Cambalachero, Glane23, Favo-
nian, Jasper Deng, Timc1212, Numbo3-bot, Agawish, Tide rolls, Lightbot, Jarble, Matt.T, Legobot, Luckas-bot, Bpantalone, Yobot, THEN
WHO WAS PHONE?, Gsiegman, TestEditBot, Tempodivalse, AnomieBOT, Mauro Lanari, Rubinbot, Jim1138, Cavarrone, Piano non
troppo, Bluerasberry, Jrobinjapan, Materialscientist, Aneah, Papadakis2007, Pioneerking, Obersachsebot, Xqbot, Dalitvoice, Korealin,
Rischmueller, TinucherianBot II, Capricorn42, Bihco, Moustafaza, Gilo1969, Gap9551, GrouchoBot, AVBOT, RibotBOT, SassoBot, Das-
Rakel, IShadowed, MLauba, Phette23, Cyberstrike3000X, Shadowjams, Mikerlynn, Tabledhote, Universalss, SchnitzelMannGreek, 4342,
FrescoBot, Voxii, Weyesr1, Godtrog, Tobby72, Nageh, Krj373, Gaccolin, Wikipe-tan, Idyllic press, Sae1962, Vinoth.t, Jarkospratt, Drap-
erp, Maggyero, I dream of horses, HRoestBot, MastiBot, Serols, Île flottante, Fraxtil, LiberatorG, Lineslarge, RobMattson, Wolfomatic5,
IJBall, Robert Xia, Lotje, GregKaye, Vrenator, Zvn, Extra999, EphemeralJun, JV Smithy, Tbhotch, Reach Out to the Truth, Sharon08tam,
Mean as custard, The Utahraptor, Linusnk, DRAGON BOOSTER, Wintonian, Salvio giuliano, EmausBot, John of Reading, Gfoley4,
Chenqiang.prc, Haiiiiilllsatana, Optiguy54, Super48paul, Jeroenvdmeer, Marcos canbeiro, Peaceray, Tinogomes, Tommy2010, Chadfiller,
Wikipelli, Rhaskallion, Shuipzv3, Babysabre, Kiwi128, Zalnas, 1234r00t, Sodabrew, GJHC1, Jmar777, Shrikanthv, Irrypride, Donner60,
Sri Krishna Geova Allah, Ihatejava, Shiftoften66, GermanJoe, Andkim99, ClueBot NG, AnotherSprocket, Y98, Matthiaspaul, HonestIn-
telligence, Zekefast, Frietjes, Widr, Anupmehra, Theopolisme, Galund, Novusuna, Johnny C. Morse, J.Dong820, Calabe1992, BG19bot,
Qff828, EvanMHahn, M0rphzone, Adam.tolley, Sahara4u, Cyberpower678, Neøn, IAlexR, Mark Arsten, Compfreak7, Jnanaranjan sahu,
GGShinobi, OmarMOthman, Spuas, Chmarkine, Toto Mommam, MrExplosive, Bsrdjan, Comfr, IRedRat, Tianjiao, David.moreno72,
Mdann52, Agus puryanto, Cyberbot II, Gdfusion, Wjcw, Gavinmorrice, XapApp, Ducknish, Himichellet, Makecat-bot, Lugia2453, Doc
Armitage, Dmufasa, The Quirky Kitty, Sriharsh1234, Athomeinkobe, Falsestuff, Mark viking, I am One of Many, François Robere, Mel-
onkelon, Jakec, EvergreenFir, DavidLeighEllis, ArmbrustBot, Davidgumberg, Comp.arch, PerfectSystem, The Herald, Ginsuloft, Soujak,
Param Mudgal, Meteor sandwich yum, Skr15081997, Adamtt9, Ethically Yours, Upkarsh, CogitoErgoSum14, Mr. Smart LION, Monkbot,
Patient Zero, Justin15w, Izaberina, Datjedi, Coder hsps, Level47, Mfnpka, Alamatpalsoe, 2014Best, Thianw, Neshyanka, WordSeventeen,
Shiv Shanker Sharma, Roemerb, Mlkj, Viam Ferream, Julietdeltalima, Pishcal, Rubbish computer, Joseph2302, NickOsypenko, Surly-
cyborg, KasparBot, T-brace98, Will98769876, Oluwa2Chainz, Atanasmihaylov, Wesko, CAPTAIN RAJU, Vansockslayer, Chenthil Vel,
Bv56, Tajmil, H.dryad, Kmalhotra612, Harrryy33, Colonel Wilhelm Klink, KGirlTrucker81, Killerflash734882, Gulumeemee, John “Han-
nibal” Smith, RunnyAmiga, VINAY YADAV, Wikishovel, Justeditingtoday, Thexuneditor, Ounlahngong, Josephrmzv96, ISipKoolAid7
and Anonymous: 1299
• XMLHttpRequest Source: https://en.wikipedia.org/wiki/XMLHttpRequest?oldid=769059609 Contributors: The Anome, Oeln, Takuya-
Murata, Ahoerstemeier, Timwi, Timc, Furrykef, Nickshanks, Rohan Jayasekera, Chealer, RedWolf, Jmabel, Nurg, Martin Hampl~enwiki,
Lee J Haywood, Lupin, Gilgamesh~enwiki, BobBagwill, Khalid hassani, Apv, Uzume, Christopherlin, Dirus, Taka, Anirvan, Eric B.
and Rakim, Dbaron, Discospinster, Drano, Thedangerouskitchen, Enyo, CanisRufus, Zippedmartin, Mnot, Liberatus, ~K, Bobo192,
Nigelj, John Vandenberg, .:Ajvol:., Artw, Minghong, Krellis, Alansohn, SineSwiper, Jaw959, Suruena, Nkour, Ringbang, Nightstallion,
Lindsay-mclennan, Skeejay, Mindmatrix, MattGiuca, Damicatz, GregorB, Dionyziz, Isnow, Sega381, Gimboid13, Rufous, Gerbrant,
A3r0, Niven, Molily, Reisio, Ryan Norton, Vberger~enwiki, Rjwilmsi, Koavf, XP1, Filipvr, Jdowland, Sleepyhead81, Fred Bradstadt,
Husky, Dsnell923, FlaBot, Slant, Pcj, Delfuego, Alphachimp, Ej0c, Chobot, Peterl, Metaeducation, PointedEars, Wengier, Me and,
Pi Delport, Manop, CambridgeBayWeather, Rsrikanth05, Simon Lieschke, Bovineone, Catamorphism, Fabiob~enwiki, Zzuuzz, Teilad-
nam, The Fish, Cedar101, GraemeL, Fram, Urkle0, SalM, Masonbarge, Algae, Coffeeflower, SmackBot, Proton.mule, Haza-w, Maian,
Speight, Renku, Gilliam, Tantek, Thumperward, Snori, Jerome Charles Potts, CDV, Robert p levy, Javalenok, Frap, Tolmaion, Mamund,
Aditsu, Daniel.Cardenas, Qwerty0, Pjakubo86, Bezenek, Keelypavan, WhiteHatLurker, Yoderj, Norm mit, Tamlyn, CapitalR, Tawkerbot2,
Alexandre Martins, FatalError, Spankman, Drinibot, Alcalazar, Cydebot, Shamesspwns, MC10, Kozuch, Kugland, Mrcs, Pctopp, TheJosh,
Aquilosion, Guy Macon, DJ Rubbie, VictorAnyakin, Phloopy, Marktmilligan, Pjdonnelly, Eloi.sanmartin~enwiki, Xoneca, Jeroldan, Twsx,
Cic, Gabrielsroka, Dantman, Schmloof, R'n'B, Jaray~enwiki, J.delanoy, Macaldo, Javawizard, White 720, Remember the dot, Darklama,
DMcMPO11AAUK, Caged.danimal, Blackdenimgumby, MichaelHausenblas, Widgetguy, Alaa.moustafa, Fromz, Alex Smotrov, Rajsite,
Zoef1234, Eve Teschlemacher, Philmac, Digita, Downfromzero, Ph0t0phobic, Phorgan1, Ham Pastrami, Hariva, WikiLaurent, Vladogr,
Hondavice, ClueBot, Ignacio Javier Igjav, Djkenzie, RidinHood25, DragonBot, Ranjithsutari, Alexis Wilke, DumZiBoT, XLinkBot, Wik-
Head, Addbot, Ramu50, Mortense, Thelazyleo, Mabdul, TutterMouse, Yobot, Timeroot, Amirobot, AnomieBOT, Arjun G. Menon, Sz-
iwbot, Materialscientist, SvartMan, Rabimba, ArthurBot, LilHelpa, LemonairePaides, Xqbot, Martnym, Locos epraix, SassoBot, JonDe-
Plume, Mu Mind, KenricAshe, Jriffel, Stephen Morley, Tom.Reding, RedBot, Quilokos, Marskind, Zvn, MoreNet, EriF, Ohgyun Ahn,
Look2See1, Noloader, Rafaec, K6ka, ZéroBot, Kenneth J Hughes, ClueBot NG, Pak1standby, Helpful Pixie Bot, Compfreak7, Theoretick,
Electricmuffin11, Mogism, Imandrewa, Dpant, ArmbrustBot, Rajkeaner, RobWu, Monkbot, Diego oliver ramirez garcia, Ethanwilloner
and Anonymous: 344
• XML Source: https://en.wikipedia.org/wiki/XML?oldid=769737436 Contributors: TwoOneTwo, Derek Ross, WojPob, Brion VIBBER,
Bryan Derksen, Robert Merkel, Stephen Gilbert, RoseParks, Sjc, Rjstott, Etu, Fnielsen, Eob, XJaM, Vaganyik, Shii, Hannes Hirzel,
Ellmist, Graham, Mjb, David spector, Hirzel, B4hand, Dwheeler, Edward, Bdesham, Patrick, Michael Hardy, Erik Zachte, Meszigues,
Joku~enwiki, DopefishJustin, Pnm, Liftarn, GTBacchus, MichaelJanich, Egil, Ahoerstemeier, Haakon, Ogmios~enwiki, ZoeB, Nan-
shu, Yaronf, Brettz9, BigFatBuddha, LittleDan, Glenn, Whkoh, Netsnipe, IMSoP, Wael Ellithy, Cherkash, Madir, Mxn, OliD~enwiki,
Technopilgrim, Hashar, Kenmccallum, Dcoetzee, Ww, Ebruchez, Jay, Greenrd, Timc, Tpbradbury, Furrykef, Itai, Mp~enwiki, Jonnya-
mazing, Bevo, Traroth, Shizhao, Topbanana, Fvw, Dpbsmith, AnonMoos, RickBeton, Saqib (usurped)~enwiki, Frisket, MrJones, Chealer,
Noldoaran, Chris 73, Vespristiano, RedWolf, Chris Roy, Pelle, Kwi, TimR, Wereon, ElBenevolente, Adeio, Jor, Neckro, TPK, Mat-
tflaschen, Pengo, Tea2min, Alan Liefting, Aomarks, Centrx, Giftlite, SamB, Ryanrs, Jao, Sj, Wikilibrarian, ShaneCavanaugh, Martijn
faassen, Jonabbey, Fleminra, Alison, Nsh, Thierryc, Varlaam, Rick Block, Niteowlneils, Remy B, Ferdinand Pienaar, AlistairMcMil-
lan, Spe88, Matthäus Wander, Edcolins, Wmahan, Vadmium, Chowbok, Dullhunk, Shibboleth, Dr Headgear, Risi, OverlordQ, Mark-
Sweep, Scott MacLean, Quarl, Saucepan, Bonethugnd, Maximaximax, Elroch, Eranb, Sam Hocevar, Figure, Tympan, Burschik, Imjust-
matthew, Hugh Mason, Waskage, Joachim Wuttke, Karl Dickman, Asqueella, Eisnel, Porges, D6, Reinthal, Poccil, Lifefeed, Cels2,
Rich Farmbrough, Dpm64, Mecanismo, Smyth, Ahkond, Mjpieters, Pavel Vozenilek, TimBray, Bender235, Neko-chan, Violetriga, El-
98 CHAPTER 5. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

wikipedista~enwiki, Vojta, Lycurgus, Joanjoc~enwiki, Rdmsoft, Edward Z. Yang, Shanes, Nile, Kgaughan, Semper discens, Bobo192,
Nigelj, Hurricane111, SickTwist, Imars, TommyG, John Vandenberg, .:Ajvol:., Yonkie, Shlomital, Unknown W. Brackets, Rje, Eritain,
Kx1186, Minghong, Wrs1864, Andrisi, Schnolle, Phyzome, HasharBot~enwiki, ClementSeveillac, Alansohn, Liao, Terrycojones, Anthony
Appleyard, CyberSkull, AzaToth, Kevinconroy, Water Bottle, PeteVerdon, Hohum, JKing, Suruena, GeoffPurchase, Bsadowski1, Freyr,
Versageek, Zootm, Karderio, Dan100, Jcummings, Trscavo, Johnwcowan, DanielVonEhren, Unixxx, JavaWoman, Ian Moody, Simetrical,
Woohookitty, Sandius, Pmberry, Mathmo, Jacobolus, Scjessey, Robert K S, Asteiner, Jeff3000, Cbdorsett, Bluemoose, Lazynitwit, Tou-
ssaint, Palica, Turnstep, Paxsimius, Wulfila, RichardWeiss, Graham87, BD2412, GrundyCamellia, DePiep, Jshadias, Phoenix-forgotten,
Rjwilmsi, Seidenstud, Koavf, Amire80, Quiddity, Bruce1ee, Ajcumming, Forage, Gudeldar, Ligulem, Brighterorange, JohnSmith777,
Bhadani, Sleepyhead81, FlaBot, Tagith, Ground Zero, Fragglet, Rbonvall, Nicmila, ChongDae, Intgr, Nivaca, Sderose, Trankin, Wouter-
Bot, Typhoonhurricane, Chobot, DVdm, Bobdc, Bgwhite, GioeleBarabucci, Peterl, Bje2089, UkPaolo, YurikBot, Wavelength, RobotE,
Todd Vierling, Hairy Dude, RussBot, Fsolda~enwiki, Teddyb, Gaius Cornelius, CambridgeBayWeather, ToonArmy, Bonbayel, Hyuri,
CarlHewitt, EngineerScotty, NawlinWiki, Nowa, Wiki alf, DouglasHeld, Aeusoes1, Trovatore, SivaKumar, Deodar~enwiki, Jpbowen,
Tony1, Xompanthy, DeadEyeArrow, Kapoing, Bota47, Darkfred, Xpclient, Ms2ger, Kai.Klesatschke, Klaws, PTSE, Lt-wiki-bot, Ninly,
Thnidu, Nikkimaria, SMcCandlish, Tsunaminoai, BorgQueen, GraemeL, Brz7, JLaTondre, Leeannedy, DoriSmith, GrEp, Mhkay, Bernd
in Japan, GrinBot~enwiki, Derekread, Johnmarkh, Sardanaphalus, Blinklmc, SmackBot, Oxblood~enwiki, Axd, Unyoyega, Pgk, Golwen-
gaud, Brick Thrower, Eskimbot, Sydius, CapitalSasha, Gjs238, Greg Murray, Stf, Commander Keane bot, Keithgabryelski, Yamaguchi ,
AdamCarden, Aksi great, Unforgettableid, Gilliam, Jibjibjib, Ohnoitsjamie, Folajimi, Gdrori, NickGarvey, Chrisnewell, Ahabr, MK8,
Jprg1966, Thumperward, MartynDavies, EncMstr, Jerome Charles Potts, IlanaDavidi, Colonies Chris, IanBurrell, JohnWhitlock, Can't
sleep, clown will eat me, Volphy, Frap, Nixeagle, Mr.Z-man, Stevy76~enwiki, Pianohacker, Mcintyem, Cybercobra, Efcavanaugh, Nakon,
Kc2idf, Mwtoews, Daniel.Cardenas, Mion, Vina-iwbot~enwiki, DKEdwards, Charivari, SashatoBot, Lambiam, Gennaro Prota, Rory096,
Robomaeyhem, AThing, Rklawton, Cody5, Robinjwest, Rodney Boyd, Nicerobot, AmiDaniel, Twocs, Korval, Manishtomar, Oscar-ja,
RichMorin, Redherring, Jeenuv, Stwalkerster, Beetstra, Martinp23, Dicklyon, Mauro Bieg, Mr. Shoeless, TastyPoutine, DougBarry, Dan-
Connolly, Hu12, Norm mit, Boseko, Iridescent, Dionysia, Dreftymac, Francl, Dthvt, Paul Foxworthy, Spudstud, Amakuru, Octane, Elharo,
Booles, Tawkerbot2, Dlohcierekim, Trade2tradewell, Harold f, FatalError, JForget, Spankman, Caomhin, Leuce, Kensall, TheMightyOrb,
LDiracDelta, NessBird, Mvulpe, Mak Thorpe, Jaxad0127, Richalex2010, MaxEnt, Cydebot, Natasha2006, Krauss, Kanags, Kha0sK1d,
JPalonus, Kaldosh, Clayoquot, Gogo Dodo, Verdy p, AndersFeder, Chrislk02, Daniel Olsen, JamesBrownJr, Coconut99 99, Malleus
Fatuorum, Barticus88, SamHathaway, Bot-maru, Miss Dark, Mbell, Hervegirod, Dingbats, GentlemanGhost, Miguelfms, Mojo Hand,
Headbomb, Marek69, Kathovo, Electron9, Ericjs, Peashy, Thadius856, Hires an editor, AntiVandalBot, Gioto, Widefox, Guy Macon,
Seaphoto, Edokter, Boehm~enwiki, Isilanes, Maximus06, Roger costello, Carewolf, Glass of water, Sosinfo, Ani td, MikeLynch, JAnD-
bot, Wiki0709, Nannus, Barek, Oxinabox, MER-C, Mcorazao, Atanveer9, JRocketeer, Pozcircuitboy, Cameltrader, PhiLho, Geniac,
Typochimp, Magioladitis, VoABot II, Ling.Nut, Stijn Vermeeren, Mah159, SwiftBot, Thunderhead~enwiki, BrianCully, DominiqueHaza-
elMassieux, Zhaolei, Rivecoder, Terjen, 28421u2232nfenfcenc, M.franceschet, Businessman332211, Rbstimers, Jacobko, Erikdw, Cœur,
Gwern, BetBot~enwiki, Osquar F, Bissinger, R'n'B, Ijmorlan, Whale plane, J.delanoy, Svetovid, Mthibault, Think777, Yonidebot, Seanhan,
CLD, Steve R Barnes, Cspan64, Katalaveno, DarkFalls, LordAnubisBOT, Nemo bis, Mbbradford, KickAssClown, RenniePet, Nwbee-
son, Bobianite, Fylwind, Jackacon, KylieTastic, Ajfweb, Sbvb, Highwayman65251, DigitalEnthusiast, Angeltoribio~enwiki, Idioma-bot,
Funandtrvl, Owen Ambur, VolkovBot, Jehzlau, Grumpycraig, Jeff G., Asymmetric, Philip Trueman, Fran Rogers, DoorsAjar, TXiKi-
BoT, Dolcecars~enwiki, BertSen, Rei-bot, Jhannah, Rick Jelliffe, Anna Lincoln, Martin451, Stefan.ciobaca, Don4of4, Comesuntbob, Rv-
molen, Telecineguy, Jesin, Andy Dingley, Anu-43, Belamp, Synthebot, Kingius, Okyea, Melon039, Dpattison2007, AHMartin, Mayfare,
Kbrose, OsamaK, SieBot, Fang.zheng, Jzhang2007, Borgdylan, Prakash Nadkarni, Jauerback, Stupiddestyredgasd, NO ACMLM,AND
XKEPPER SUCK !, Yintan, Ygramul, Jerryobject, Bentogoa, Flyer22 Reborn, Alexbrn, Jilplo Haggins, Jimthing, CoSort2007, V2580s,
Evaluist, Int21h, JohnSawyer, Jargon64, Sen Mon, Sound effx, Dcattell, Bvajet, Larala, Kjtobo, Mr. Stradivarius, Treekids, Floating-
Mind, Lianmei, StewartMH, ShelleyAdams, Dlrohrer2003, Sfan00 IMG, ClueBot, Kl4m, Vladkornea, Aadaam, The Thing That Should
Not Be, Egandrews, TheOldJacobite, Uncle Milty, SuperHamster, CptAnonymous, PaulXemdli, Dickpenn, Allkeyword, Hicketyhickety-
hack, DragonBot, M4gnum0n, Anon lynx, Feline Hymnic, Shinkolobwe, Scottielad, Chininazu12, Jmlipton, Donmay12, Dkrms, Mrjm-
cneil, RenamedUser jaskldjslak901, Dino72, Aitias, MelonBot, C.M.Sperberg-McQueen, Vigilius, DumZiBoT, Davis685, Hogman500,
SandiCastle, XLinkBot, EastTN, Rror, Actam, Cipherynx, Red660, Kamalakannanprogrammer, Andy Monakov, Ghettoblaster, Melab-1,
Atethnekos, Montgomery '39, Blethering Scot, Mww113, Moosehadley, Gjlubbertsen, CanadianLinuxUser, MrOllie, Chzz, Jasper Deng,
Tassedethe, Тиверополник, MaBoehm, Zorrobot, Jarble, JakobVoss, Biezl, Yobot, Bunnyhop11, Fraggle81, Terrifictriffid, Nallimbot,
Wonderfl, Ewsers, Crosstowns, Talktovalentine, AnomieBOT, Mola8sses, Apollo1758, 1exec1, Wickorama, Gc9580, ChristopheS, Ak-
lauss, Materialscientist, Ramesses the Great, Rr2bwreain, Limideen, Citation bot, Phluid61, Anti stupidity, BlurTento, Timur.shemsedinov,
Xqbot, Fantasticfears, Tyrol5, ChristianGruen, Coretheapple, Iftikhar88hussaini, RibotBOT, Олександр Кравчук, January2009, Don
Kikos, Loveenatayal, Howard McCay, Jackmileshunt, Contraverse, FrescoBot, Voxii, LucienBOT, Mark Renier, 24ten, Kwiki, Ankitasde-
veloper, Citation bot 1, Maggyero, Winterst, Pinethicket, Jonesey95, Jaxsam1, Walk Up Trees, Hoo man, Pikiwyn, Quilokos, Jandalhan-
dler, Signsofstatic, Cupid1889, Anish9807, Nomediga, WSU-AW-AK, FoxBot, Lumi71, TobeBot, P3x984, Suwayya, Jonkerz, Dinamik-
bot, Vrenator, Delcnsltmd, Hypertrek, Klangenfurt, Jan.Keromnes, DARTH SIDIOUS 2, Nations114, Syangtar, Zoolium, DASHBot,
Steve03Mills, Maoj-wsu-sp, EmausBot, Wiki.Tango.Foxtrot, ScottyBerg, Taknik, Dewritech, GoingBatty, Mmichaelc, Dcirovic, AvicBot,
KuduIO, Ritvikbhatnagar1, DeadPixel, Ocaasi, JeremySmyth, Zephyrus Tavvier, Aselaruwan123, MHLut, Tags123, MainFrame, Chuis-
pastonBot, Xmltools, 28bot, ClueBot NG, Oyster Flute, Jack Greenmaven, Elizarf, Matthiaspaul, MelbourneStar, ZzzzBov, Wiki Leah,
Widr, Dr. Zombieman, Helpful Pixie Bot, Furfur, BG19bot, Iamjaypatel, Frze, Lukys~enwiki, Compfreak7, AdventurousSquirrel, Eidab,
Jah1138, Vanischenu, BattyBot, FootholdTechnology, Pratyya Ghosh, Nikosbik, ChrisGualtieri, F331491, Ksaha.pune, PeacefulPlanet3,
UNOwenNYC, Zziccardi, Goasklaura, Hillbillyholiday, IrkBerkeley, Artoria2e5, JPaestpreornJeolhlna, EternalFlare, Srflecha, Kogmaw,
Star767, Leandrogfcdutra, Frankweerasinghe, Mfbubt, Caro.d38, Mustha jm, Rashaunny, J5lx, AK382186, Melcous, Monkbot, Xxiggy,
Carolyn22789, Muzammal65, U2fanboi, Friendssanket, Nick4me, SteveDJ, Vicoindonesia, Jimmiprajapati1, Izkala, Dancan12345, Py-
rotle, Pblowry, Hernanmd, KasparBot, CAPTAIN RAJU, Lemondoge, Callum.McTear, Pt indofood sukses makmur, AlexTugaev74,
Ssoundarya65, Robaydur, Hpink09, Prahlad balaji, Xl20ss, Victor lf and Anonymous: 1094

• JSON Source: https://en.wikipedia.org/wiki/JSON?oldid=771204434 Contributors: Damian Yerrick, AxelBoldt, SJK, Mjb, David spec-
tor, Chris Q, Jose Icaza, Nealmcb, Jarekadam, Pnm, Ixfd64, Phoe6, TakuyaMurata, Ronz, Ootachi, Drrwebber, Brettz9, Kragen, Julesd,
IMSoP, JamesReyes, Charles Matthews, Ebruchez, Gutza, Dtgm, Furrykef, LMB, Bevo, AnonMoos, Skaffman, RedWolf, Peak, Nurg,
Whorvath, Jvangorp, ClemRutter, Jleedev, Mattflaschen, Tea2min, DocWatson42, SamB, DavidCary, Gil Dawson, Ævar Arnfjörð Bjar-
mason, Levin, Kmote, Ssd, Doekman, Joe Sewell, Cloud200, Rchandra, Pne, Christopherlin, Chowbok, Pgan002, Beland, IGEL, Kaldari,
OwenBlacker, Mjs, Panzi, Wevah, Urhixidur, Frenchwhale, Ultrarob, Genesis, D6, Rfl, RedWordSmith, RossPatterson, Bri, Rich Farm-
brough, Mecanismo, Smyth, Jaap~enwiki, TimBray, Dmeranda, Bender235, CanisRufus, Lauciusa, Kwamikagami, Heimy, Nickj, Vipul,
Agoode, Nigelj, A1kmm, Minghong, Wrs1864, Krellis, Gary, Jhertel, Jeltz, Wtmitchell, Lindsay-mclennan, Pediddle, Saxifrage, Brycen,
5.1. TEXT 99

Joshsteiner, Ian Moody, Simetrical, MartinSpacek, Mindmatrix, Jacobolus, Ruud Koot, Dodiad, Easyas12c, Dah31, Hughcharlesparker,
Tom W.M., Gerbrant, Yonran, RichardWeiss, Demonuk, Charles Iliya Krempeaux, Tlroche, Rjwilmsi, Martin.sweeney, Koavf, Amire80,
Sleepyhead81, FlaBot, Tagith, Mga, Xavier Combelle, Delfuego, Skierpage, Kri, Frappyjohn, 121a0012, Bgwhite, Digitalme, Peterl,
Kakurady, YurikBot, Todd Vierling, RussBot, Andrés Santiago Pérez-Bergquist, Fabartus, Markpeak, Dfinch, Hydrargyrum, Member,
Vladimir Lapacek, Gosub, RolandYoung, Colinmcc, Lobwedge, Scs, BMAH07, SixSix, Natkeeran, Falcon9x5, Vlad, Deeday-UK, Alarob,
Gslin, SMcCandlish, Superp, Jeffreymcmanus, Habbie, Kingboyk, A bit iffy, SmackBot, Gamol, Reedy, Maian, Renku, Dylnuge, Mcld,
Gilliam, Ohnoitsjamie, Betacommand, Amux, Unfletch, Lawrence Waterhouse, Thumperward, Snori, EncMstr, Jerome Charles Potts,
Octahedron80, Cassivs, CDV, Jdthood, RuudVisser, Frap, Ashawley, Andyparkins, Tlane, MitchellShnier, Cybercobra, Hammer1980,
Daniel.Cardenas, John Bentley, Zearin, Nellisks, JorisvS, RichMorin, Gorgalore, Nagle, Penagate, Svippong, Hulmem, 16@r, Konklone,
PRRfan, Fangfufu, Mets501, Demisone, EdC~enwiki, Balrog, Psifi, Polyethene, Syberguru, Beefyt, Hu12, Rory O'Kane, Pwforaker, Ja-
son.grossman, Dreftymac, IvanLanin, Vocaro, Pimlottc, CapitalR, Elharo, Booles, FatalError, Bspahh, Tonyhansen, Washi, SimpleBeep,
DanilaKutkevich, Sanspeur, JamesNK, MichaelRWolf, Marcoshz, Cydebot, Krauss, Larsnostdal, MC10, Peterdjones, Ztolstoy, AndyAn-
derson, Verdy p, Ebrahim, Johayek, PKT, Thijs!bot, Pctopp, Dtgriscom, Supersizefriesjj, Dgies, Nick Number, Robert Ham, Dainis,
Joe Schmedley, Yellowdesk, Kuteni, Durrantm, Deflective, MER-C, Lino Mastrodomenico, Chrisdew, Andonic, Magioladitis, Miguel-
Munoz, Transcendence, Azbarcea, Plperez, Otterfan, Gabrielsroka, Mjohnjoseph, Gwern, DouglasCrockford, Hdt83, Ariel., John Millikin,
Zygimantus, RockMFR, Paranomia, Inimino, Mike.lifeguard, Cpiral, Oliver.hessling, Dispenser, Austin512, RenniePet, NewEnglandYan-
kee, Jainvineet, Potatoswatter, Doug4, Bináris, Jefe2000, CWii, Kadnan, AlnoktaBOT, Javy tahu, TXiKiBoT, Oshwah, MEFlora, Alex
rosenberg35, Vipinhari, A4bot, CHForsyth, Anna Lincoln, Econterms, Ttennebkram, Jameswiltshire, Wingedsubmariner, Andy Dingley,
SQL, Peu, Digita, Sevela.p, AJRobbins, Logan, Saom, Roesser, Happysailor, Flyer22 Reborn, Steffan Cline, User5910, AlanUS, Fuddle,
Maxime.Debosschere, Tesi1700, Cems2, Tronic2, Izhaki, ShelleyAdams, ImageRemovalBot, Lockoom, JWilk, TimBunce, Hogstrom,
DragonBot, Senorkaj, Shinkolobwe, Mralokkp, Pot, EhJJ, Arjayay, Tjholowaychuk, SaltyDawg, Aprock, NintendoFan, 1ForTheMoney,
Johnuniq, Joswig, Wineaficionado, Nneuman, Mister pink2, XLinkBot, Kwjbot, Vishalmamania, Mifter, Thomasfrank.se, Addbot, Ghet-
toblaster, Tothwolf, AkhtaBot, Scientus, AdeBarkah, Debloper, Cst17, MrOllie, Cowtowncoder, Doniago, Jarble, Prashanthjoshi, Luckas-
bot, Yobot, JackPotte, Bunnyhop11, Jhswalwell, Amirobot, Zziffle, The Earwig, Wonderfl, AnomieBOT, Arjun G. Menon, Rubinbot,
90, Dmartinezc, RicJohnsonIII, Kromped, SunKing2, Materialscientist, RokerHRO, Phistuck, Elninopanza, ArthurBot, Richtaur, Xqbot,
Termininja, Martnym, Robmanson, Nasa-verve, P.srikanta, Ogendarf, Cyberhitesh, VictorPorton, Acka47, Universalss, Krinkle, Fres-
coBot, W Nowicki, Ijabz, Ilovenagpur, Sae1962, Chenopodiaceous, I dream of horses, JirkaKosek, Jandalhandler, Jesus Presley, Iæfai,
Jonkerz, Rafiahmad, Vrenator, Seahorseruler, Bongdentoiac, Caciquer, Neinsun, Phlegat, Hfmanson, Othree, Tuankiet65, Jvenema, Su-
per48paul, Dewritech, GoingBatty, Bosik GN, Tommy2010, AsceticRose, Listmeister, Tschubring, Fæ, DonToto, Chharvey, Derekle-
ungtszhei, Ebrambot, Dmpatierno, H3llBot, Glasserc, DougEwell, Ryan Kaldari (WMF), Mount Flatten, Edgar.bonet, Speed.arg, Main-
Frame, Mikhail Ryazanov, ClueBot NG, Getify, Jack Greenmaven, Anirudh4444, Shaddim, Koornti, Pdameasap, Jcgoble3, Wezkoh,
Frietjes, EricOP, Widr, Helpful Pixie Bot, Mgamer gd, HMSSolent, WildWeazel, KLBot2, BG19bot, MrForms, VictorEspina, Compf-
reak7, Daemonicky, Dan Bolser, Hg00000, Tianrb, Achowat, Bagel180, BattyBot, Pratyya Ghosh, Cyberbot II, Theoretick, Wjcw, JYBot,
ThereFOUR, Rezonansowy, Harlanhaskins, Kephir, RapPayne, Thomas Tregner, SFK2, Hmahajan, Jwoodward48wiki, Piotr Jurkiewicz,
Myconix, Nadotesumerogi, Comp.arch, Lovelyme00, Tsuvo, Logikl dk, Manul, FockeWulf FW 190, Robwlakes, Kaendfinger, Johnirv-
ing2001, JaconaFrere, Sapper-fi, Rnjckhpr, VeniVidiVicipedia, Tsaloranta, Unician, HMSLavender, A Great Catholic Person, DiscantX,
Fugitron, Douira100, Kaartic, Mtnorthpoplar, , Tropicalkitty, Lemondoge, Susannahmeyer, Dzilbers, A2VudA, Master rg, Alex-
Tugaev72, GreenC bot, Prahlad balaji, Bender the Bot, CJ2012215061, Librarian 1, Mackiovello, Weshigbee, Jordinas and Anonymous:
742
• YAML Source: https://en.wikipedia.org/wiki/YAML?oldid=771675635 Contributors: FvdP, Ubiquity, Wwwwolf, Plop, LittleDan, Julesd,
Marco Krohn, Error, Scott, IMSoP, Palfrey, Jogloran, Zoicon5, Furrykef, Roachmeister, Topbanana, Tjdw, RickBeton, Robbot, Ke4roh,
Friedo, Digizen, Peak, Stephan Schulz, Jvangorp, Netjeff, Diberri, Jleedev, Enochlau, Centrx, Rs2, MikeNolan, Pne, Chowbok, Pgan002,
Beland, Oneiros, Fuper, Bosmon, Ary29, Two Bananas, Austin Hair, Burschik, Frau Holle, Pwaring, Squash, Rspeer, Metastable, Tim-
Bray, Sbo, Jeff schiller, Bender235, Spitzak, Kwamikagami, The bellman, VanGore, Guettarda, Circeus, LeonardoGregianin, Minghong,
Tobych, PatrickFisher, Tony Sidaway, HenryLi, Evolve75, Metamorf, Woohookitty, Mindmatrix, David Haslam, Dandv, JHolman, Sym-
pleko, Marudubshinki, Mandarax, Koavf, Fred Bradstadt, Allen Moore, FlaBot, Moreati, GünniX, RicardoSignes, Mathrick, Sderose,
King of Hearts, Chobot, YurikBot, Hairy Dude, RussBot, Hydrargyrum, Anomalocaris, PlusMinus~enwiki, JmA, AndyDent, JLaTondre,
Eitch, Ckampmeier, SmackBot, FishSpeaker, Eskimbot, Ingy, Stuart P. Bentley, Quartz25, Thumperward, Nbarth, GeeksHaveFeelings,
Frap, Benjamin Mako Hill, Electrolite, Cybercobra, Paddy3118, Derek R Bullamore, DrorHarari, Mwtoews, Daniel.Cardenas, Nicerobot,
Jidanni, Tedwardo2, Tlesher, Jfenwick, WhiteHatLurker, Tmcw, Dreftymac, IvanLanin, Tawkerbot2, FatalError, CmdrObot, Nhumfrey,
Jcoffland, MaxEnt, NonDucor, Cydebot, Gokusandwich, Escarbot, Widefox, Seaphoto, Ellissound, Deflective, Txomin, Mcorazao, PhiLho,
PhilKnight, Magioladitis, Rjnienaber, David Eppstein, Gwern, Macaldo, Indeyets, BryanDavis, Grshiplett, Jpkole, Tweisbach, Notostraca,
TXiKiBoT, Thrig, Caiguanhao, Raucanum, Zarek, WiSaGaN, Cems2, ArchiSchmedes, Rdhettinger, Alksentrs, Hitherebrian, Pointillist,
Tylerdmace, Roelvermeulen, Hcs42, DumZiBoT, XLinkBot, Addbot, Mortense, Ghettoblaster, Scientus, Tsuihark, AlexanderTsamutali,
‫רנדום‬, Yobot, Themfromspace, EnTerr, Wonderfl, Cems1, 4th-otaku, AnomieBOT, FabrizioB, Obersachsebot, Disinnovate, AvdN, Pan-
damonia, Tabledhote, Humiki, Chief sequoya, Balkbalk, RedBot, Just a guy from the KP, Ptarjan, Cnwilliams, Sylozof, Chrysander,
Svesterli, Spakin, Atry, Johanna faust, Bollyjeff, KuduIO, Adius, Hercynium, Mark Martinec, 28bot, Mikhail Ryazanov, ClueBot NG,
Gareth Griffith-Jones, Catlemur, PrimeInc, Mesoderm, Electriccatfish2, BG19bot, Nsda, Who R you?, Chmarkine, Wenqiang7, Kind-
lyviking, Zhaofeng Li, Goertzenator, Frosty, FenixFeather, Ben-Yeudith, Artoria2e5, HeinzRos, Comp.arch, JRArocks, Aprillion, Hoodie
de, Equinox, CAPTAIN RAJU, Lemondoge, TROJACK.JS, RobbieIanMorrison, Fmadd, Haroldreynolds, Vchitto, Dbzvishal and Anony-
mous: 234
• Prototype JavaScript Framework Source: https://en.wikipedia.org/wiki/Prototype_JavaScript_Framework?oldid=721846612 Contribu-
tors: Damian Yerrick, Rp, Jonik, Rfc1394, Subsume, Paulus~enwiki, Pjacobi, Bender235, Nigelj, TommyG, Anders Kaseorg, PatrickFisher,
Psz, Anamanfan, Glyphobet, Kourge, Pete142, Brighterorange, Husky, A.K.Karthikeyan, Fresheneesz, Chobot, Frappyjohn, Adoniscik,
Cryptic, Daniel15, InsayneWrapper, Andrewdupont, Alex mayorga, Shai-kun, Jwestbrook, Amux, Michael Ray, Frap, Batou, Timdream,
Jjmackow, RCanine, FatalError, CmdrObot, Drinibot, Asmor, Thijs!bot, Bradediger, Dvandersluis, JonathanCross, Od1n, Cameltrader,
Vl'hurg, Jahoe, Encyte, JamminBen, Ian Bailey, Bilalis, Globalmoxie, Jamelan, Vinhtantran, PGWG, Byassine, Rob1n, SieBot, ToePeu.bot,
Jerryobject, StaticGull, WikiLaurent, Lockalsash, Zack wadghiri, 21tron, Gikü, Miami33139, XLinkBot, ZackMulgrew, Addbot, Mab-
dul, !Silent, Jarble, Jimminatel, Choij, Xqbot, Erud, 16x9, Frosted14, Arch2all, Zebspace, Temsa, RedBot, TobeBot, Sanctum Regnum,
WanderNauta, Jfmantis, Tomchen1989, EmausBot, Klbrain, Aavindraa, Demonkoryu, Helpful Pixie Bot, Gcarvelli and Anonymous: 81
• Script.aculo.us Source: https://en.wikipedia.org/wiki/Script.aculo.us?oldid=738702172 Contributors: Kku, Finsj, Rfc1394, Acm, Mzajac,
Pjacobi, Bender235, TommyG, Aleki~enwiki, Anamanfan, Mindmatrix, Dandv, Ruud Koot, Toussaint, Tokek, Rufous, Adoniscik, Gun-
100 CHAPTER 5. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

blade~enwiki, Codyrank, Sneftel, AndrewWTaylor, Unschool, Shorty114, Stifle, Shai-kun, Amux, Frap, Cybercobra, RandomP, PuerEx-
Machina, Drinibot, MoofedOne, Madrobby, Odie5533, Dream.x, ColdShine, Thijs!bot, Goteki, Txomin, Tedickey, Cpacifico, VolkovBot,
The Wild Falcon, TXiKiBoT, Jerryobject, Marlellie, Niceguyedc, Uniwalk, DumZiBoT, Psychcf, Boleyn, XLinkBot, Siva2baba, Addbot,
Mabdul, Jarble, Srivastp, Luckas-bot, Castagna, AnomieBOT, Xedret, FrescoBot, Darkmuck, SaalimS, Demonkoryu, Senator2029, Bat-
tyBot, Mypal125 and Anonymous: 33

5.2 Images
• File:8bit-dynamiclist_(reversed).gif Source: https://upload.wikimedia.org/wikipedia/commons/c/cc/8bit-dynamiclist_%28reversed%
29.gif License: CC-BY-SA-3.0 Contributors: This file was derived from: 8bit-dynamiclist.gif
Original artist: Seahen, User:Rezonansowy
• File:Ajax-vergleich-en.svg Source: https://upload.wikimedia.org/wikipedia/commons/0/0b/Ajax-vergleich-en.svg License: CC BY-SA
3.0 Contributors: https://commons.wikimedia.org/wiki/File%3AAjax-vergleich.svg Original artist: DanielSHaischt, via Wikimedia Com-
mons
• File:Ambox_current_red.svg Source: https://upload.wikimedia.org/wikipedia/commons/9/98/Ambox_current_red.svg License: CC0
Contributors: self-made, inspired by Gnome globe current event.svg, using Information icon3.svg and Earth clip art.svg Original artist:
Vipersnake151, penubag, Tkgd2007 (clock)
• File:Ambox_important.svg Source: https://upload.wikimedia.org/wikipedia/commons/b/b4/Ambox_important.svg License: Public do-
main Contributors: Own work, based off of Image:Ambox scales.svg Original artist: Dsmurat (talk · contribs)
• File:Armenian_language_in_the_Armenian_alphabet.svg Source: https://upload.wikimedia.org/wikipedia/commons/c/ce/
Armenian_language_in_the_Armenian_alphabet.svg License: Public domain Contributors: Self, based off of File:Armenian lan-
guage in the Armenian alphabet.png Original artist: Shep
• File:CSS-shade.svg Source: https://upload.wikimedia.org/wikipedia/commons/9/93/CSS-shade.svg License: CC BY-SA 2.5 Contribu-
tors: Transferred from en.wikipedia to Commons. Original artist: The original uploader was Fenring at English Wikipedia
• File:CSS3_taxonomy_and_status-v2.png Source: https://upload.wikimedia.org/wikipedia/commons/f/fd/CSS3_taxonomy_and_
status-v2.png License: CC BY-SA 4.0 Contributors: Own work Original artist: Krauss
• File:CYRILLIC_LETTER_DZHE.png Source: https://upload.wikimedia.org/wikipedia/commons/0/0b/CYRILLIC_LETTER_
DZHE.png License: Public domain Contributors: Transferred from en.wikipedia to Commons by Clarkcj12 using CommonsHelper.
Original artist: Apswaaa at English Wikipedia
• File:Commons-logo.svg Source: https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg License: PD Contributors: ? Origi-
nal artist: ?
• File:Crystal_Clear_app_linneighborhood.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/f9/Crystal_Clear_app_
linneighborhood.svg License: LGPL Contributors: All Crystal Clear icons were posted by the author as LGPL on kde-look; Derivative
works of this file: of File:Banned proxys.svg Original artist: Everaldo Coelho and YellowIcon; User:Ch.Andrew, Notwist and Carport
• File:Crystal_Clear_device_cdrom_unmount.png Source: https://upload.wikimedia.org/wikipedia/commons/1/10/Crystal_Clear_
device_cdrom_unmount.png License: LGPL Contributors: All Crystal Clear icons were posted by the author as LGPL on kde-look;
Original artist: Everaldo Coelho and YellowIcon;
• File:Douglas_Crockford.jpg Source: https://upload.wikimedia.org/wikipedia/commons/e/ef/Douglas_Crockford.jpg License: CC BY-
SA 2.0 Contributors: Douglas Crockford - Yahoo Original artist: Franco Folini from San Francisco, USA
• File:Edit-clear.svg Source: https://upload.wikimedia.org/wikipedia/en/f/f2/Edit-clear.svg License: Public domain Contributors: The
Tango! Desktop Project. Original artist:
The people from the Tango! project. And according to the meta-data in the file, specifically: “Andreas Nilsson, and Jakub Steiner (although
minimally).”
• File:En-JavaScript.ogg Source: https://upload.wikimedia.org/wikipedia/commons/4/4c/En-JavaScript.ogg License: CC BY-SA 3.0 Con-
tributors:
• Derivative of JavaScript Original artist: Speaker: Mangst
Authors of the article
• File:Folder_Hexagonal_Icon.svg Source: https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg License: Cc-by-
sa-3.0 Contributors: ? Original artist: ?
• File:Free_and_open-source_software_logo_(2009).svg Source: https://upload.wikimedia.org/wikipedia/commons/3/31/Free_and_
open-source_software_logo_%282009%29.svg License: Public domain Contributors: FOSS Logo.svg Original artist: Free Software Portal
Logo.svg (FOSS Logo.svg): ViperSnake151
• File:HTML.svg Source: https://upload.wikimedia.org/wikipedia/commons/8/84/HTML.svg License: CC BY-SA 2.5 Contributors:
HTML.svg Original artist: Dreftymac
• File:HTML5-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/6/61/HTML5_logo_and_wordmark.svg License: CC
BY 3.0 Contributors: Official HTML5 logo by W3C. Licensed under the CC-by 3.0 Original artist: W3C
• File:HTML5_APIs_and_related_technologies_taxonomy_and_status.svg Source: https://upload.wikimedia.org/wikipedia/
commons/7/7f/HTML5_APIs_and_related_technologies_taxonomy_and_status.svg License: CC BY-SA 4.0 Contributors: Own work
Original artist: Mercury999
• File:HTML_Example_Code.png Source: https://upload.wikimedia.org/wikipedia/en/9/94/HTML_Example_Code.png License: CC-
BY-SA-3.0 Contributors:
Own work
Original artist:
Zafiraman
5.3. CONTENT LICENSE 101

• File:Http_request_telnet_ubuntu.png Source: https://upload.wikimedia.org/wikipedia/commons/c/c6/Http_request_telnet_ubuntu.


png License: Public domain Contributors: Own work Original artist: TheJosh
• File:Håkon_Wium_Lie.jpg Source: https://upload.wikimedia.org/wikipedia/commons/5/54/H%C3%A5kon_Wium_Lie.jpg License:
CC BY-SA 2.0 Contributors: Hakon Wium Lie - Opera Original artist: Franco Folini from San Francisco, USA
• File:Internet1.jpg Source: https://upload.wikimedia.org/wikipedia/commons/7/75/Internet1.jpg License: GFDL Contributors: Own work
Original artist: Rock1997
• File:Internet_Explorer_10_logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/2/2f/Internet_Explorer_10_logo.svg
License: Public domain Contributors: Extracted from this color and this shape. Original artist: Microsoft
• File:Internet_map_1024.jpg Source: https://upload.wikimedia.org/wikipedia/commons/d/d2/Internet_map_1024.jpg License: CC BY
2.5 Contributors: Originally from the English Wikipedia; description page is/was here. Original artist: The Opte Project
• File:JSON_vector_logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/c/c9/JSON_vector_logo.svg License: Public
domain Contributors: http://clipartist.info//openclipart.org/2011/Sept/September/06-Tuesday/JSON_Logo.svg Original artist: Douglas
Crockford
• File:Lock-green.svg Source: https://upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg License: CC0 Contributors: en:File:
Free-to-read_lock_75.svg Original artist: User:Trappist the monk
• File:M_box.svg Source: https://upload.wikimedia.org/wikipedia/commons/9/94/M_box.svg License: Public domain Contributors: Own
work based on: File:Microsoft.svg Original artist: Ariesk47 (<a href='//commons.wikimedia.org/wiki/User_talk:Ariesk47' title='User
talk:Ariesk47'>talk</a>)
• File:MediaWiki-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/b/bb/MediaWiki-notext.svg License: Public do-
main Contributors: Own work based on: Tournesol.png Original artist: User:Anthere (flower) and User:Eloquence (combination, concept),
reworked by User:Aka, vectorized by User:Chrkl ; brackets fixed by guillom
• File:Node.js_logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/d/d9/Node.js_logo.svg License: Public domain Contrib-
utors: https://nodejs.org/about/resources/ Original artist: node.js authors
• File:Nuvola_apps_emacs_vector.svg Source: https://upload.wikimedia.org/wikipedia/commons/6/67/Nuvola_apps_emacs_vector.svg
License: LGPL Contributors:
• Nuvola_apps_emacs.png Original artist: Nuvola_apps_emacs.png: David Vignoni
• File:Old_HTML_Logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/1/12/Old_HTML_Logo.svg License: Public do-
main Contributors: http://www.w3.org/Icons/WWW/html_48x48.gif at http://www.w3.org/Icons/WWW/ Original artist: World Wide Web
Consortium (W3C)
• File:Question_book-new.svg Source: https://upload.wikimedia.org/wikipedia/en/9/99/Question_book-new.svg License: Cc-by-sa-3.0
Contributors:
Created from scratch in Adobe Illustrator. Based on Image:Question book.png created by User:Equazcion Original artist:
Tkgd2007
• File:Sound-icon.svg Source: https://upload.wikimedia.org/wikipedia/commons/4/47/Sound-icon.svg License: LGPL Contributors:
Derivative work from Silsor's versio Original artist: Crystal SVG icon set
• File:Symbol_list_class.svg Source: https://upload.wikimedia.org/wikipedia/en/d/db/Symbol_list_class.svg License: Public domain Con-
tributors: ? Original artist: ?
• File:Symbol_neutral_vote.svg Source: https://upload.wikimedia.org/wikipedia/en/8/89/Symbol_neutral_vote.svg License: Public do-
main Contributors: ? Original artist: ?
• File:Tim_Berners-Lee_April_2009.jpg Source: https://upload.wikimedia.org/wikipedia/commons/c/c8/Tim_Berners-Lee_April_
2009.jpg License: CC BY 2.0 Contributors: Con Tim Berners-Lee Original artist: Enrique Dans from Madrid, Spain
• File:Tim_Berners-Lee_CP_2.jpg Source: https://upload.wikimedia.org/wikipedia/commons/7/7e/Tim_Berners-Lee_CP_2.jpg Li-
cense: CC BY 2.0 Contributors: originally posted to Flickr as Tim Berners-Lee Original artist: Silvio Tanaka
• File:Wikibooks-logo-en-noslogan.svg Source: https://upload.wikimedia.org/wikipedia/commons/d/df/Wikibooks-logo-en-noslogan.
svg License: CC BY-SA 3.0 Contributors: Own work Original artist: User:Bastique, User:Ramac et al.
• File:Wikibooks-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikibooks-logo.svg License: CC BY-SA 3.0
Contributors: Own work Original artist: User:Bastique, User:Ramac et al.
• File:Wikidata-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/ff/Wikidata-logo.svg License: Public domain Con-
tributors: Own work Original artist: User:Planemad
• File:Wikimedia_Community_Logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/7/75/Wikimedia_Community_
Logo.svg License: Public domain Contributors: Own work Original artist:
• pl.wiki: WarX
• File:Wikiversity-logo-Snorky.svg Source: https://upload.wikimedia.org/wikipedia/commons/1/1b/Wikiversity-logo-en.svg License:
CC BY-SA 3.0 Contributors: Own work Original artist: Snorky
• File:Wiktionary-logo-v2.svg Source: https://upload.wikimedia.org/wikipedia/commons/0/06/Wiktionary-logo-v2.svg License: CC BY-
SA 4.0 Contributors: Own work Original artist: Dan Polansky based on work currently attributed to Wikimedia Foundation but originally
created by Smurrayinchester
• File:XML.svg Source: https://upload.wikimedia.org/wikipedia/commons/6/68/XML.svg License: CC BY-SA 2.5 Contributors: en:Image:
XML2.svg Original artist: en:User:Dreftymac
• File:Zhongwen.svg Source: https://upload.wikimedia.org/wikipedia/commons/9/9e/Zhongwen.svg License: Public domain Contributors:
? Original artist: ?

5.3 Content license


• Creative Commons Attribution-Share Alike 3.0

You might also like