HTML part_2 Inline Vs Block Element...
Block Element
A block-level element always starts on a new line, and the browsers automatically add some space before and after the element.
A block-level element always takes up the full width available.
Two commonly used block elements are: <p>
and <div>
.
The <p>
element defines a paragraph in an HTML document.
The <div>
element defines a division or a section in an HTML document.
There are so many of them will see soon.
Other Block Elements
Inline Elements
An inline element does not start on a new line.
An inline element only takes up as much width as necessary.
This is a <span> element inside a paragraph.
Now Remaining Tags
Italic Tag & em Tag
The main difference between these two tag is that the <em> tag semantically emphasizes on the important word or section of words while <i> tag is just offset text conventionally styled in italic to show alternative mood or voice.
Emphasis versus Italics <em> vs <i>
If words are emphasized, as if being pronounced with emphasis, use <em>. I am really hungry.
<p>This is a demo of <i>italic tag</i></p>
<!-- Italic Tag -->
<p>This is an example of <em> em Tag</em> </p>
<!-- em -> emphasize Tag -->
<!-- <i></i>,<em></em> both work same but em is good to use -->
Bold Tag
The main difference between these two tag is that the strong tag semantically emphasizes on the important word or section of words while the bold tag is just offset text conventionally styled in bold.
<p> <b> This is text is bold </b></p>
<!-- using <b></b> tag-->
<p><strong> This is also same bold text</strong></p>
<!-- bold text using <strong> tag -->
Highlight Tag
<p>This is a <mark> highlighted text </mark></p>
<!-- we can highlight our text using <mark></mark> tag -->
Delete & insert Tag
The <del> element represents a removal from the document. The <s> represents contents that are no longer accurate or no longer relevant.
<p>This text is <del> deleted </del></p>
<!-- delete the text using <del></del> tag -->
<p>This is also <strike> deleted text </strike> </p>
<!-- using <strike></strike> tag or we can wite as <s></s>-->
<p>This is <strike> deleted text </strike> <insert>And i inserted</insert> </p>
<!-- using <insert></insert> we can insert text any -->
Subscript & Superscript Tag
<p>H<sub>2</sub>o</p>
<p>This text contain<sub>subscript</sub>text</p>
<!-- using <sub></sub> tag we sighly down our text in webpage -->
<p>2<sup>32</sup></p>
<p>This text contain<sup>Superscript</sup>text</p>
<!-- using <sup></sup> tag we sighly up our text in webpage -->
(Hinglish)
Aaj ke liye itna kaafi h
Baaki Ka Kal dekthe h..
DAY_6 23_Jan(Monday)_2023