Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > HTML/XHTML

  • Print
  • + Share This
This chapter is from the book

Breaking up a Page into Divisions

Breaking up your page into divisions allows you to apply styles to an entire chunk of your page at once. This is particularly useful for designing layouts with CSS (see page 169).

To break up a page into divisions:

  1. At the beginning of the division, type <div.
  2. If desired, type id="name", where name uniquely identifies the division.
  3. If desired, type class="name", where name is the identifying name of the class that the division belongs to.
  4. Type > to complete the opening div tag.
  5. Create the contents of the division.
  6. At the end of the division, type </div>.
Figure 3.16

Figure 3.16 There is one large enclosing division (that begins with the level one header and goes to just before the closing body tag) and two inner divisions (that include the level two headers and their paragraphs).

Figure 3.17

Figure 3.17 You generally can't see the effect of divisions until you add styles (see page 127). Then they really shine. You can see this page with styles on my Web site (see page 26).

  • + Share This
  • 🔖 Save To Your Account