9 تغريدة Apr 19, 2023
HTML divs and their role in layout 🚀
🧵👇
Don't forget to bookmarked it for future references...
★ In HTML, a div element ("division") is a container element that is used to group other elements together and apply styles to them.
★ It is a block-level element, which means that it creates a new rectangle in the layout of the page and takes up the full width available.
★ We can think of a div element as a box that can hold other HTML elements and provide a way to apply styles to those elements consistently.
★ For example, We might use a div to group a set of form elements together and apply the same background color to all of them.
★ Example :
• In this example, the div element has a light grey background color and some padding around its content.
• The p elements inside the div are styled consistently because they are contained within the div.
★ Div elements are often used in combination with CSS to create complex layouts for websites.
For example, We use multiple div elements with different widths and float them to the left or right, or use absolute positioning to place them in specific locations on the page.
★ div element is a generic container and does not have any semantic meaning in and of itself.
If you want to add meaning to the content of your HTML documents, you should use elements that have semantic meaning, such as header, footer, article, and so on.
End thread 🧵
If this thread helpful for you then :
1. Do Retweet the FIRST TWEET.
2. Follow me and turn on the notifications: @personalvipin
Thank you ❤️

جاري تحميل الاقتراحات...