+ 5

what is the use of </span> and </div> in Html.

16th Oct 2018, 8:41 AM
raza naqvi
raza naqvi - avatar
21 Answers
+ 4
There are some link in that page that point to futher info like https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements Anyway, try to think about semantic of tags... In styling context, every content tag can be treated in different way from default (at example you can set <p> be like inline element) BUT one difference keep.. Though bad presented, its alway a paragraph. Why have to take cure of it if , at end, presentation is how we set? Well, i think that an external source explain better than me https://www.lifewire.com/why-use-semantic-html-3468271 than READ IT After readed that, you can understand better why exist div and span.. They are NO semantic elements treated like, by default, block and inline respectively. Thats. This is a more comprensive list of elements with semantic info https://developer.mozilla.org/en-US/docs/Web/HTML/Element
16th Oct 2018, 10:42 AM
KrOW
KrOW - avatar
+ 5
KrOW thanks!!
16th Oct 2018, 11:06 AM
raza naqvi
raza naqvi - avatar
+ 5
btw awesome coding KrOW
16th Oct 2018, 11:07 AM
raza naqvi
raza naqvi - avatar
+ 5
what's your real name??
16th Oct 2018, 11:11 AM
raza naqvi
raza naqvi - avatar
+ 5
no problem KrOW just askin , hope you don't mind .😅😅
16th Oct 2018, 11:16 AM
raza naqvi
raza naqvi - avatar
+ 4
sorry KrOW i did that by mistake,corrected that and your help appreciated😅😅 thanks for your help!!!
16th Oct 2018, 10:53 AM
raza naqvi
raza naqvi - avatar
+ 3
Satnam Singh elaborate
16th Oct 2018, 9:57 AM
raza naqvi
raza naqvi - avatar
+ 3
KrOW the link was very helpful,Now i know what </Span> is but what's div can't is use <p> for that.explain the use of <div>
16th Oct 2018, 10:02 AM
raza naqvi
raza naqvi - avatar
+ 3
KrOW upvote Q pls😁😁
16th Oct 2018, 10:56 AM
raza naqvi
raza naqvi - avatar
+ 2
https://www.sololearn.com/discuss/1390253/?ref=app P.S. I suggest you to read link that i posted in that question because there much differences often forgetted
16th Oct 2018, 8:56 AM
KrOW
KrOW - avatar
+ 2
raza naqvi I almost forgotten... Because you are learning, see this code https://code.sololearn.com/WaVusr8J1KvK/?ref=app It contain useful links for learning programming (and some other it fields) and dont worry, i dont want upvotes but i hate when someone downvote without a why (except when its clear) P.S. I upvote your question only because contain useful info to everyone that learning basic of html 😝
16th Oct 2018, 10:59 AM
KrOW
KrOW - avatar
+ 2
raza naqvi Thank you 😊... You will find that its not awesome like you think when you learn more deep web development 😉
16th Oct 2018, 11:08 AM
KrOW
KrOW - avatar
+ 2
raza naqvi Just for inform you: on SL its not allowed share personal information, then you can call me simply KrOW 😁
16th Oct 2018, 11:13 AM
KrOW
KrOW - avatar
+ 2
Both of these are dhtml( dynamic html) tags. Used to make the content dynamic. With div tag you can make content accessible for every device(like mobile, desktop and iPad) with the help of bootstrap or css.
16th Oct 2018, 3:24 PM
Vishvesh Jain
Vishvesh Jain - avatar
+ 2
KrOW , a good feast for learners. Thank you. It should reach all who loves learning.
19th Oct 2018, 5:11 PM
Brahmeswara Rao
Brahmeswara Rao - avatar
+ 2
Brahmeswara Rao 👍👍👍
19th Oct 2018, 7:07 PM
KrOW
KrOW - avatar
+ 1
raza naqvi 😁😁😁. You are welcome and dont worry 👍👍👍
16th Oct 2018, 10:55 AM
KrOW
KrOW - avatar
+ 1
👍👍👍
16th Oct 2018, 11:06 AM
KrOW
KrOW - avatar
+ 1
raza naqvi Dont worry (again), its just for inform you about SL rules 👍👍👍
16th Oct 2018, 11:18 AM
KrOW
KrOW - avatar
+ 1
The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The <span> tag is easily styled by CSS or manipulated with JavaScript using the class or id attribute. The <span> tag is much like the <div> element, but <div> is a block-level element and <span> is an inline element. It has no Default CSS Settings. Example: <!DOCTYPE html> <html> <body> <h1>The span element</h1> <p>My mother has <span style="color:blue;font-weight:bold">blue</span> eyes and my father has <span style="color:darkolivegreen;font-weight:bold">dark green</span> eyes.</p> </body> </html> On attributes behavior: 1. Global Attributes: The <span> tag also supports the Global Attributes in HTML (https://www.w3schools.com/tags/ref_standardattributes.asp). 2. Event Attributes: The <span> tag also supports the Event Attributes in HTML(https://www.w3schools.com/tags/ref_eventattributes.asp).
17th Aug 2020, 10:59 AM
Bits!