2. Semantic HTML

HTML is the technology that defines the content and structure of any website. Written properly, it should also define the semantics (meaning) of the content in a machine-readable way, which is vital for accessibility, search engine optimization, and making use of the built-in features browsers provide for content to work optimally. This module covers the basics of the language, before looking at key areas such as document structure, links, lists, images, forms, and more.

General resources:

2.1 Basic HTML syntax

Learning outcomes:

Resources:

2.2 Good document structure

Learning outcomes:

Notes:

This conformance criterium doesn't require that you go too deep into strategies for writing SEO-friendly content, although you should understand what this means.

Resources:

2.3 Lists

Learning outcomes:

Notes:

  • Unordered lists are for marking up a list of items where the order doesn't matter, such as a shopping list.
  • Ordered lists are for marking up a list of items where the order does matter, such as a set of directions.
  • Description lists are for associating a list of terms with descriptions of those terms, for example, product names and descriptions in a shopping cart.

Resources:

2.4 Advanced text techniques

Learning outcomes:

Notes:

It is not necessary to have an exhaustive understanding of all the semantic elements HTML offers at this stage, but you should understand that they exist, and how to look them up using MDN if you need them.

Resources:

Learning outcomes:

Resources:

2.6 Media

Learning outcomes:

Resources:

2.7 Other interactive elements

Learning outcomes:

Notes:

There are a lot of input types and form features not explicitly mentioned here; the purpose is to get a good general introduction to buttons and form elements, and learn the most common cases. The advanced/specialized cases can be studied on a need-to-know basis, as part of a web developer's constant learning throughout their career.

Notes:

Make sure to understand that client-side form validation is really a usability enhancement, to be used alongside server-side form validation. It is not a substitute for it.

Notes:

  • Going back to the argument for semantic HTML (see also 2.2 Good document structure), you should understand why it is important to use the right element for the right job. For example, use a <button> to submit your form, and not a <div> programmed to behave like a <button>.
  • Understand the features programmed into <button>s and form elements by the browser by default, and how important they are. Examples include keyboard accessibility, focus outlines, and semantic meaning for AT to identify the elements and communicate their meaning.

Resources:

2.8 HTML tables

Learning outcomes:

Resources:

2.9 Debugging HTML

Learning outcomes:

Resources: