HTML Notes

mobiprep (6).png

HTML

mobiprep (6).png

HTML Tags and Elements

mobiprep (6).png

Attributes and Hyperlinks

mobiprep (6).png

Headings and Lists

mobiprep (6).png

Class and id attributes

mobiprep (6).png

Semantic Elements

mobiprep (6).png

Inline and Block-Level Elements

mobiprep (6).png

Div and Span

mobiprep (6).png

img

mobiprep (6).png

Tables

mobiprep (6).png

Forms

Heading

Q

1

Define Inline Elements in HTML.

LRM_EXPORT_207556595493866_20190724_1939

Ans

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>
b.<a>, <img>
c.<span>

LRM_EXPORT_207556595493866_20190724_1939

Q

2

Define Block-Level Elements in HTML.

LRM_EXPORT_207556595493866_20190724_1939

Ans

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>
b. <p>
c.<div>

LRM_EXPORT_207556595493866_20190724_1939

Q

3

How can the inline and block-level elements be changed?

LRM_EXPORT_207556595493866_20190724_1939

Ans

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.

LRM_EXPORT_207556595493866_20190724_1939