• Register

I am unable to mention options in the question itself.So posting here the question again with options.

Which of the following selector matches the name of any element type?
Choose the correct options from below list
1.The Type Selector
2.The Universal Selector
3.The Descendant Selector
4.The Class Selector

Answer with explaination

The Universal selector is the one which matches the name of any element type.It is literally the ‘*’  or asterick character .It matches any single element in the document tree.It is used in CSS files.

Syntax

* Selects all elements */
* {
  color: green;
}

Code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .style{
            color: red;/*give red to all elements*/
        }
        
    </style>
</head>
<body>
    <h1 class="style" >Importance1</h1>
    <h1 class="style" >Importance2</h1>
</body>
</html>

 

 
100 points
5