Datasheet
13
Chapter 1: The Least You Need to Know about HTML, CSS, and the Web
The browser knows to display these components of the page in specific ways
thanks to the HTML markup, shown in Listing 1-1. (You’ll see Listing 1-1 in all
its glory at the end of the chapter.)
Any text enclosed between angle brackets (less-than and greater-than signs:
< >) is an HTML tag (often called the markup). For example, a p within brack-
ets (<p>…</p> tags) identifies text inside paragraphs. The markup between
<style> and </style> tags at the head of the file uses CSS to define the
look and feel for various HTML elements used on this page. That’s really all
there is to it. You embed the markup in a text file, along with text for readers
to view, to tell the browser how to display your Web page.
Tags and the content between (and within) the tags are collectively called
elements. Angle brackets < > enclose HTML and XHTML markup, curly braces
{ } enclose CSS markup.
Browsers
The user’s piece in the Web puzzle is a Web browser. Web browsers read
instructions written in HTML, XHTML, and CSS, and use those instructions to
display Web page content on your screen.
You should always write your HTML with the idea that people will view the
content using a Web browser. Just remember that there’s more than one kind
of browser out there, and each one comes in several versions.
Usually, Web browsers request and display Web pages available via the
Internet from a Web server. You can also display HTML pages you’ve saved
on your own computer before making them available on a Web server on
the Internet. When you’re developing your own HTML pages, you view these
pages (called local pages) in your browser. You can use local pages to get a
good idea of what people see after the page goes live on the Internet.
Each Web browser interprets HTML in its own way. The same HTML may not
look exactly alike from one browser to the next. When you work with basic
HTML, variations will be minor, but as you add other elements (such as
scripting and multimedia), rendering markup gets hairy.
Chapter 2 shows how to use a Web browser to view a local copy of your first
Web page.
Some people use text-only Web browsers, such as Lynx, because either
✓ They’re visually impaired and can’t use a graphical display.
✓ They like a lean, fast Web browser that displays only text.
06_9780470916599-ch01.indd 1306_9780470916599-ch01.indd 13 11/30/10 12:23 AM11/30/10 12:23 AM