<small>
Overview
The <small>
element signifies side comments and other forms of small print in a document. These can include disclaimers, legal restrictions, copyrights, or specific caveats. By default, browsers render content within this element in a smaller font size.
Examples and Usage
Let's consider a footer on a web page where there's a need to provide copyright information.
<footer>
<!-- Other parts of the footer structure -->
<p><small>© 2024 Web Reference. All rights reserved.</small></p>
</footer>
In the above snippet, the <small>
element neatly encapsulates the copyright information, offering a semantically appropriate way to display this kind of secondary content.
While the <small>
element is designed for short runs of text, it's not intended for extended content such as multiple paragraphs or entire sections.
Attribute Breakdown
The <small>
element doesn't have any specific attributes; it inherits global attributes common to all HTML elements.
Accessibility Aspects
The <small>
element does not inherently possess specific accessibility roles or properties. While it does modify the visual presentation, its semantic meaning might not be explicitly recognized by assistive technologies.
For providing clearer context to such de-emphasized content, you can use the aria-describedby
attribute, which can be paired with another element for more descriptive context. In terms of ARIA, the element defaults to a generic
role, and it's advisable not to use this role directly. The element can also accept other global aria-*
attributes.
Associated Elements
<b>
<i>
<strong>
<em>
<sub>
<sup>
Additional Notes
The
<small>
element should be used for its semantic significance and not just to reduce text size. If the primary intention is to change the appearance without the semantics, using CSS properties likefont-size
is a more appropriate choice.HTML has evolved, and newer versions have emphasized the separation of content and presentation. It's advisable to ensure the correct use of these elements based on their current definitions and not just for their stylistic effects.
Browser Compatibility
For a detailed breakdown of specific browser nuances and older version support refer to the first link in the Useful Resources below.
Browser | Chrome | Edge | Safari | Firefox | Opera | Internet Explorer |
---|---|---|---|---|---|---|
Support | Yes | Yes* | Yes | Yes | Yes | Yes* |