Selects specific elements like <p> with CSS

CSSWeb DevelopmentFront End Technology

To select elements, use the element selector. You can try to run the following code to select <p> elements:

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         p {
            color: blue;
            background-color: orange;
         }
      </style>
   </head>
   <body>
      <h1>Demo Website</h1>
      <h2>Learning</h2>
      <p>Tutorials on web dev, programming, database, networking, etc.</p>
      <p>Every tutorials has lessons with illustrations and figures.</p>
   </body>
</html>
raja
Published on 17-May-2018 08:12:31
Advertisements