Selects the element with id="tutorials" with CSS


To select all the elements with id=”tutorials”, you can try to run the following code.

Use the #id CSS selector to achieve this,

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         #tutorials {
            border: 3px solid red;
         }
      </style>
   </head>
   <body>
      <h1>Tutorialspoint</h1>
      <h2>Learning</h2>
      <p id = "tutorials">Tutorials on web dev, programming, database, networking, etc.</p>
      <p>Every tutorials has lessons with illustrations and figures.</p>
   </body>
</html>

Updated on: 24-Jun-2020

64 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements