A
A
Arthur2018-03-22 22:00:04
css
Arthur, 2018-03-22 22:00:04

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:
011dfadc5e45.png
Which looks like this:
c5d4ee5c7734.jpg
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

3 answer(s)
V
Vadim Kot, 2018-03-22
@vadimkot

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>

F
Froggyweb, 2018-03-22
@Froggyweb

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

M
mr_alex, 2018-03-22
@mr_alex

You can write sections
And here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question