demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

CSSslidy: an auto-generated #RWD image slider. 1.5K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

More HTML Text Elements

html / elements

Estimated reading time: 52 seconds

There are other tags that can be used to format text, a limited sample of which are given below. Note again that these describe what the content between the opening closing tags is; what it looks like is immaterial, in this context.

<code>
specifies that a line of text represents code.
<dfn>
specifies that a word is defined inline (to be useful, the opening dfn tag requires a title attribute with its value set to the definition of the term)
<abbr>
specifies that the word is an abbreviation; same requirements as dfn above
<del>
defines deleted text
<q>
defines a short quotation
<sup>
defines superscript text, such as for a footnote
<sub>
defines subscript text

Finally, note that all of these tags must be nested inside another that provides a context for the block of text as a whole: typically <p>, although there are many other possibilities.

Feel free to experiment with the above, but try to use them in the context of real-world examples – i.e. find a short quotation from a book and use the <q> tag around it, rather than using elements to “see what they look like”.

comments powered by Disqus

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.