This chapter is an introduction to the exciting world of HTML. It demonstrates how to create a valid HTML document and how to include style rules, script code, and linked resources.
Meet HTML
Understand Structure
Create Documents
Validate Documents
Bestow Titles
Supply Metadata
Describe Contents
Add Styles
Include Scripts
Link Resources
Summary
Meet HTML
Historically, the desire to have text printed in specific formats meant that original manuscripts were âmarked upâ with annotation to indicate to the book printer how the author would like sections of text laid out. This annotation had to be concise and needed to be easily understood both by the printer and the author. A series of commonly-recognized abbreviations therefore formed the basis of a standard markup language.
HyperText Markup Language (HTML) is a modern standard markup language that uses common abbreviations called âtagsâ to indicate to the web browser how the author would like to have sections of a web page laid out. It was first devised in 1989 by British physicist Tim Berners-Lee at CERN in Switzerland (the European organization for nuclear research) to share all computer-stored information between the CERN physicists. Berners-Lee created a text browser to transfer information over the internet using hypertext to provide point-and-click navigation. In May 1990 this system was named the World Wide Web and was enhanced in 1993 when college student Marc Andreessen added an image tag. Now that HTML could display both text and images, the World Wide Web quickly became hugely popular.
As various web browsers were developed, their makers began to add individual proprietary tags â effectively creating their own versions of HTML! The World Wide Web Consortium (W3C) standards organization recognized the danger that HTML could become fragmented, so they created a standard specification to which all web browsers should adhere. This successfully encouraged the browser makers to support the standard tags. The final W3C standard specification of HTML5 is now continued by the Web Hypertext Application Technology Working Group (WHATWG) as the âHTML Living Standardâ.
The World Wide Web comprises a series of large-capacity computers, known as âweb serversâ, which are connected to the internet via telephone lines and satellites. The web servers each use the HyperText Transfer Protocol (HTTP) as a common communication standard to allow any computer connected to any web server to access files across the web.
HTML web pages are merely plain text files that have been saved with a â.htmâ or â.htmlâ file extension, such as index.html.
You can find the HTML Living Standard specification, and other related specifications, online at whatwg.org
In order to access an HTML file across the internet, its web address must be entered into the address field of the web browser. The web address is formally known as its âUniform Resource Locatorâ (URL), and typically has three parts:
â˘Protocol â any URL using the HTTP protocol begins by specifying the protocol as http:// or secure https://
â˘Domain â the host name of the computer from which the file can be downloaded. For instance: www.example.com
â˘Path â the file ...