0
What is the meaning of <div> tag in html
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.
+ 3
https://www.w3schools.com/tags/tag_div.ASP#:~:text=The%20tag%20defines%20a,inside%20the%20tag!
+ 3
div tag makes more sense once you also learn CSS and JS. In pure html, it doesn't do a whole lot.
+ 3
ayman mohammad it is essential in web developing
+ 2
Ok
+ 2
I only learnt html not about JS and CSS
+ 2
Web developement fundamentals includes css html and js… with just html you can’t do almost nothing
+ 2
Ok thanks
+ 1
Oh
+ 1
Well Is div tag that much important
0
Also I am in standards and best practices lesson I found some people using it so I asked this question
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.
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
0
And also we need <br> tag for </div> or we don't need anything we can simply write <div> in next line
0
It's kinda of box! For Content inside!
0
Its a Container And Also Makes Code Improved
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.
0
Very Interesting 💬
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
0
Asfand Ali what do you mean