Yesterday I was building a template for a newspage.
I wanted a <h2>
that contains the date of the news item. Since I wanted the date to be less important than the rest of the text in the <h2>
I went looking for an HTML开发者_运维问答 tag that can semantically diminish content. But this doesn't exist.
So why isn't there something like a <dim>
(diminish tag) tag that is more or less a negative of the <em>
tag?
I've seen people using the small
tag for this kind of semantics.
What I've used before was time
with a pubdate
attribute. That should satisfy the semantics even more.
markup:
<span class="dim">content</span>
css:
.dim{font-size:0.9em}
That combination should allow the font-size to get gradually smaller as the tags are nested deeper. From the browser's point of view it's semantically meaningless but it's an OK first step.
if it is less important than h2
it should be wrapped in h3
or lower. use css
to style it.
but not nested....
精彩评论