Text in html
In this article we are going to learn about text in html, headings, italic, bold, strong, small, emphasis, mark, underline, superscript, subscript, delete, line-break and horizontal rule tags.
We learnt about html in general learning the structure of html so, now we are going to go through some html text formats (headings, italic, bold, strong, small, paragraphs).
The HyperText Markup Language (HTML) is a plain text which can be formated in different ways and let us see how this can be done.
Headings
In HyperText Markup Language headings are tags used to format text to be large and be bigger than other text in the web page and used as heading like the name says.
Six Headings in html
- Heading 1
- Heading 2
- Heading 3
- Heading 4
- Heading 5
- Heading 6
Heading 1
Heading one <h1></h1> tags gives largest text in html headings, copy and paste bellow code.
<h1>Heading 1</h1>
So, we should have the following results.
Heading 1
Heading 2
Heading two <h2></h2> tags gives smaller text than heading one in html headings, copy and paste bellow code.
<h2>Heading 2</h2>
So, we should have the following results.
Heading 2
Heading 3
Heading three <h3></h3> tags gives smaller text than heading two in html headings, copy and paste bellow code.
<h3>Heading 3</h3>
So, we should have the following results.
Heading 3
Heading 4
Heading four <h4></h4> tags gives smaller text than heading three in html headings, copy and paste bellow code.
<h4>Heading 4</h4>
So, we should have the following results.
Heading 4
Heading 5
Heading five <h5></h5> tags gives smaller text than heading four in html headings, copy and paste bellow code.
<h5>Heading 5</h5>
So, we should have the following results.
Heading 5
Heading 6
Heading six <h6></h6> tags gives smaller text than heading five in html headings, copy and paste bellow code.
<h6>Heading 6</h6>
So, we should have the following results.
Heading 6
Italic
We can use italic <i></i> tags to format our text in web page, copy and paste bellow code.
<i>This is italic text.</i>
So, we should have the following results.
This is italic text.Bold
We can use bold <b></b> tags to format our text in web page, copy and paste bellow code.
<b>This is bold text.</b>
So, we should have the following results.
This is bold text.Strong
We can use strong <strong></strong> tags to format our text in web page, copy and paste bellow code.
<strong>This is strong text.</strong>
So, we should have the following results.
This is strong text.Small
We can use small <small></small> tags to format our text in web page, copy and paste bellow code.
<small>This is small text.</small>
So, we should have the following results.
This is small text.Emphasis
We can use emphasis <em></em> tags to format our text in web page, copy and paste bellow code.
<em>This is emphasis text.</em>
So, we should have the following results.
This is emphasis text.Mark
We can use mark <mark></mark> tags to format our text in web page, copy and paste bellow code.
<mark>This is marked text.</mark>
So, we should have the following results.
This is marked text.Underline
We can use underline <u></u> tags to format our text in web page, copy and paste bellow code.
<u>This is underlined text.</u>
So, we should have the following results.
This is underlined text.Superscript
We can use superscript <sup></sup> tags to format our text in web page, copy and paste bellow code.
<sup>This is superscript text.</sup>
So, we should have the following results.
This is superscript text.
Subscript
We can use subscript <sub></sub> tags to format our text in web page, copy and paste bellow code.
<sub>This is subscript text.</sub>
So, we should have the following results.
This is subscript text.
Delete
We can use delete <del></del> tags to indicate deleted text in web page, copy and paste bellow code.
<del>This is deleted text.</del>
So, we should have the following results.
This is deleted text.
Line break
We can use line-break <br/> tag to break middle of the paragraph in web page, copy and paste bellow code.
<p>This is line broken <br/> text.</p>
So, we should have the following results.
This is line broken
text.
Horizontal rule
We can use horizontal rule <hr/> tag to draw horizontal line separating two sections, copy and paste bellow code.
<div>This is horizontal rule applied <hr/> text.</div>
So, we should have the following results.
text.