HTML CSS examples for HTML Tag:h1-h6
Align all h3's on the same line and change color on hover
<html> <head> <style> #Navbar {<!--from w ww . j a v a 2 s .co m--> color:Chartreuse; text-align:center; vertical-align:middle; } #Navbar h3 { display:inline-block; background:yellow; padding:6px; margin:6px; } #Navbar h3:hover { display:inline-block; background:blue; cursor:pointer; } #Navbar h3.Active { background:pink; text-decoration:underline; } </style> </head> <body> <div id="Navbar"> <h3 id="Tab-1" class="Active">Home</h3> <h3 id="Tab-2" class="Inactive">Keys</h3> <h3 id="Tab-3" class="Inactive">About</h3> </div> </body> </html>