In this article we will show you the solution of how to divide page in HTML, with the <div> tag and CSS, we can divide an entire webpage into sections in HTML.
A div tag divides a page into horizontal sections by default. However, you can create the webpage's vertical divisions using the float feature of CSS.
The most crucial tag in HTML is the <div> tag, which is used in the majority of publications.
Other HTML tags are thought of as fitting inside the div tag. This makes it possible to apply several HTML tags to a specific area of the document.
An HTML page can be divided into many sections using the <div> tag.
A tag in HTML serves as a part of the information on the HTML page. You must include the necessary HTML tags within the tag in order to break a page into sections.
In order to build sections and apply styles, it is utilized to organize different HTML tags.
Given that the div element is a block-level tag, it contains the complete width.
Hence, rather than starting on the same line, each div element will start on a different line.
Step By Step Guide On How To Divide Page In HTML :-
<html> <head> <title>TC</title> <style type=text/css> p{ background-color:gray; margin: 10px; } div { color: white; background-color: 009900; margin: 2px; font-size: 25px; } </style> </head> <body> <div > div tag </div> <div > div tag </div> <div > div tag </div> <div > div tag </div> </body> </html>
- The browser is informed of the HTML version we are using in our first line, which is <HTML>. Tags are the foundation of HTML documents.
- Next comes the body tag, which defines the body of the webpage. You can create this same content for your site in one specific location.
- The style property is used for the color in the following step.
- After that we close style and head.
- Then we open the body then we create a divide page using the div object.
- Finally, after closing all tags, </body></html> but also code should be executed.
Conclusion :-
As a result, we have successfully learned how to divide page in HTML. The div tag is another name for the division tag.
The div tag in HTML is used to segment the information into several sections.
Both an open() and a closing() tag are present in a division tag, and closing the tag is required.
Since it enables us to segment the information on a web page and designate particular portions for various sorts of information or purposes, it Div element has proven most helpful in web development.
I hope this article on how to divide page in HTML helps you and the steps and method mentioned above are easy to follow and implement.