0
How does one use <div/> and <span/> in HTML5 and what is its function.
5 Respostas
+ 3
Thanks guys
+ 2
You use it to group elemets, it gets useful when working with CSS and classes. Using <div> makes a new block, <span> just groups it together.
+ 1
Div and span are used for kind of same reason.But div is block element.And span is inline element.
0
HTML5 Sectioning elements should be used instead of <div> and if at all a <div> is used, ARIA role attributes should be provided.
https://www.sololearn.com/learn/HTML/2191/
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
That been said, <div> is used for block-level sectioning while <span> is used for <inline> grouping
https://www.sololearn.com/Discuss/1287933/?ref=app