Reset all properties with CSS


Use the all property to reset all the properties. Set all property to initial, inherit or unset.

Example

You can try to run the following code to implement the CSS all property

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         html {
            color: blue;
         }
         #demo {
            background-color: yellow;
            color: red;
            all: inherit;
         }
      </style>
   </head>
   <body>
      <h2>CSS all property</h2>
      <div id = "demo">This is demo text.</div>
   </body>
</html>

Updated on: 06-Jul-2020

516 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements