Home
CSS
CSS !important
Tryit: Force all buttons to have the same look with !important
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> .button { background-color: #8c8c8c !important; color: white !important; padding: 5px !important; border: 1px solid black !important; } #myDiv a { color: red; background-color: yellow; } </style> </head> <body> <p>Standard button: <a class="button" href="default.asp">CSS Tutorial</a></p> <div id="myDiv"> <p>A link text inside myDiv: <a href="/html/">HTML Tutorial</a></p> <p>A link button inside myDiv: <a href="/html/" class="button">HTML Tutorial</a></p> </div> </body> </html>