Don’t become a PEBKAC.
<acronym>
has been deprecated; use <abbr>
instead. See below for an example. cite
attribute that is intended to hold a URL. It is an attribute for <q>, <blockquote>, <del>, <ins>. For example, 9 out of 10 dentists recommend beer.Browsers do not apply any special formatting, but it is interesting that they do surround <q> text with typographer’s quotes.
monospaced
font is used.<figure>
tag; typically for photographs, charts, and graphs..nobr { white-space:nowrap; }
The <progress> element may seem very similar to the <meter> element — which was also introduced in HTML5 — but it can be seen as a more specific kind of <meter> element that's only used to measure progress of a task. It's worth bearing this in mind when deciding which one to use.
Great article on using and styling the Progress Bar.
These HTML5 tags are used to show/hide extra information.
Really? It’s that easy to make collapsible panels? Well, it is for Webkit browsers. Firefox displays all the content; same with IE. There are several polyfills available, including this one: https://github.com/chemerisuk/better-details-polyfill
The source code for this looks like:
<details> <summary>Show More...</summary> <p>Really? It’s that easy to make collapsible panels?</p> <p>The source code for this looks like:</p> </details>
The required markup for a definition list begins with an opening <dl>
tag. Under that will be pairs of <dt>
(terms) and <dd>
(definitions) tags. For example:
<dl>
<dt>Apple</dt>
<dd>Tasty fruit, or nice computer.</dd>
<dt>Banana</dt>
<dd>Another tasty fruit, or dangerous slip hazard in cartoons.</dd>
</dl>
<dfn>
Related, but serving a different purpose is the <dfn>
tag. It is used to mark the location of where a term is being defined. For example:
After getting called over to Kay’s computer for the fifth time in the same day, the IT guy determined that her problem was a classic case of PEBKAC. He didn’t have the heart to tell her that PEBKAC stood for “problem exists between keyboard and chair.”
The markup for this example is:
<blockquote>After getting called over to Kay's computer for the fifth time in the same day, the IT guy determined that her problem was a classic case of <abbr title="Problem Exists Between Keyboard And Chair">PEBKAC</abbr>. He didn't have the heart to tell her that <dfn id="PEBKAC" title="PEBKAC"><abbr title="Problem Exists Between Keyboard And Chair">PEBKAC</abbr></dfn> stood for "problem exists between keyboard and chair".</blockquote>
A couple of things to notice:
<abbr>
tag gets styled differently from regular <p>
text depending on the browser.id
attribute in the <dfn>
tag, you can link to it. The first line in this document does this.<abbr>
tag. It is not necessary for the <dfn>
element, but now you know how to use it. After hovering your mouse over an <abbr>
term you’ll see the title displayed after a short delay (in most browsers).This is from developers.whatwg.org
Defining term: If the dfn
element has a title
attribute, then the exact value of that attribute is the term being defined. Otherwise, if it contains exactly one element child node and no child text nodes, and that child element is an abbr
element with a title
attribute, then the exact value of that attribute is the term being defined. Otherwise, it is the exact textContent of the dfn
element that gives the term being defined.
If the title
attribute of the dfn
element is present, then it must contain only the term being defined.
Continuing with our fruit list from above, it could more accurately be constructed as:
<dl id="fruitList">
<dt><dfn id="Apple">Apple</dfn></dt>
<dd>Tasty fruit, or nice computer.</dd>
<dt><dfn id="Banana">Banana</dfn></dt>
<dd>Another tasty fruit, or dangerous slip hazard in cartoons.</dd>
</dl>
I recommend this style of mark-up when you plan to link to these definitions. Otherwise, it may be overkill.