tell me why the margin-top and padding-top for the "a" tag don't work?

div{ background-color:green; height:200px; } a { background-color:red; padding-top:100px; margin-top:100px; } 
 <div> <a href="#"> 123213 </a> </div> 

  • 3
    probably because it is a line element , if you redefine display on inline-block , then everything works - Bald

0