BASIC HTML TAGS





Hi friends, I am back with my third post which is on the basic formatting tags used in html. So, what we learnt in the previous post was about the basic tags in brief. Today, we will learn about the basic formatting tags in detail.


HTML BASIC FORMATTING TAGS

Html uses elements like <b> and <i> for formatting output, like bold or italic text.
Formatting elements were designed to display special types of text:
  • Bold text
  • Important text
  • Italic text
  • Emphasized text
  • Marked text
  • Small text
  • Deleted text
  • Inserted text
  • Subscript
  • Superscript

HEADING TAGS
Any browser starts with a heading. You can use different sizes for your headings. HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, <h6>.
INPUT:

OUTPUT:




PARAGRAPH TAG
The <p> tag offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening <p> and closing </p>. Example:
<p>first paragraph of text. </p>
<p>second paragraph of text. </p>
<p>third paragraph of text. </p>

LINE BREAK TAG
Whenever you use the <br /> element, anything following it starts from the next line. The <br /> tag has a space between the characters br ant the forward slash.
<body>
<p>Hello. <br />
You are very intelligent. <br />
</body>

CENTERING CONTENT
You can use this tag to put any content in the center of the page.


INPUT:



OUTPUT:

















HORIZONTAL LINES
Horizontal lines are used to breakup sections of a document. The <hr /> tag creates a line from the current position in the document to the right margin and then breaks it accordingly.
<head>
<title>horizontal line example</title>
</head>
<body>
<p>this should be at top</p>
<hr />
<p>this should be at bottom</p>
</body>
</html>


PRESERVE FORMATTING
Any text between the opening <pre> tag and the closing </pre> tag will preserve the formatting of the source document.
EXAMPLE:
<body>
<pre>
function testFunction ( strText ) {
alert (strText )
}
</pre>
</body>
</html>

ITALIC AND UNDERLINING
Use the sub tag <i></i> for italic and <u></u> for underlining.
Example:
<body>
<h1>This is <i>italic</i>heading</h1>
<p>This is <u>underlined</u>paragraph</p>
</body>
</html>

HTML SMALL FORMATTING
The HTML <small> element defines small text.
EXAMPLE:
<h2>HTML <small>Small</small> Formatting</h2>

HTML MARKED FORMATTING
The HTML <mark> element defines marked or highlighted text.
Example:
<h2>HTML <mark>Marked</mark> Formatting</h2>


DELETED FORMATTING
The <del> element defines deleted (removed) text.
Example:
<p>My favorite colour is <del>black</del>white` </p>

SUBSCRIPT FORMATTING
The <sub> element defines subscript text.
Example:
<p>This is <sub>subscripted</sub> text. </p>

SUPERSCRIPTING FORMATTING
The <sup> element defines superscripted text.
Example:
<p>This is <sup>superscripted</sup>text. </p>



THANK YOU ALL



To  like our facebook page  click here  NewAgeInformers 
To subscribe our youtube channel click here wolfpack
 

Comments