<h2> Heading levels should reflect structure, not style
It can also be useful to test how body text below a heading appears on the page, for example to check the margin. This text is wrapped in <p> and is a direct sibling to the above <h2>.
<h3> If you need a visually smaller title, use CSS
To create a semantically correct HTML structure that's accessible for everyone, make sure you're nesting the headings correctly. Never use more than one <h1> per page, and don't skip heading levels.
<h4> Headings below level 4 are not used as much
<h5> But that doesn't mean you should forget about them
<h6> And last, but not least, the heading with the lowest rank
Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields. [1]
<address>:
Name: Alexander Sandberg
Street adress: 1 Rover street
State: N/A
Planet: Mars
Digital home: alexandersandberg.com
<hr>:
<pre>:
Preformatted text
will be presented
exactly as written
in the HTML file.
<blockquote>:
The text inside this blockquote is wrapped in <p> tags. Sometimes the quote is really long, and possibly have to occupy multiple lines, but that shouldn't be a problem.
<ol> + <ul> + <li>:
List item 1
List item 2
List item 1
List item 3
List item 1
List item 2
List item 1
List item 1
List item 2
List item 2
List item 3
List item 4
List item 1
List item 1
List item 1
List item 2
List item 2
List item 3
List item 1
List item 2
<dl> + <dt> + <dd>:
This is a term
And this is the accompanying description, explaining the above term.
You can also have multiple descriptions (<dt>), like this one, for each term (<dt>).
And why not nest lists inside this description?
Another term
With some description.
List item 1
List item 1
List item 2
<figure> + <figcaption>:
Used with an <img>:
Used with a <blockquote>:
<main>:
See the main content of this page for a use case of <main>.
<div>:
This paragraph of text is contained inside a <div>. The element really has no special meaning, other than grouping content together, and should be used as a last resort when no other element is suitable.
The <em> element represents stress emphasis of its contents. Meanwhile, <i> is since HTML5 used for text in an alternative voice or mood, or otherwise offset from the normal prose, as you may define it.
If you want to draw attention to some text, feel free to use <b>. However, if you want to mark the importance of something, you should use <strong>.
<small> + <u> + <mark> + <s>:
When you want your text to represent small print, use <small>.
In most cases, there's a better element than <u> to use, but it can be useful for labelling msispelt text. Avoid using it, however, where the text could be confused for a hyperlink.
You can highlight text for reference purposes with <mark>, or if the contents is no longer accurate or relevant, wrap it with <s>.
<abbr> + <dfn>:
By wrapping an abbreviation like CSS in both <dfn> and <abbr>, we define the term. This can later be used only using <abbr>, since we already defined CSS once before.
<q> + <cite> + <data> + <time>:
When citing creative work, include the reference with a <cite> element. www.w3.org explains that A citation is not a quote (for which the <q> element is appropriate) instead, like used here.
If you want to link content with a machine-readable translation, use <data> with a value attribute. However, if this data is a time- or date-related, like the date , you have to use <time> together with the datatime attribute.
<code> + <var> + <samp> + <kbd> + <sub> + <sup>:
When sharing code-snippets, make sure to use the <code> element. This can be done both display: inline;, as well as block-level:
A <span> can be used to mark up inline text for various uses, here to make the text bolder.
If you have really long text you might want to insert a blank line with the <br> element. You can also insert word breaking opportunities using <wbr>, to help the browser break long words like Pneumonoultramicroscopicsilicovolcanoconiosis.
Edits
Elements: <ins>, <del>
<ins> + <del>:
If you make a really huge mistake, you can always go back and fix it later. And don't forget to learn from your mistake.
Both <ins> and <del> can be block-level, like this.