Google News
logo
UI Developer - Interview Questions
Differentiate between div and span?
DIV SPAN
It is utilized for separating the elements that are block-line, line break before and after it. Span is utilized for grouping inline elements in the HTML doc.
It contains global attributes for the certain element in HTML documents.
 
It includes certain, global and event attributes.
At times para tag <P> is utilised for inner side of the <div> tag. In a paragraph, <span> tag is utilized to use a CSS style for certain words with the selected font sets.
In div tag, we make use of borders with width height with specified color pixels to emphasize the front end document. In the Span tag, we utilize specified color coding to depict the front-end document. 
Advertisement