Skip to content

Instantly share code, notes, and snippets.

@teffcode
Last active February 14, 2022 18:15
Show Gist options
  • Select an option

  • Save teffcode/0ffda0e4361da1956fbbbc82143e6396 to your computer and use it in GitHub Desktop.

Select an option

Save teffcode/0ffda0e4361da1956fbbbc82143e6396 to your computer and use it in GitHub Desktop.

馃憢馃徏 Welcome 馃憢馃徏

Quiz banner

Instagram | Twitter | LinkedIn


Choose your language 馃憛



English version 馃殌


Consider the following code:

HTML

Which pseudo-class would you use to see the following result in the browser ?

.

  A. div:nth-child(0) {...}
  B. :not(p) {...}
  C. div:first {...}

Click here to see the correct answer and explanation 馃憖
Correct Answer Explanation
B 馃帀 The :not() CSS pseudo-class represents elements that do not match a list of selectors. In this case, :not(p) {...} selects any element that is NOT a paragraph (div).

  • Answer based on 馃憠馃徏 :not()
  • Code 馃憠馃徏 Here


Spanish version 馃殌


Considera el siguiente c贸digo:

HTML

驴 Qu茅 pseudo clase de CSS usar铆as para ver el siguiente resultado en el navegador ?

.

  A. div:nth-child(0) {...}
  B. :not(p) {...}
  C. div:first {...}

Haz click aqu铆 para ver la respuesta correcta y su explicaci贸n 馃憖
Respuesta correcta Explicaci贸n
B 馃帀 La pseudo-clase :not() de CSS representa elementos que no coinciden con una lista de selectores. En este caso, :not(p) selecciona cualquier elemento que NO sea un p谩rrafo (div).

  • Respuesta basada en 馃憠馃徏 :not()
  • C贸digo completo 馃憠馃徏 Aqu铆


@cquiladiaz
Copy link

Creo que es la B, pero no estoy muy seguro , lo digo por descarte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment