<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.
Dynamic scripts and data blocks are included with the <script> element.
If scripting is disabled when loading the page, content inside <noscript> is used instead.
<template>:
Below this paragraph, there's a <template> element containing a HTML declaration, that can be used by scripts.
Hi! I'm a paragraph inside the <template> element.
<canvas>:
A <script> is used to draw a rectangle in the <canvas> below.
Welcome to our page
The section title
The text paragraph.
Testing display of HTML elements
This page contains a bunch of HTML Elements and text. You can copy the source code and use it test out various CSS Properties. For testing purposes, you may use internal styles. Recall that these CSS rules are placed in between the head tags using the following format:
<style type="text/css">
selector {
property: value
}
</style>
This is 1st level heading
This is a test paragraph.
This is 2nd level heading
This is a test paragraph.
This is 3rd level heading
This is a test paragraph.
This is 4th level heading
This is a test paragraph.
This is 5th level heading
This is a test paragraph.
This is 6th level heading
This is a test paragraph.
Basic block level elements
This is a normal paragraph (p element). To add some length to it, let us mention that this page was primarily written for testing the effect of user style sheets. You can use it for various other purposes as well, like just checking how your browser displays various HTML elements.
This is another paragraph. I think it needs to be added that the set of elements tested is not exhaustive in any sense. I have selected those elements for which it can make sense to write user style sheet rules, in my opinion.
This is a div element. Authors may use such elements instead of paragraph markup for various reasons. (End of div.)
This is a block quotation containing a single paragraph. Well, not quite, since this is not really quoted text, but I hope you understand the point. After all, this page does not use HTML markup very normally anyway.
The following contains links to the Comm-244 home page
This is a paragraph before an unordered list (ul). Note that the spacing between a paragraph and a list before or after that is hard to tune in a user style sheet. You can't guess which paragraphs are logically related to a list, e.g. as a "list header".
One.
Two.
Three. Well, probably this list item should be longer. Note that for short items lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items.
Four. This is the last item in this list Let us terminate the list now without making any more fuss about it.
This is a paragraph before a ordered list (ol). Note that the spacing between a paragraph and a list before or after that is hard to tune in a user style sheet. You can't guess which paragraphs are logically related to a list, e.g. as a "list header".
A cute baby
One.
Two.
Three. Well, probably this list item should be longer. Note that if items are short, lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items.
Four. This is the last item in this list. Let us terminate the list now without making any more fuss about it.
This is a paragraph before a definition list (dl). In principle, such a list should consist of terms and associated definitions. But many authors use dl elements for fancy "layout" things. Usually the effect is not too bad, if you design user style sheet rules for dl which are suitable for real definition lists.
recursion
see recursion
recursion, indirect
see indirect recursion
indirect recursion
see recursion, indirect
term
a word or other expression taken into specific use in a well-defined meaning, which is often defined rather rigorously, even formally, and may differ quite a lot from an everyday meaning
This is a test page filled with common HTML elements to be used to provide visual feedback whilst building CSS systems and frameworks.
Text
Headings
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Paragraphs
A paragraph (from the Greek paragraphos, “to write beside” or “written beside”) is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.
Blockquotes
A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text.
It is typically distinguished visually using indentation and a different typeface or smaller size quotation. It may or may not include a citation, usually placed at the bottom.
A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text.
It is typically distinguished visually using indentation and a different typeface or smaller size quotation. It may or may not include a citation, usually placed at the bottom.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum, odio! Odio natus ullam ad quaerat, eaque necessitatibus, aliquid distinctio similique voluptatibus dicta consequuntur animi. Quaerat facilis quidem unde eos! Ipsa.
Address
Written by Jon Doe.
Visit us at:
Example.com
Box 564, Disneyland
USA
Horizontal rules
Tabular data
Table Caption
Table Heading 1
Table Heading 2
Table Heading 3
Table Heading 4
Table Heading 5
Table Footer 1
Table Footer 2
Table Footer 3
Table Footer 4
Table Footer 5
Table Cell 1
Table Cell 2
Table Cell 3
Table Cell 4
Table Cell 5
Table Cell 1
Table Cell 2
Table Cell 3
Table Cell 4
Table Cell 5
Table Cell 1
Table Cell 2
Table Cell 3
Table Cell 4
Table Cell 5
Table Cell 1
Table Cell 2
Table Cell 3
Table Cell 4
Table Cell 5
Code
Keyboard input:Cmd
Inline code:<div>code</div>
Sample output:This is sample output from a computer program.
Pre-formatted text
P R E F O R M A T T E D T E X T
! " # $ % & ' ( ) * + , - . /
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
@ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \ ] ^ _
` a b c d e f g h i j k l m n o
p q r s t u v w x y z { | } ~