HTML CSS examples for CSS Selector:element
The element selector selects elements with the specified element name.
Select and style all <p> elements:
<!DOCTYPE html> <html> <head> <style> p {<!--from w ww . ja v a 2 s . c om--> background-color: yellow; } </style> </head> <body> <h1>Welcome to My Homepage</h1> <div> <p id="myId">this is a test.</p> <p id="myElement">this is a paragraph.</p> </div> <p>I <b>like</b> css.</p> </body> </html>