HTML Tags and Elements
Attributes and Hyperlinks
Headings and Lists
Class and id attributes
Inline and Block-Level Elements
Div and Span
Define Inline Elements in HTML.
Inline elements occupy the space as needed within space defined by the main element. An inline element doesn’t start with a new line and it takes only the width required.
Some examples of Inline elements are-
a.<b>, <i>, <u>
Define Block-Level Elements in HTML.
Block elements occupy the entire space between the tags. A block element always starts with a new line and takes up the full width available.
Some examples of Block elements are-
a. <header>, <h1---h6>
How can the inline and block-level elements be changed?
This conversion is possible through CSS. We can’t convert inline intoblock element or vice versa at all. Basically, what we do is change the display: property of the inline element to block element. This does not make it a block element but makes it display as a block element. Once this conversion is done, attributes like height, width can be applied to the text.