<!DOCTYPE html> <html> <head> <style> ul{ list-style-type:none; /*no list item markers*/ } ul li { display:inline-block; /*blocks in an a line*/ float:left; /*to align on the left side*/ } ul li a{ text-decoration:none; /*underline property is overridden*/ padding:7px; /*the space between words and border*/ background-color:rgba(255,0,0,0.5); /*background color of nav bar*/ color:rgb(255,255,255); /*color of text*/ border-right:1px solid black; /*border of links*/ } </style> </head> <body> <nav> <ul> <li><a href="#"> Home </a></li> <li><a href="#"> News </a></li> <li><a href="#"> Channels </a></li> </ul> </nav> </body> </html>
Run
×
Share