Answer the question
In order to leave comments, you need to log in
Is the p tag inside h2 good or bad?
Greetings.
1) If there is a p, div, li or any other tag in the h2 tag, is this bad for the PS? Or doesn't matter?
2) There is a code fragment:
Which looks like this:
But I would like the font size to be conditionally larger. Is it possible in CSS to set conditions for the p tag, which is located specifically in h2. If yes, how?
Thanks in advance for your reply.
Answer the question
In order to leave comments, you need to log in
The specification for this even has a special section Subheadings, subtitles, alternative titles and taglines https://www.w3.org/TR/html50/common-idioms.html#co...
There is one of the options:
<header>
<h2>3D films set for popularity slide </h2>
<p>First drop in 3D box office projected for this year</p>
</header>
Discover the classes
the p tag is definitely bad - it has the semantics of the li paragraph - not valid at all, it's a list element..
here's an example https://codepen.io/anon/pen/eMRzyp
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question