Lesson 2: Fundamentals of HTML, XHTML, and CSS

web04.psd

In this lesson, you’ll discover the fundamentals of HTML, XHTML, and CSS.Together, these form the structure and style of your web pages.

What you’ll learn in this lesson:

  • The structure of HTML
  • The difference between HTML and XHTML
  • The fundamentals of CSS

Starting up

You will work with several files from the HTML5_02lessons folder in this lesson. Make sure you have loaded the HTML5lessons folder onto your hard drive from www.digitalclassroombooks.com/HTML5. See “Loading lesson files” in the Starting Up section of this book. We used the text editor Coda on the Mac to create the markup in this lesson, but you can use the text editor of your choosing and achieve the same results. Other popular text editors for the Mac include: BBedit, TextWrangler, and Textmate. For Windows, Notepad++, Brackets, and Sublime are good options. For more details see the sidebar on the next page.

Web languages

In this lesson, you will discover two languages: HTML and CSS. Although they have different syntax and rules, they are highly dependent on each other. By the end of this lesson, you will understand how to create simple HTML pages, add images, create hyperlinks from one page to another, and add simple styling to pages using CSS.

This lesson covers a lot of ground, and many of the core principles introduced in this lesson are reinforced throughout ...

Get HTML5 Digital Classroom 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.