HTML div tag versus span tag
There is a difference in HTML <div> tag and <span> tag although both tags are used to show data in the HTML body. <div> elements are block elements in HTML and XHTML? and automatically appear on its own line. Here is the difference in the presentation in both tag. If you need to show data on the same line as other text then you can use <span> element instead of <div> element. The <div> element is the most popular, but it is a block element and takes up its own lines in the browser. If you want to place new text inline, use <span> tag.
Recent Comments