+ 1
Div tags
Can someone pls tell me the different types of <div>tags and what they are forđ
8 Answers
+ 1
You've learned HTML. Learn CSS next. Then you will understand.
+ 2
Chris Coder oh I thought it was under the HTML courses. Thanks so muchđ
+ 1
And can someone do the same for the <span> tags toođ
+ 1
There is only one div tag and one span tag
div is a special tag that does not have any style to it, so you can make your own, this one behave as a block.
span tag is just like the div tag, but can be used inline, for text
+ 1
Hi Olumide Nifemi div is short for division, It is a none Semantic block level element. divs were often used to create sections in a webpage. Now with HTML 5 we don't see them as much anymore because we have more more symantic tags. Such as main, section and article which replaces divs to give it meaning.
Span is a none semantic inline element. it is used to style inline elements. Such as text in a p element.
I have an example.
https://code.sololearn.com/WXpdoa1ifG1s/?ref=app
+ 1
Chris Coder thank you but what I meant was for example <div class>="#" or <div id>= "#" , what do you call the class or the id beside the <div>
+ 1
Apollo-Roboto thank you but what I meant was for example <div class>="#" or <div id>= "#" , what do you call the class or the id beside the <div>
+ 1
You call it what ever you want to
<div class="classname">
<div Id="Idname">