HTML and CSS Reference
LEARNING WHICH FILES WORK WITH THE WEB
If you're new to writing Web pages, the i rst thing to learn is what i les work with Web pages.
Directly, HTML5 recognizes, the .html extension and the three graphic i le extensions
discussed earlier ( .jpg , .png , and .gif ). However, you'll see a reference to .css i les.
saved with a .js extension, and they, too, may have a link reference.
the opening <script> and closing </script> tags). At other times, the developer chooses
For example, the following code loads the external .css i le lookingGood.css :
< link rel = ”stylesheet” type = ”text/css” href = ”lookingGood.css” />
h is topic concentrates on HTML5, but you dei nitely need CSS3 for formatting, so you'll see
it here a good deal, too. For the most part, you'll see CSS embedded in the HTML code. In
Chapter 3, you learn more about using CSS3 with HTML5. Chapter 12 provides you with a
KNOWING HOW TAGS WORK
When you write code in HTML5, you're going to need to know which elements to use to get
what you want. As we saw in Chapter 1, you can change the size and appearance of a font
using the <h1> tag. To get started, you won't be modifying the tags with CSS. When you use
<h1> , you can expect to get the same big black bold text every time. (You can modify it to be
a small green font with CSS if you want, but you'll have to wait for Chapter 3 to see how to use
CSS to do that.)
In a nutshell, your tags work by dividing up your page into sections that begin with an
opening tag <element> and end with a closing </element> tag. You can write all the
HTML5 pages you want using that method and not much else, and your page will work just
i ne. Naturally, you're going to want to create pages with a bit of l air and help the browser
know right of the bat what you're up to, but for the most part, you just write tags. So, let's start
with the basic HTML5 container.