23.05.2015 Views

Building the User Interface by Using HTML5: Organization ... - server

Building the User Interface by Using HTML5: Organization ... - server

Building the User Interface by Using HTML5: Organization ... - server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

64 | Lesson 3<br />

Figure 3-10<br />

An HTML document that<br />

includes article and aside<br />

elements<br />

LICENSED PRODUCT NOT FOR RESALE<br />

Aside<br />

<strong>Using</strong> Tags to Create Tables and Lists<br />

Tables and lists give structure to specific information in HTML documents. A table contains<br />

rows and columns, and displays data in a grid. In HTML, you can create ordered<br />

and unordered lists. Each item in an ordered list is marked <strong>by</strong> a number or letter. An<br />

unordered list is a bulleted list.<br />

This section focuses on how to create tables and lists using HTML elements. <strong>HTML5</strong> introduces<br />

some new elements for both tables and lists, but most of <strong>the</strong> tags and concepts are <strong>the</strong><br />

same as previous specifications. If you’ve ever created an HTML table or list, you should be<br />

able to breeze through this section.<br />

CERTIFICATION READY<br />

How do you create a<br />

table?<br />

2.4<br />

CREATING TABLES<br />

An HTML table contains rows and columns, and is used to organize and display information<br />

in a grid format. Some developers use tables for layout purposes, such as to position or align<br />

content with images, but that’s not <strong>the</strong> best use for tables.<br />

Regarding markup, every HTML table begins with <strong>the</strong> tag. Rows are marked <strong>by</strong> <strong>the</strong><br />

tag, column headers use <strong>the</strong> tag, and cells are defined <strong>by</strong> <strong>the</strong> tag.<br />

The markup for a very basic two-column, five-row table is as follows. Comments have been<br />

added to indicate columns and rows, which are informational only and don’t appear when <strong>the</strong><br />

document is viewed in a browser, is shown in Figure 3-11:<br />

<br />

<br />

Quarter <br />

Total Sales <br />

<br />

<br />

Q1<br />

$4,349<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!