Como manejar div y display

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 :wave:

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 :smile:

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:


<h1 class="focus">This is a title</h1>

  <h2 class="focus">Subtitle</h2>
  <p>Some text</p>

<div class="focus">
  Some more text


/* 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,