0
how to use div?why we use div? please give examples. it necessary to write everything in div. I need a professional opinion. please answer my question?
I know what is inline and block element. but I always get confused when we use div tag?
4 Answers
+ 1
div tag is used to create section in webpage like if you want to create footer section put all the elements required in header into that div element same for footer and other sections. inshort it is used to divide webpage into different sections.
+ 1
Div has no semantic meaning, Therefor HTML5 has introduced many new tags that describe content better for us to use instead of divs like <nav>, <section>, <header>, <article>, <footer>, etc..
0
tape this ..
http://www.tutorialspoint.com/html/html_div_tag.htm
- 1
e.g. we use div (it means division) for creating menus of the website. So we create a div for something like left menus and it will have some nested divs for each menu. and also we can do this for header, footer, posts, and etc.