HTML Navigation Menu using Lists
The Navigation Menu are used a lot Nowadays, on many websites, to provide a proper navigation to respective pages on the Website.
We will learn here, how to create such navigation menu using HTML Lists.
HTML lists can be styled in many different ways with CSS.
One popular way is to style a list horizontally, to create a navigation menu:
Navigation Menu - HTML Code
Above is the HTML Code for creating a list. We will customize its design with CSS, to make it work like a navigation menu.
The List items are the links, that points to the respective page on the website. You can learn more about links (<a>) in our links tutorial.
We can also add more menu items in lists, according to our needs.
Navigation Menu - CSS Styles
Above is the CSS Styles for Lists. We had enclosed it in the <style> tag. All the CSS Styling for a webpage always lies within <style> tag.
Always put the CSS above the HTML Code, so that the CSS styles will load first, then, HTML. This will provide a smooth experience to the user.
Navigation Menu
Above is the Navigation menu using HTML Lists, styled with CSS. We can customize it's style according to our needs.
Navigation Menu - Customizing Styles
background-color
color
background-color of link hover
Navigation menu created.
Comments
Post a Comment