HTML Formatting:-
HTML contains several elements or tags for defining text with a special meaning. In HTML you can use several tags for different purposes. For example, if you want to do your text in bold then you have to use <b> tag if you want to do your text in italic then you have to use <i> tag.
If you don't know about HTML Styles then click on the link and learn before learning HTML Formatting.
<!DOCTYPE html>
<html>
<body>
<h1> This heading is <b> bold </b></h1>
<p> <i> This paragraph is in italic text. </i></p>
</body>
</html>
Try this code for a better experience
HTML Formatting Element:-
Formatting elements were designed to display special types of text:
- <b> - This tag is used to prominent your text or bold your text.
- <strong> - This is used for important text. This tag will make your text bold.
- <i> - This tag is used for italic text. If you want to change or want your text will show differently then you have to use <i>.
- <em> - This tag is used to emphasize text.
- <mark> - This tag is used to mark any text. If you want to mark any text then you have to use <mark> tag then your text will be marked that you want.
- <small> - Small tags are used for smaller text. If you want my text will be smaller than other text then you should have to use the <small> tag from this tag your text will be shown as smaller than other text.
- <del> - This tag is used to delete or show a line on deleting words.
- <ins> - Used this tag to underline any text. You can use also an underline tag to underline any text.
- <sub> - Use <sub> text to subscribed text. It means from this tag your text will show smaller than other text but at the right side of the bottom.
- <sup> - This tag will help to show small text at the right side of the bottom.
HTML <b> And <strong> Element:-
In HTML <b> tag or <strong> tag is used for bold any text.
<!DOCTYPE html>
<html>
<body>
<p> <b> This is bold text. </b></p>
</body>
</html>
Try this code for a better experience
The HTML <strong> element defines the text with strong importance.
<!DOCTYPE html>
<html>
<body>
<p> <strong> This text is so important. </string></p>
</body>
</html>
Try this code for a better experience
HTML <i> And <em> Element:-
The <i> tag is used for text designing when you want your text in an italic mood then you can use the <i> tag.
TIP:- <i> tag is often used to indicate a technical term, a phrase from another language, a thought, a ship name, etc.
<!DOCTYPE html>
<html>
<body>
<p> This is normal text. </p>
<p> <i> This paragraph is in italics mood. </i></p>
</body>
</html>
Try this code for a better experience
The <em> element defines emphasized text. The content inside is typically displayed in italics.
TIP:- A screen reader will pronounce the word in <em> with an emphasis, using verbal stress.
<!DOCTYPE html>
<html>
<body>
<p> This is normal text.</p>
<p> <em> This is emphasized text. </em></p>
</body>
</html>
Try this code for a better experience
HTML <small> element:-
HTML <samll> tag defines smaller text.
<!DOCTYPE html>
<html>
<body>
<p> This is normal text. </p
<p> <small>This is small text. </small> </p>
</body>
</html>
Try this code for a better experience
HTML <mark> Element:-
HTML <mark> tag is used when you want to mark any word or highlight any word or sentence.
<!DOCTYPE html>
<html>
<body>
<p> In this sentence i <mark> marked </mark> one word. </p>
</body>
</html>
Try this code for a better experience
HTML <del> Element:-
The HTML <del> element defines the text that has been deleted from the document. The browser will automatically strike a line through the deleted text.
<!DOCTYPE html>
<html>
<body>
<p> In this sentence <del> SB INFO HUB </del> has been deleted from the document but the browser strikes a line through the deleted text. </p>
</body>
</html>
Try this code for a better experience
HTML <ins> Element:-
HTML <ins> tag defines the text that has been inserted in the document. The browser will automatically underline the inserted text.
<!DOCTYPE html>
<html>
<body>
<p> In this sentence <ins> SB INFO HUB </ins> has been added to the document that's why the browser underlines the added text. </p>
</body>
</html>
Try this code for a better experience
HTML <sub> Element:-
HTML <sub> tag defines the subscripted text. Subscripted text appears half a character below the normal line and is something rendered in a small font. Subscripted text is used for chemical formulas like H2O.
<!DOCTYPE html>
<html>
<body>
<p> H<sub>2</sub> O is watwe formula. </p>
</body>
</html>
Try this code for a better experience
HTML <sup> Element:-
The HTML <sup> tag defines the superscript text. Superscript text appears half a character above the normal line and is something rendered in a small font. Superscripted text is used for footnotes, like WWW[1].
<!DOCTYPE html>
<html>
<body>
<p> WWW<sup> [1]</sup> [1] on the WWW is superscript text. </p>
</body>
</html>
Try this code for a better experience
0 Comments