+ 2
What is the use id div tag?give its attribute with value.
3 Antworten
+ 5
The "div" element is used as a container of other elements. The attribute id="" is used to add a unique identity to the div (in order to work easier with CSS and JavaScript).
Example of a div that contains a paragraph and an image:
<div id="mydiv">
<p> Some text </p>
<img src="" alt="" />
</div>
+ 2
The <div> tag is a block element used to define a division or section of the contents of a web page. It is useful for grouping block-level elements together so they can be styled using CSS.
So, you can use whatever CSS attribute applicable to the contents.
+ 2
we use div to modify it using Css and Javascript.