I believe that the accepted answer is not entirely correct. According to the HTML5 working draft , the <aside>
element can be used to indicate side notes in certain, but not all cases:
<aside>
is appropriate if the side note “ can be viewed separately from the content ”, for example, Switzerland reference material in a much longer news story or draft quote in a longer article (examples from W3C)<aside>
not suitable if the side of the note is “ in brackets ”. W3C does not give any examples of what this means. A narrow interpretation will be everything that is placed in parentheses, between commas or between dashes.
If you want to strictly interpret the W3C specification, not all alerts in the Django tutorial may be marked with <aside>
. For example, a note under the heading "Doesn't match what you see?" really can’t be considered separate from the content, because it does not make sense without the content next to it. Perhaps, "Where should this code live?" also is not <aside>
, since it mentions "this code", which associates it with the content.
In my opinion, the definition of W3C is unnecessarily confusing and restrictive. The definition of the dictionary in the dictionary is “a temporary departure from the main topic or topic,” and the specification should simply adhere to this, and not introduce subtle differences. Of course, there is no reason why you cannot use <aside>
for all sidenotes if this makes your code simpler. Think of it as civil disobedience. :)
Relevant quote:
A pending element is a section of a page that consists of content regarding content around the element and which can be considered separate from that content. Such sections are often presented as side panels in a print shop.
An element can be used for typographic effects, such as pulling quotes or sidebars, for advertising, for groups of navigation elements, and for other content that is considered separate from the main content of the page.
Note. It is not recommended to use an auxiliary element only for parentheses, since they are part of the main document flow.
source share