Css:-The element selector

The element selector selects all elements with the specified element name.

Use CSS Selector Tester to demonstrate the different selectors.

Code:- <!DOCTYPE html> 
<html> 
<head> 
 <meta name="viewport" content="width=device-width, initial-scale=1"> 
 <style> 
  /*When you want to select using html tag, you can directly put that tag name*/ 
   
  div { 
   background-color: red; 
  } 
 </style> 
</head> 
<body> 
 <div> 
  Test Div 
 </div> 
</body> 
</html>
Css:-The element selector Css:-The element selector Reviewed by Network security on May 23, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.