Text in HTML
Headings, paragraphs, emphasis (strong, em), quotations, code, abbreviations, superscripts and entities: choosing the tag by what the text means, not by how it looks.
- 24 cards
- 4 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
A few cards from the deck
Heading hierarchy: what is it?
Show the answer
The order of levels
h1toh6that draws the outline of the page: anh1for the subject,h2for the parts,h3for their subparts.Screen readers list the headings to navigate. Levels are not skipped (no
h4directly under anh2) and the level is chosen by the outline, never by the size wanted: size is set in CSS.How many spaces does the browser display between "One" and "two"?
```html
<p>One two</p>`- Just one
- Ten, as in the code
- None: the two words are joined
- Two: one on each side
Show the answer
Just one
HTML collapses any run of spaces and line breaks into a single space. To keep several, you need
or apre; to simply move two elements apart, set a margin in CSS.The … tag forces a line break inside a paragraph, and the … tag marks a change of topic between two paragraphs.
Show the answer
The br tag forces a line break inside a paragraph, and the hr tag marks a change of topic between two paragraphs.
Neither has content or a closing tag.
brsuits an address or a poem; not spacing between paragraphs, which is a job for CSS.strong: what is it?
Show the answer
A tag that marks text as important, even urgent; browsers display it in bold by default.
Bold is only the default look.
strongcarries a meaning screen readers can convey;bonly makes text bold, with no added meaning.