HyperText Markup Language (HTML)

Web Architecture and Information Management [./]
Spring 2011 — INFO 153 (CCN 42509)

Erik Wilde and Dilan Mahendran, UC Berkeley School of Information
2011-02-02

Creative Commons License [http://creativecommons.org/licenses/by/3.0/]

This work is licensed under a CC
Attribution 3.0 Unported License
[http://creativecommons.org/licenses/by/3.0/]

Contents Erik Wilde and Dilan Mahendran: HyperText Markup Language (HTML)

Contents

Erik Wilde and Dilan Mahendran: HyperText Markup Language (HTML)

(2) Abstract

The Hypertext Markup Language (HTML) is the most important content type on the Web. This lecture covers a basic overview of how to use HTML markup in general. In particular, we look at page titles, meta tags, inserting text and images, using lists, and creating simple tables. Attributes can be used for more layout control in the HTML tags, but most layout issues are deferred until the CSS lecture.



Erik Wilde and Dilan Mahendran: HyperText Markup Language (HTML)

(3) Structured Documents on the Web



HTML Validation

Outline (HTML Validation)

  1. HTML Validation [4]
  2. HTML and Structure [10]
  3. Conclusions [1]

(5) Checking for Correctness

<!-- Unordered Lists (UL) bullet styles -->
<!ELEMENT UL - - (LI)+                 -- unordered list -->
<!ATTLIST UL
  %attrs;                              -- %coreattrs, %i18n, %events --
  >
<!ELEMENT LI - O (%flow;)*             -- list item -->
<!ATTLIST LI
  %attrs;                              -- %coreattrs, %i18n, %events --
  >
<!ENTITY % flow "%block; | %inline;">
<!ENTITY % block
     "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
      BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">


(6) Tool-Based Validation



(7) Web-Based Validation



(8) Firebug & Web Inspector

Firebug

HTML and Structure

Outline (HTML and Structure)

  1. HTML Validation [4]
  2. HTML and Structure [10]
  3. Conclusions [1]

(10) Text



(11) More Advanced Text



(12) Lists

  <dl>
   <dt>Unordered Lists</dt>
   <dd>
    <ul>
     <li>Unordered lists contain just lists of items</li>
     <li>Itemization symbols are chosen by the browser</li>
    </ul>
   </dd>
   <dt>Ordered Lists</dt>
   <dd>
    <ol>
     <li>Ordered lists contain ordered lists of items</li>
     <li>The numbering scheme is chosen by the browser
      <ol>
       <li>Lists may be nested as deeply as required</li>
      </ol>
     </li>
    </ol>
   </dd>
  </dl>


(13) Tables

  <table>
   <tr>
    <th>Date</th>
    <th>Topic</th>
   </tr>
   <tr>
    <td>2009-01-28</td>
    <td><a href="../html-basic">HTML Basics</a></td>
   </tr>
   <tr>
    <td>2009-02-02</td>
    <td><a href="../html-advanced">Advanced HTML</a></td>
   </tr>
  </table>


(14) Merging Table Cells

HTML Table with Merged Cells

(15) Merging Rows

  <table>
   <tr>
    <th>Date</th>
    <th>Topic</th>
   </tr>
   <tr>
    <td>2009-03-23</td>
    <td rowspan="2">Spring<br>Break</td>
   </tr>
   <tr>
    <td>2009-03-25</td>
   </tr>
  </table>


(16) Merging Columns

  <table>
   <tr>
    <th>Date</th>
    <th colspan="2">Resources</th>
   </tr>
   <tr>
    <td>2009-01-28</td>
    <td><a href="../html-basic">HTML Basics</a></td>
    <td><a href="../2009-01-28-html-basic.pdf">PDF</a></td>
   </tr>
   <tr>
    <td>2009-02-02</td>
    <td><a href="../html-advanced">Advanced HTML</a></td>
    <td><a href="../2009-02-02-html-advanced.pdf">PDF</a></td>
   </tr>


(17) Images

<img src="../img/portrait.png" alt="Portrait">


(18) Image Details



(19) Links



Conclusions

Outline (Conclusions)

  1. HTML Validation [4]
  2. HTML and Structure [10]
  3. Conclusions [1]

(21) HTML Matters



2011-02-02 Web Architecture and Information Management [./]
Spring 2011 — INFO 153 (CCN 42509)