Definition and usage of type selector (E):
Use the element name in the document as the selector. For example div, table, p, span, li, ul and so on.
Grammar structure:
E{ Rules }
Example code:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://ask.php.cn/" /> <title>CSS教程</title> <style type="text/css"> li{color:blue;} </style> </head> <body> <div> <ul> <li>php中文网</li> <li>php中文网</li> </ul> <p>php中文网</p> </div> </body> </html>
The above code can set the text color in the li element to blue.