Posts

Showing posts from September, 2020

CSS inherit Keyword

  The inherit keyword specifies that a property should inherit its value from its parent element. The inherit keyword can be used for any CSS property, and on any HTML element. <style> span {   color: blue;   border: 1px solid black; } .extra span {   color: inherit; } </style> </head> <body> <div>   Here is <span>a span element</span> which is blue, as span elements are set to be. </div> <div class="extra" style="color:green">   Here is <span>a span element</span> which is green, because it inherits from its parent. </div> <div style="color:red">   Here is <span>a span element</span> which is blue, as span elements are set to be. </div> </body> Here is  a span element  which is blue, as span elements are set to be. Here is  a span element  which is green, because it inherits from its parent. Here is  a span element  which...

insert text using css in HTML Dom

 <!DOCTYPE html> <html> <head> <style> p{     visibility: hidden; } p::before {    visibility: visible;   content: " - Remember this you are the great man"; } </style> </head> <body> <p>My name is Donald</p> <p>I live in Ducksburg</p> </body> </html>