HTML Elements
Elements
As we know elements are building blocks. Without knowing their properties we cant construct a fully-functional webpage. An HTML component comprises a start tag and an end tag, with the content in the middle. Some elements are small enough that we cant place content in between them. Such elements are called single elements.
Types of Elements:-
- Block-level Elements
- Inline Elements
Block-level Elements:-
Elements that always start from a new line are called block-level elements. Some padding and margins are added to them by default by the browsers.
Examples:-
- p Tag
- h2 - h6 tag
- div tag
Inline Elements:-
Those elements that do not start from a new line and take up as much width as necessary are called Inline elements.
Examples:-
- span tag
- a tag
- abbr tag
- em tag