0
A basic CSS question
What are the difference between <div> and <p> and <span> and <a>
2 Answers
+ 7
<div> is a container, <p> paragraph, <span> container (in terms of layout it is a lowercase container), <a> is a link, each tag performs its function.
+ 3
In addition I would say that div and p tags are block elements, span and anchor (a) are inline elements. Paragraph differs from div by top padding, i.e. it has top padding, and because of it they don't stick to each other. Anchor differs from span cause it has blue color and underline