HTML chapter 3

Chapter 3 — Lists, Tables & Basic Layout

  • Lists:
    • Ordered list: <ol><li>Item</li></ol>
    • Unordered list: <ul><li>Item</li></ul>
    • Description list: <dl><dt>Term</dt><dd>Definition</dd></dl>
  • Tables: used for tabular data (not for layout): <table> <thead><tr><th>Name</th><th>Age</th></tr></thead> <tbody> <tr><td>Alice</td><td>22</td></tr> </tbody> </table>
    • Key tags: <table>, <tr> (row), <th> (header cell), <td> (data cell), <thead>, <tbody>, <tfoot>.
  • Basic page structure for layout:
    • Use semantic containers: <header>, <nav>, <main>, <section>, <article>, <aside>, <footer>.
    • Avoid using tables for layout — use CSS (flexbox/grid) instead.
  • Forms (intro): basic concept: collect user input (<form>, <input>, <textarea>, <select>, <button>). Use action and method attributes.
  • Accessibility basics:
    • Use semantic tags, alt attributes for images, labels for form inputs (<label for="id">), and meaningful link text.

Leave a Comment

Your email address will not be published. Required fields are marked *