9jabaze - Entertainment | Webmaster | Browsing Tricks | Games/Apps Hub
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» "Ofe Akwu" (Igbo Version Of Banga Soup) In Five Easy Steps
Difference between div and span tags EmptySun Jun 28, 2020 6:29 am by Adminkunlex

» Molokhia Soup: How Arabs Make Ewedu Soup (Pictures, Video)
Difference between div and span tags EmptySun Jun 28, 2020 6:26 am by Adminkunlex

» Iru: The Godmother Of All Condiments
Difference between div and span tags EmptySun Jun 28, 2020 6:22 am by Adminkunlex

» Naira Marley - As e dey go Mp3 + Lyrics
Difference between div and span tags EmptyFri Jun 26, 2020 11:00 pm by Adminkunlex

» Wande Coal - Naughty Girl Mp3 + Lyrics
Difference between div and span tags EmptyFri Jun 26, 2020 10:59 pm by Adminkunlex

» Ola-Ogrin-Omologo.mp3
Difference between div and span tags EmptyWed Jun 24, 2020 6:21 pm by Adminkunlex

» Chinko-Ekun-Ft.-Zlatan-Doings.mp3
Difference between div and span tags EmptyWed Jun 24, 2020 6:20 pm by Adminkunlex

» Mp3: Fireboy DML – New York City Girl Lyrics
Difference between div and span tags EmptyTue Jun 23, 2020 6:44 am by Adminkunlex

» Java Game: God of Combat.jar
Difference between div and span tags EmptyTue Jun 23, 2020 6:25 am by Adminkunlex

» Java Game: 1942 Air Combat.jar
Difference between div and span tags EmptyTue Jun 23, 2020 6:24 am by Adminkunlex

» Kung Fu Combat.jar
Difference between div and span tags EmptyTue Jun 23, 2020 6:20 am by Adminkunlex

» Java Game: Modern Combat 4: Zero Hour.jar
Difference between div and span tags EmptyTue Jun 23, 2020 6:20 am by Adminkunlex

» Java Game: Modern Combat 2: Black Pegasus.jar
Difference between div and span tags EmptyTue Jun 23, 2020 6:19 am by Adminkunlex

» NIKON Scholarship Program 2020 - Apply Now
Difference between div and span tags EmptyThu Jun 18, 2020 12:10 pm by shanimosta

» 2020 UTME: JAMB Top 10 Candidates Revealed
Difference between div and span tags EmptyWed Jun 17, 2020 4:32 pm by Adminkunlex

» Phillipo-Pray.mp3
Difference between div and span tags EmptyMon Jun 15, 2020 8:24 pm by Adminkunlex

» KashBwoy-Ft.-Joey-B-Maria.mp3
Difference between div and span tags EmptyMon Jun 15, 2020 8:23 pm by Adminkunlex

» Reejay-Kpayan.mp3
Difference between div and span tags EmptyMon Jun 15, 2020 8:22 pm by Adminkunlex

» Mr-K-Tinuke.mp3
Difference between div and span tags EmptyMon Jun 15, 2020 8:21 pm by Adminkunlex

» Caligerian-Ft.-Yovi-x-Terry-Apala-On- Point.mp3
Difference between div and span tags EmptyMon Jun 15, 2020 8:20 pm by Adminkunlex

The most tagged keywords



Difference between div and span tags

Go down

Difference between div and span tags Empty Difference between div and span tags

Post by Adminkunlex on Sun Jan 19, 2020 9:17 am

In HTML there are two types of elements.
1. Block Level Elements
2. Inline Level Elements
The “div” belongs to the block level elements. That means the moment you define anything within div tag, it takes the entire block of the page until you define a width for it.
1<div class="container">
2 <p>Hello World!</p>
3</div>
Now this will take the width of entire page until the
code below shows up.
1<div class="container" style="width:80%">
2 <p>Hello World!</p>
3</div>
Above div tag will consume 80% of the page to print
the text. Also if you define two div tags it will appear
below. That’s why it’s called block level elements.
Inline level elements never consume the entire page
but only the part where it is used. Even if you define
two span tags, it will appear inline with other.
1<span>Text1</span>
2<span>Text2</span>
Even if you define it below, it will printed on the
page as
Text1Text2
You can try this out on an editor and test it with any
browser. Hope I cleared your doubt.
Add on’s:
Other block level elements are <p>, <iframe>, <h1> till
<h6> etc
Other inline level elements are <a>, <strong>, <em>,
<sub>, <sup> etc

Source

Adminkunlex
Admin

Posts : 1451
Join date : 2019-06-08
Age : 20
Location : Osun State, Nigeria

https://9jabaze.forumotion.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum