necesito correjirme,la verdad no se como manejar el div en parrafos,subtitulos ,teniendo agregado una class:"focus"y al pasarlos a css no se cual son sus selectores, seria div.h1 …
Hola @alexis_guiza and welcome to the community
I put your post into a translator but I’m still not sure if I get your question. So please tell me if I’m wrong
It’s doesn’t matter on which element you put your “focus” class or how deeply nested it is. You can always select it with “.focus” in CSS. You can put an element in front of “.focus” to only select these elements that also have the class “focus”. See this examples:
HTML
<h1 class="focus">This is a title</h1>
<section>
<h2 class="focus">Subtitle</h2>
<p>Some text</p>
</section>
<div class="focus">
Some more text
</div>
CSS
/* This will select all three elements with class "focus" */
.focus {
color: lime;
}
/* This will only select the <div> with class "focus" */
div.focus {
color: aqua;
}
Have a nice day,
Michael