what is the difference between div tag and span tag ?? |
what is the difference between div tag and span tag ?? |
deb1 |
Jun 11 2020, 09:16 AM
Post
#1
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
please can someone tell me what is the difference between div tag and span tag ??
|
Christian J |
Jun 11 2020, 10:02 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,630 Joined: 10-August 06 Member No.: 7 |
Please start new threads instead of posting in old ones.
(This post was originally posted in https://forums.htmlhelp.com/index.php?showtopic=293 ) |
deb1 |
Jun 11 2020, 10:46 AM
Post
#3
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
for anyone still having problems like these, I can personally vouch for a course I took on Udemy. It's https://www.udemy.com/course/html-css-and-j...veloper-course/ is it free or do we have to pay for the course? |
deb1 |
Jun 11 2020, 12:10 PM
Post
#4
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
what is the difference between div and span tags in html?
|
pandy |
Jun 11 2020, 01:50 PM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
|
deb1 |
Jun 11 2020, 02:26 PM
Post
#6
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
Can you please write a html coding for me on here where it shows how to use span and div tag in it. it will be easier for me to understand that way |
pandy |
Jun 11 2020, 02:43 PM
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
We already talked about this. Use DIV to group things together or when no other block level element fits.
SPAN is similar to DIV in that it lacks features in itself, but it's inline (text level). If you want a word to stand out because it's important, you'd probably use EM and style it to your heart's content. CODE This is <em>important</em>. But if you want to make all words have different colors because you think it looks pretty (just a dumb example), you don't want to use a meaningful element, but you still need something to apply CSS to, so SPAN is your choice. CODE <span>Nothing</span> <span>here</span> <span>is</span> <span>of</span> <span>importance</span>. In the first example important will stand out even without CSS. The browser may make it bold or italic. In the second example all the words will look the same without CSS. SPAN doesn't carry any meaning. |
deb1 |
Jun 11 2020, 02:54 PM
Post
#8
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
We already talked about this. Use DIV to group things together or when no other block level element fits. SPAN is similar to DIV in that it lacks features in itself, but it's inline (text level). If you want a word to stand out because it's important, you'd probably use EM and style it to your heart's content. CODE This is <em>important</em>. But if you want to make all words have different colors because you think it looks pretty (just a dumb example), you don't want to use a meaningful element, but you still need something to apply CSS to, so SPAN is your choice. CODE <span>Nothing</span> <span>here</span> <span>is</span> <span>of</span> <span>importance</span>. In the first example important will stand out even without CSS. The browser may make it bold or italic. In the second example all the words will look the same without CSS. SPAN doesn't carry any meaning. OK understand it now . thank you again for explaining it to me. |
deb1 |
Jun 11 2020, 02:58 PM
Post
#9
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
Just wondering is BOOTSTRAP a part of html also ? what is the difference between html and bootstrap?
|
pandy |
Jun 11 2020, 03:52 PM
Post
#10
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
You already asked that and I answered it here.
https://forums.htmlhelp.com/index.php?s=&am...st&p=139399 |
deb1 |
Jun 11 2020, 11:56 PM
Post
#11
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
We already talked about this. Use DIV to group things together or when no other block level element fits. SPAN is similar to DIV in that it lacks features in itself, but it's inline (text level). If you want a word to stand out because it's important, you'd probably use EM and style it to your heart's content. CODE This is <em>important</em>. But if you want to make all words have different colors because you think it looks pretty (just a dumb example), you don't want to use a meaningful element, but you still need something to apply CSS to, so SPAN is your choice. CODE <span>Nothing</span> <span>here</span> <span>is</span> <span>of</span> <span>importance</span>. In the first example important will stand out even without CSS. The browser may make it bold or italic. In the second example all the words will look the same without CSS. SPAN doesn't carry any meaning. OK understand it now . thank you again for explaining it to me. You explained the <em> tag and the <span> tag which i understand now . can you please also show me the coding for the <div> tag so that i can understand that as well This post has been edited by deb1: Jun 11 2020, 11:57 PM |
pandy |
Jun 12 2020, 04:24 AM
Post
#12
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
HTML 5 offers new elements that can be used instead of DIV in many cases. But lets pretend they don't exist.
A typical use of DIV in a HTML 4.01 page could look like this. CODE <div id="header">...</div> <div id="topnav">...</div> <div id="sidebar">...</div> <div id="main">...</div> <div id="footer">...</div> |
Lo-Fi Version | Time is now: 30th March 2024 - 02:04 AM |