© Risto Viita/Shutterstock


Creating Page Divisions

SINCE THE FIRST HTML pages began to create the Web, developers have used tables to format content. Tables are advantageous because Web browsers always seem to display them correctly—making the use of tables a safe design approach. Unfortunately, using a table for complex page design often leads to large and often complex amounts of HTML. As a result, such pages become harder to modify.

A better approach to page layout is to use CSS and <div> and </div> tag pairs. In the simplest sense, the <div> and </div> tag pair creates a container where you can place related HTML tags for styling ...

Get Introduction to Web Development Using HTML 5 now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.