WGU D276 practice

HTML Headings, Text Formatting, Links, and Lists: h1-h6, Anchors, and ul, ol, dl

Heading elements rank content instead of sizing it, strong and em carry meaning that b and i do not, a fragment link points at an element's id, and ul, ol, and dl each describe a different kind of grouping. Work through how each one behaves, then test yourself on the cases people actually get wrong.

Headings, formatting elements, links, and lists are the four tools HTML gives you for describing what content is, and each one is chosen by meaning rather than appearance. <h1> through <h6> rank sections of a page, <strong> and <em> add importance and emphasis that <b> and <i> deliberately do not, an <a> element with an href points at a destination that can be another site or an id further down the same page, and <ul>, <ol>, and <dl> describe three genuinely different kinds of grouping. CSS handles how all of it looks.

Headings rank content; they do not set text size

The six heading elements express rank. <h1> is the top level and normally names the whole page, much as <title> does; a page is generally expected to have a single <h1>. Each higher number nests inside the nearest preceding lower one, so an <h3> is a subsection of the <h2> above it.

Two habits keep this clean. First, start at <h1> and do not skip levels going down: follow <h2> with <h3>, never <h4>. Screen reader users navigate by jumping between headings and hear the levels as an outline, so a gap reads as a missing piece of the page. Coming back up is fine — an <h3> can be followed by an <h2> that opens the next major section. Second, never choose a heading for its default size; that is what the CSS font-size property is for.

Wrapping content in <section> does not renumber anything. The "document outline algorithm" that was supposed to demote headings nested inside sectioning elements was never implemented by any browser or assistive technology and is no longer part of the HTML standard, so an <h1> inside a <section> is still announced as a level-1 heading. Nesting <h1> elements that way was allowed in older versions of the standard and is now non-conforming — pick the rank explicitly instead.

Formatting elements that carry meaning

<strong> marks importance, seriousness, or urgency. <em> marks stress emphasis — the word you would lean on when reading a sentence aloud, which can change what the sentence means. Their look-alikes exist for different jobs: <b> draws attention without conveying extra importance, and <i> sets text apart by convention, such as a species name, a technical term, or a phrase in another language. None of the four is deprecated; they simply mean different things. If all you want is bold or italic pixels, reach for the CSS font-weight and font-style properties instead.

Links, fragments, and targets

An <a> becomes a link once it has an href. That value can be an absolute URL, a site-relative path, a scheme such as mailto: or tel:, or a fragment. A fragment begins with # and names the id of an element in the document, so <a href="#gear"> scrolls to <h2 id="gear">. Ids must be unique within the page and cannot contain whitespace; the empty fragment href="#" — and href="#top" when nothing on the page carries that id — points at the top of the current document.

The target attribute says which browsing context opens the URL: _self (the default), _blank (usually a new tab, though a user can configure a new window), _parent, and _top. rel="noopener" stops the opened page from reaching back through window.opener; browsers now apply that behavior implicitly for target="_blank", so writing it out is belt-and-braces rather than essential. rel="noreferrer" is the separate keyword that suppresses the referrer header, and it blocks window.opener as well. For the wider picture of where this fits, see the WGU D276 Web Development Foundations study guide.

Three kinds of lists

Use <ul> when reordering the items would not change the meaning, and <ol> when it would — steps, rankings, legal clauses. Use <dl> for name-and-value groups such as a glossary or a specifications table, pairing <dt> terms with <dd> descriptions. Both <ul> and <ol> accept only <li> children (plus the script-supporting <script> and <template>), which is why a nested list has to live inside an <li>.

Practice: Headings Text Links Lists

  1. A page opens with an h1 element reading "Course Catalog." Further down, a section element contains its own h1 reading "Enrollment Steps." What is actually true about that second heading?

    • It becomes a level-2 heading, because a section element shifts any heading nested inside it down one rank.
    • It is still a level-1 heading, because no browser or screen reader implements a document outline algorithm — it should be written as an h2.
    • Screen readers announce it as level 2, because the section element's landmark role adjusts the depth of headings inside it.
    • It is invalid markup, so browsers refuse to render the section until the h1 is changed.
    Show answer & explanation

    Correct answer: It is still a level-1 heading, because no browser or screen reader implements a document outline algorithm — it should be written as an h2.. The outline algorithm that would have demoted headings inside sectioning elements was never implemented by any browser or assistive technology and is no longer part of the HTML standard, so assistive tech reports whatever rank the tag itself carries — level 1. The "section shifts the rank" idea is the classic misconception left over from early HTML5 tutorials; landmark roles describe regions of a page and never change a heading's level (and a section only exposes the region role at all when it has an accessible name), and browsers render nonconforming markup without complaint rather than refusing it.

  2. You have written an h2 reading "Shipping" and need a subheading beneath it, but the default size of an h3 looks too large for your layout. What is the right move?

    • Use h4, since it renders smaller and the level number is really just a styling hint.
    • Use h3 and set its size with the CSS font-size property.
    • Use a bold paragraph — a p element containing a strong element — so no heading sizes need overriding at all.
    • Use h6, which is the standard element for a small subheading.
    Show answer & explanation

    Correct answer: Use h3 and set its size with the CSS font-size property.. Heading elements communicate rank in the document outline, not size, so the level is decided by structure and the appearance is decided by CSS. Jumping from h2 straight to h4 or h6 leaves a gap that screen reader users navigating by heading level hear as missing structure, and the bold paragraph — tempting because it can look identical — removes the section from the heading list entirely, so it can no longer be jumped to.

  3. Which statement correctly describes the difference between a pair of HTML formatting elements?

    • The b element conveys strong importance, while strong only applies bold styling.
    • The em element marks stress emphasis that can change a sentence's meaning, while i sets text apart by convention — a species name or a foreign phrase — without adding emphasis.
    • The i and em elements are interchangeable, because both render as italics by default.
    • The strong and em elements were deprecated in HTML5 in favor of b and i combined with CSS.
    Show answer & explanation

    Correct answer: The em element marks stress emphasis that can change a sentence's meaning, while i sets text apart by convention — a species name or a foreign phrase — without adding emphasis.. The em element represents stress emphasis, which genuinely shifts meaning — stressing "love" in "I love carrots" says something different from stressing "carrots" — while i flags text that is set off from the surrounding prose by convention without implying emphasis. Identical default rendering is exactly why the interchangeable option is tempting, but shared styling is not shared semantics; and none of these four elements is deprecated — it is b and i, not strong and em, that carry no importance or emphasis meaning.

  4. You need an ordered list whose markers read iv, v, vi. Which set of attributes on the ol element produces that?

    • type="i" start="iv"
    • type="i" start="4"
    • type="4" start="i"
    • type="i" value="4"
    Show answer & explanation

    Correct answer: type="i" start="4". The type attribute chooses the marker style (1, a, A, i, or I) and start sets the first ordinal — and start is always an Arabic numeral, even when the markers themselves are letters or Roman numerals, so start="4" renders as iv. Writing start="iv" looks consistent but is not a valid integer, type="4" is not one of the five marker keywords, and value belongs to li rather than ol: on a list item it sets that item's ordinal, and the items after it keep counting up from there.

  5. A glossary entry needs three alternative names — "Cascading Style Sheets," "CSS," and "style sheet" — that all share a single definition. Which description list structure is correct?

    • Three dt elements in a row, followed by one dd.
    • Three dt elements, each wrapped in its own li inside the dl.
    • One dt, followed by three dd elements, one per name.
    • Three dt elements nested inside a single dd.
    Show answer & explanation

    Correct answer: Three dt elements in a row, followed by one dd.. A description list group can pair several dt terms with one dd, which is exactly the synonyms-share-a-definition case. The mirror image — one dt followed by several dd elements — is also valid markup, but it means one term with several separate descriptions, so it states the wrong relationship here. An li is never a child of dl; it belongs only to ul, ol, or menu. And dt cannot be nested inside dd; if you want a wrapper around each term-and-description pair for styling or microdata, the standard permits a div.

  6. Your page contains a heading written as an h2 element with id="Refund-Policy". Which link, placed elsewhere on that same page, jumps the reader to that heading?

    • An a element with href="Refund-Policy"
    • An a element with href="#Refund-Policy"
    • An a element with target="#Refund-Policy"
    • An a element with href="#" and id="Refund-Policy"
    Show answer & explanation

    Correct answer: An a element with href="#Refund-Policy". A fragment is the part of a URL after the # sign, and the browser navigates to the element whose id matches it, so #Refund-Policy finds id="Refund-Policy". Drop the # and href="Refund-Policy" is an ordinary relative URL, so the browser requests a resource by that name in the current directory and the link fails instead of scrolling. The target attribute names a browsing context (_self, _blank, _parent, _top), never a spot in the document, and an a element with no href is not a link at all. The last option scrolls to the top of the page and duplicates an id that has to be unique.

A worked example

Here is a small page that uses every piece correctly. Read the structure before the details.

<h1>Trail Guide: Cascade Loop</h1>

<nav>
  <ul>
    <li><a href="#gear">What to bring</a></li>
    <li><a href="#route">Route</a></li>
  </ul>
</nav>

<h2 id="gear">What to bring</h2>
<dl>
  <dt>Shell</dt>
  <dt>Hardshell jacket</dt>
  <dd>Waterproof outer layer. <strong>Required</strong> above the tree line.</dd>
</dl>

<h2 id="route">Route</h2>
<h3>Day one</h3>
<ol>
  <li>Park at the ranger station.</li>
  <li>Follow the blue blazes north.
    <ul>
      <li>Water at mile 3</li>
    </ul>
  </li>
</ol>

The headings run h1, h2, h2, h3 with no gaps. The nav is an unordered list because the two links have no required order, while the day-one directions are an ordered list because reversing them sends you the wrong way. Two <dt> elements share one <dd> because "Shell" and "Hardshell jacket" name the same item. The nested list sits inside the second <li>, and each fragment link matches an id exactly.

Choosing the list type

ElementUse it whenAllowed children
<ul>Shuffling the items would not change the meaning<li> only
<ol>Order is part of the meaning: steps, rankings, clauses<li> only
<dl>Content is name-and-value groups: glossary, spec sheet, metadata<dt> and <dd> groups, optionally each wrapped in a <div>

Mistakes people actually make

  • Putting non-list content directly inside a list. A stray <p> or a nested <ul> placed between two <li> elements is invalid. Anything that belongs to an item goes inside that item's <li>.
  • Writing start="iv". The start attribute and the <li> value attribute are always plain integers, no matter what type is set to.
  • Using <dl> for indentation or dialogue. If the content is not a set of name-and-value groups, it is not a description list — the HTML standard rules out dialogue explicitly, and indentation is a job for the CSS margin property.
  • Confusing noopener with noreferrer. Both block window.opener; only noreferrer also suppresses the referrer header.
  • Choosing headings by size. Decide rank from the outline first, then style.

Reasoning through the tricky cases

When <ol reversed> is used, numbering counts down and starts at the item count unless start overrides it. When an <li> carries value="7", that item is numbered 7 and the ones after it continue from there — 8, 9, and so on; the same attribute has no meaning inside a <ul>. Prefer the CSS list-style-type property over the type attribute unless the marker itself is referenced in the text, as in a numbered clause, and note that type on an individual <li> is deprecated outright. If you are unsure whether a list is ordered, shuffle it mentally: if the meaning survives, use <ul>.

Check anything uncertain against the primary source — MDN on heading elements and MDN on the anchor element — then run more D276 practice questions.

Want someone to walk you through this?

Book 1-on-1 prep for WGU D276 — original coaching, never exam content.

Stuck on this topic? WhatsApp us on +1 646 980 4914.

Working through the whole course? Read the full WGU D276 study guide, or see every WGU D276 practice topic.

More WGU D276 practice

Html Document Structure

The five lines at the top of every HTML file are not decoration. Here is what the doctype, the html/head/body split, meta charset, and the viewport tag each do — why the browser misbehaves when you leave one out, and how to reason about the cases that trip people up.

Semantic Structure Tags

Semantic structure tags describe what a block of content is, not how it looks. This lesson explains the difference between article, section, aside, main, nav, header and footer — including the syndication test that settles article vs. section, the strict placement rules for main, and how header and footer change meaning depending on where they sit — then gives you practice questions with worked explanations.

Images And Alt Text

An image starts with one element and one honest description. From there, srcset, sizes, and picture answer a single question: which file should the browser download on this screen? This guide walks through alt text, figure and figcaption, resolution switching, and art direction, then gives you six practice questions with full explanations.

Html5 Audio And Video

The audio and video elements embed media without a plugin. Learn how the browser chooses among source children, which MIME types to use for MP4, WebM, and MP3, what controls and preload actually do, and why fallback content between the tags is not an error message. Includes practice questions with full explanations.

Html Tables

A plain-English walkthrough of HTML table markup for WGU D276: how table, caption, thead, tbody, tr, th and td nest, what the scope attribute actually does for assistive technology, and how colspan and rowspan reshape the grid — plus practice questions with worked explanations.

Forms And Input Types

A form's action says where the data goes and its method says how it travels there. Work through the pieces that carry the data — name attributes, input types, labels tied to ids, select options, textarea content and the button that submits it all — then test yourself on the details that trip people up.