23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Match<strong>in</strong>g Tags <strong>in</strong> an HTML Document<br />

Another application <strong>in</strong> which match<strong>in</strong>g is important is <strong>in</strong> the validation of HTML<br />

documents. HTML is the st<strong>and</strong>ard format for hyperl<strong>in</strong>ked documents on the<br />

Internet. In an HTML document, portions of text are delimited by HTML tags. A<br />

simple open<strong>in</strong>g HTML tag has the form "" <strong>and</strong> the correspond<strong>in</strong>g clos<strong>in</strong>g<br />

tag has the form "." Commonly used HTML tags <strong>in</strong>clude<br />

• body: document body<br />

• h1: section header<br />

• center: center justify<br />

• p: paragraph<br />

• ol: numbered (ordered) list<br />

• li: list item.<br />

Ideally, an HTML document should have match<strong>in</strong>g tags, although most browsers<br />

tolerate a certa<strong>in</strong> number of mismatch<strong>in</strong>g tags.<br />

We show a sample HTML document <strong>and</strong> a possible render<strong>in</strong>g <strong>in</strong> Figure 5.3.<br />

281

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

Saved successfully!

Ooh no, something went wrong!