The way I normally would do this in HTML(5) would be like this:
/* CSS For this example */
footer p {
font-size: 16px;
font-weight: normal;
}
footer strong {
font-weight: bolder;
}
<!-- HTML for this example -->
<footer>
<p>Title <strong>- Name. 1234 N. Main St., Anytown, USA</strong></p>
</footer>
My problem with doing it this way, is that it seems that 90% of the text in the paragraph is given greater importance, which seems counter intuitive to me. It would seem to me to be more semantic to only wrap the text that is abnormal in the paragraph, which in this case is the lighter weight text and leave footer p {font-weight:bold}
.
Is <small>
the appropriate element here even though its not really for a legal disclaimer, etc.
In HTML, for example, the <h1> element is a semantic element, which gives the text it wraps around the role (or meaning) of "a top level heading on your page."
The <em> tag is used to define emphasized text. The content inside is typically displayed in italic.
p Element. The <p> tag stands for paragraph, which is the most common tag used to create lines of text inside an HTML document.
<strong> and <em> are semantic - they specify that the enclosed text should be "strong" or "emphasised" in some way, usually bold and italic, but allow for the actual styling to be controlled via CSS. Hence these are preferred in modern web pages.
Yes, in your case <small>
is appropriate element, although it does not "de-emphasize" text.
Lines from the current html specifications:
Note: Small print typically features disclaimers, caveats, legal restrictions, or copyrights. Small print is also sometimes used for attribution, or for satisfying licensing requirements.
Note: The small element does not "de-emphasize" or lower the importance of text emphasized by the em element or marked as important with the strong element. To mark text as not emphasized or important, simply do not mark it up with the em or strong elements respectively.
http://www.w3.org/TR/html5/text-level-semantics.html#the-small-element
The normal font color is black (#000). Adjusting the color, to a lighter version, will de-emphasize the text fragment.
Strong is a tag to emphasize text, so I'd suggest using <small>
instead.
footer small {
color: #999;
}
Result: http://jsfiddle.net/rzHgW/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With