I know the general difference, but what is the purpose / advantage of using the span tag over the div tag?
t
<p>hello <span>world</span></p>
and
<p>hello <div>world</div></p>
Absolutely no difference in output?
You cannot use a div there legally. This is a block element. Span inline.
There are different types of elements ( block, inline, table...).
block
inline
table
Example for the block elements, h1, p, div, ...
h1
p
div
Examples of inline elements: em, block, span, ...
em
span
- . (, div), (, p). .
, . .
<p> , , <div> . <span> .
<p>
<div>
<span>
Source: https://habr.com/ru/post/1796262/More articles:Magento does not show all categories in admin - adminhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1796258/convert-xls-to-xlsm-using-excelcnvexe&usg=ALkJrhgUqelOg6kSKNRd1rx9HG78iOdPRgC #: code style - places for participants - c #How many Java objects are generated by this - new String ("abcd") - javaIs it possible to play only part of an mp3 file using AVAudioPlayer? If so, how? - iosEditing files in place with a tie acting differently on different Unix - linuxHow can I organize controls on a form relative to each other and the form itself? - c #Android: как передать файл css в html в следующей ситуации - androidMVC 3 and razor, How to build a structure from _layout to _layout? - asp.net-mvcHierarchy of definition of web developers for implementation in the Department of web development - hierarchyAll Articles