0% found this document useful (0 votes)
3 views14 pages

HTML Header and Text Formatting Guide

Uploaded by

hcyh67606
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views14 pages

HTML Header and Text Formatting Guide

Uploaded by

hcyh67606
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Creating Heading

Six levels of headers are used in any documents, h1 to h6.


• Header (h1) is the largest header.
• XHTML has six levels of headers used in any documents, h1
to h6.
• Use the elements: <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.
• The <h1> element as the largest of the six.
• And <h6> is the smallest.
Example: <h1> This is first program </h1>
Output: This is first program
Example
Creating Paragraphs Using the <p> Element
• The <p> element offers another way to structure your text.
• Each paragraph of text should go in between an opening <p>
and closing </p> tag.
• Example : <p> This is second program </p>
• When a browser displays a paragraph, it usually inserts a
new line before the next paragraph.
Creating Paragraphs Using the <p> Element
Bold tag, Underline tag, Italic tag
• Bold tag (<b>) is the HTML element that enables text
formatting.
• Bold <b> and </b> tags.

• Underline <u> and </u> tags.

• Italic <i> and </i> tags.


BOLDFACE, UNDERLINE AND ITALICS
BOLD, UNDERLINE , ITALICS
<center> and </center>
Use <center> and </center> tags to put any content in the
center of the page or any table cell.
Example:
(sup) tag
<sup> and </sup>
• Adding exponential values to equations.
• Adding the st, nd, rd, and th suffixes to numbers such as dates.
•Example : 31 <sup> st </sup>.
• The output : 31st
(sub) tag
<sub> and </sub>

•Example: log <sub> 2 </sub>

•The output : Log2


big tag
• The content of the <big> element is displayed one font size
larger than the rest of the text surrounding it.
•Example : H <big> TM </big> L
•The output: HTML
Small tag
• The content of the <small> element is displayed one font
size smaller than the rest of the text surrounding it.

•Example: H <small> TM </small> L

•The output : HTML


Comments tag
• We can leave notes in the source document for yourself and
others by marking them up as comments.
• Anything we put between comment tags will not display in the
browser and will not have any effect on the rest of the source.

• Example:

<! -- This is a comment -->


<! -- This is a multiple-line comment that ends here -->

You might also like