0

What is the meaning of <div> tag in html

4th May 2023, 6:27 AM
ayman mohammad
ayman mohammad - avatar
27 Respuestas
+ 6
<div> tag is a container. Think it as a box where you can introduce elements. Syntax: <div> <!--Elements to introduce on the div--> </div> Example: <div> <p>This text is in a div</p> </div> You can style later the containers with css. RECOMMENDATION: finish html sololearn’s course.
4th May 2023, 6:33 AM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
4th May 2023, 6:31 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 3
div tag makes more sense once you also learn CSS and JS. In pure html, it doesn't do a whole lot.
4th May 2023, 7:04 AM
Orin Cook
Orin Cook - avatar
+ 3
ayman mohammad it is essential in web developing
4th May 2023, 9:47 AM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 2
Ok
4th May 2023, 6:41 AM
ayman mohammad
ayman mohammad - avatar
+ 2
I only learnt html not about JS and CSS
4th May 2023, 7:13 AM
ayman mohammad
ayman mohammad - avatar
+ 2
Web developement fundamentals includes css html and js… with just html you can’t do almost nothing
4th May 2023, 7:14 AM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 2
Ok thanks
4th May 2023, 9:14 AM
ayman mohammad
ayman mohammad - avatar
+ 1
Oh
4th May 2023, 7:13 AM
ayman mohammad
ayman mohammad - avatar
+ 1
Well Is div tag that much important
4th May 2023, 9:15 AM
ayman mohammad
ayman mohammad - avatar
0
Also I am in standards and best practices lesson I found some people using it so I asked this question
4th May 2023, 7:14 AM
ayman mohammad
ayman mohammad - avatar
0
Div tag is a container. It is used to store different values, such as <img>, <p> or even <div>. It is useless if you just run it on HTML, as t actually works in style sheets. A div tag can be used in a style sheet to style multiple elements once, by giving the div tag a class and styling it through the class name, in the style sheet. Here is an example: HTML: <div class = "test"> <h1>This is a simple heading</h1> <p>This is a simple paragraph</p> </div> CSS: .test { font-color: blue; } The above script will turn the paragraph and the heading bue.
4th May 2023, 9:56 AM
Danish Zubair
Danish Zubair - avatar
0
Div tag is a container. It is used to store different values, such as <img>, <p> or even <div>. It is useless if you just run it on HTML, as t actually works in style sheets. A div tag can be used in a style sheet to style multiple elements once, by giving the div tag a class and styling it through the class name, in the style sheet. Here is an example: HTML: <div class = "test"> <h1>This is a simple heading</h1> <p>This is a simple paragraph</p> </div> CSS: .test { font-color: blue; } There above script will turn the paragraph and the heading bue. You typed this so that means we can give div tag a name by typing this <div class ="___" you can name it? Ok But what is this symbol { and } you just used it in CSS
4th May 2023, 10:32 AM
ayman mohammad
ayman mohammad - avatar
0
And also we need <br> tag for </div> or we don't need anything we can simply write <div> in next line
4th May 2023, 10:34 AM
ayman mohammad
ayman mohammad - avatar
0
It's kinda of box! For Content inside!
4th May 2023, 2:11 PM
Ravi
Ravi - avatar
0
Its a Container And Also Makes Code Improved
5th May 2023, 3:16 AM
P K
P K - avatar
0
In HTML, the <div> tag is a container tag that is used to group together HTML elements and apply styles or scripts to them collectively. The word "div" stands for "division," and the <div> tag essentially creates a rectangular block that can be used to hold other HTML elements. The <div> tag itself does not have any inherent visual or semantic meaning; its purpose is simply to group together other HTML elements. It is commonly used in conjunction with CSS to create layout and styling for web pages. By grouping together related HTML elements with the <div> tag, developers can apply styles and scripts to those elements as a group, rather than having to apply them to each individual element separately. For example, a group of related navigation links on a website might be contained within a <div> tag, which would allow developers to apply styling to the entire group of links at once, rather than having to style each individual link separately.
5th May 2023, 7:44 AM
Mrexamples
Mrexamples - avatar
0
Very Interesting 💬
5th May 2023, 8:09 AM
Asfand Ali
Asfand Ali - avatar
0
Mrexamples that was helpful but how will put the hypertext Markup language Elements in that div tag we have to just do like this? <Div class="___","____",etc and even how many elements can It hold 5 ,6 or even infinity
5th May 2023, 8:12 AM
ayman mohammad
ayman mohammad - avatar
0
Asfand Ali what do you mean
5th May 2023, 8:13 AM
ayman mohammad
ayman mohammad - avatar