0% found this document useful (0 votes)
21 views2 pages

HTML Text Formatting Elements Guide

The document describes various HTML elements for formatting text, including tags for headings, lines, italics, bold, paragraphs, images, and links. Elements like <span> and <div> can apply inline or block-level styling. Attributes specify styling options like colors, sizes, and whether links open in the same or new tabs. Overall, the document provides an overview of common HTML elements for formatting and styling text on a page.

Uploaded by

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

HTML Text Formatting Elements Guide

The document describes various HTML elements for formatting text, including tags for headings, lines, italics, bold, paragraphs, images, and links. Elements like <span> and <div> can apply inline or block-level styling. Attributes specify styling options like colors, sizes, and whether links open in the same or new tabs. Overall, the document provides an overview of common HTML elements for formatting and styling text on a page.

Uploaded by

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

1.

<mark> is used to highlight the text </mark>


2. <br> line break</br>
3. <h1>1st header </h1>
4. <h2>2nd header</h2>
5. <h3>3rd header</h3> and so on... with every h1,h2,h3 the size decreases
6. <ins>used to underline a text</ins>
7. <del> use to scratch a delete line above a text</del>
8. <i> to convert text to italic font</i>
9. <b> to convert text to BOLD look</b>
10.<p> to create paragraph</p>
11.<hr/> to make a line in between to text
12.<strong> Highlights the text to Bold </strong>

<span style="background-color: red;">This is the first line of text</span>


<span style="background-color: green;">This is the second line of
text</span>
<div style="background-color: red; width: 800px;">This is the first line of
text</div>
<span style="background-color: green;">This is the second line of
text</span>

13 and 14 is printed in same line as INLINE Element


Where as 15 and 16 is printed in Different Line As BLOCK Element
Span same line
Div is new Line.

13.<img src= image file [Link] width= height= alt=to


show the text where image cannot be displayed />
Width and height is use to set the height and width of image.
14.<em> Emphasized text</em>
15.<small> reduced the size of the text </small>

This one is imp.


<body bgcolor="lightblue">
<p align="right">
<font face="Consolas" size="62px" color="purple">
<strong>Demo</strong> <em>Text</em>
</font>
<center>
Sample Text
</center>
</p>
</body>

<a href="[Link] target="_self" rel="author">Go to [Link]</a>


<br />
<a href="[Link] target="_blank" rel="help">Go to
Microsoft</a>
_self is used to open the page in the same tab
_blank is used to open the page in a new tab.
There are a wide variety of elements that you can use in HTML to format your text blocks. A
sample of these elements is listed below.

Format Markup Result

Bold <b> Bold Text

Strong <strong> Strong Text

Italic <i> Italic Text

Emphasized <em> Emphasized Text

Small <small> Small Text

Marked <mark> Marked Text

Deleted <del> Deleted Text

Inserted <ins> Inserted Text

Subscript <sub> Subscript Text

Superscript <sup> Superscript


Text

You might also like