Selects all <div> elements and all <p> elements with CSS

To style, more than one element, use a comma. Separate each element with the comma to achieve this. You can try to run the following code to select

and

elements,

Example


   
      
   
   
      

Demo Website

     

Fruits

     

Fruits are good for health.

     
         

This is demo text.

     
   
Updated on: 2026-03-11T22:50:41+05:30

326 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements