New (To Me) HTML Elements
Chapter 10 of “InterACT With Web Standards”, introduced our WebMedia 1 class to HTML. Thanks to the recommended resources, I was able to find some HTML elements that were not already discussed in the chapter.
dev.opera.com has an excellent article on lesser-known semantic elements. Here are a few of those:
<address> : used for the author of the page, or the section that shows that information. Note – it is not used for the postal address of the company, like many may assume.
<address> <span>Mark Norman Francis</span>, <span>1-800-555-4865</span> </address>
<code> : used for indicating code or programming languages in short samples within a sentence. For larger samples, a pre formatted block should be used.
<p>It is bad form to use event handlers like <code>onclick</code> directly in the HTML.</p>
<var> : used to indicated variables from mathematical expression or programming code.
<p>The value of <var>x</var> in 3<var>x</var>+2=14 is 4.</p> <pre><code> my <var>$welcome</var> = "Hello world!"; </code></pre>
<cite> : used for citations, and well shown in this example:
<p>The saying <q>Everything should be made as simple as possible, but not simpler</q> is often attributed to <cite>Albert Einstein</cite>, but it is actually a paraphrasing of a quote which is much less easy to understand.</p>