CHAPTER 2
Creating Your First Web Pages
In this chapter, you briefly study the anatomy of a web page before launching Visual Studio Code, configuring it, and using it to create your first web pages. You learn to add headings, text, and comments to web pages; view a page’s source code and validate HTML; and create hyperlinks between web pages.
Study the Anatomy of a Web Page
Tell Visual Studio Code Which Folder to Use
Open the Web Page in a Browser
Nest One Element Within Another Element
Understanding the Essentials of Hyperlinks
Study the Anatomy of a Web Page
In HTML, each web page has the same basic structure, no matter how simple or complex the page is.
An HTML web page starts with a DOCTYPE
definition that specifies the document’s encoding type. Next comes a statement of the language used, such as lang="en"
to indicate English. After that, the web page consists of a head
element and a body
element. The head
element contains information about the document, such as the page title and the base URL for links. The body
element holds the remaining content of the web page, such as headings, text, and linked media files.
Identify the Four Key Elements of ...
Get Teach Yourself VISUALLY HTML and CSS, 2nd Edition 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.