You have been tasked to design the Navigation Bar for the new AIT Website. The requirement is to design a Navigation bar that sits at the top of the page and stretches the entire width of the screen from left to right. Produce the HTML5 Code to achieve the design of the navigation bar. Explain why using a div element will be appropriate for the task.
Explain why using a div element will be appropriate for the task.
The div tag is known as Division tag. The div tag is used in HTML to make divisions of content in the web page like (text, images, header, footer, navigation bar, etc). Div tag has both open(<div>) and closing (</div>) tag and it is mandatory to close the tag. The Div is the most usable tag in web development because it helps us to separate out data in the web page and we can create a particular section for particular data or function in the web pages.
Div tag is Block level tag
It is a generic container tag
It is used to the group of various tags of HTML so that sections can be created and style can be applied to them.
As we know Div tag is block-level tag in this example div tag contain entire width. It will be displayed div tag each time on a new line, not on the same line.
Get Answers For Free
Most questions answered within 1 hours.