Chapter 1

Structuring Documents for the Web

What You Will Learn in This Chapter

  • Creating several example web pages in HTML
  • Seeing how a web page describes its structure to a web browser
  • Discovering the meaning of some key terms used by web designers, such as elements, attributes, tags, andmarkup Code Downloads for this Chapter

The code downloads for this chapter are found at on the Download Code tab. The code is in the Chapter 1 download and individually named according to the names throughout the chapter.

In this chapter, you learn the key concept to create any web page: how to give it structure. You need to add structure to a document so that web browsers can present the page to people who visit your site in a way they can understand. For example, imagine a news article that contains a headline (or title) and several paragraphs of text; if you want to put this article on the web, you would need to add structure to the words in the document so that the browser knows which words are the headline, and where each paragraph starts and ends. To give a document structure, you need to learn how to create web pages using HTML.

A Web of Structured Documents

Every day, you come across all kinds of printed documents—newspapers, train timetables, and insurance forms. You can think of the web as being a sea of documents that all link together and bear a strong similarity to the printed documents that you meet in everyday life. ...

Get Beginning HTML and CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.