With the elements that I have taught you, you can make a perfectly acceptable webpage. If you want a gallery, the img
element is your friend; if you want to display a series of items, you have lists, definition lists if you want to put up an online glossary, and tables if you want to display a spreadsheet. The div
element is good for breaking up your page into sections (using the id
and class
attributes for documentation), and the p
element is essential no matter what you do.
But this is just the beginning.
One thing that you'll find when working with the (X)HTML that I've been telling you about is that everything is very plain.
(X)HTML provides structure, a framework for your information so that any computer with a browser can display it in a coherent fashion. That's basically its only job.
Presentation—how the webpage looks—is the job of a language known as CSS, a taste of which you got when working with the style
attribute.
I'll introduce another head element—style
—in the chapter where I explain how to use CSS. This is also where the link
element comes truly into its own.
Behavior handles how you interact with the page—that is, when you click on this element or hover the cursor over that text. This allows for popup menus and other neat tricks.
This is why I haven't mentioned (X)HTML forms yet: they're useless without scripting. I explain them in Forms.
To compare it to a house, (X)HTML is the actual building itself. Presentation is the paint, shape of the window, which doors you use, carpets, flooring, curtains, furniture—your decor. Behavior is your gadgetry.