Q. Which of the following CSS selectors selects an element that does not have sub-elements?

  • (A) :empty
  • (B) :nochild
  • (C) :inheritance
  • (D) :no-child
πŸ’¬ Discuss
βœ… Correct Answer: (A) :empty
Explanation: The “:empty” selector is used to select elements that contain no children (including text).
:empty {
// CSS property
}
Explanation by: Tina Singh
The “:empty” selector is used to select elements that contain no children (including text).
:empty {
// CSS property
}

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
213
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Tina Singh
Publisher
πŸ“ˆ
81%
Success Rate