HTML Text Formating

HTML Text Formating


HTML provides various ways to format text, including headings, paragraphs, lists, bold and italic text, and more. In this tutorial, we will explore some of the common HTML text formatting tags and their usage.

Headings

Headings are used to create titles or subtitles for a page or section of a page. HTML provides six levels of headings, from <h1> to <h6>. <h1> is the largest and most important heading, while <h6> is the smallest.


HTML Code:

Paragraphs

Paragraphs are used to group together related text. To create a paragraph, use the <p> tag:

HTML Code:

Lists

HTML provides two types of lists: ordered lists and unordered lists.

Ordered Lists

Ordered lists are used to present a sequence of items in a numbered format. To create an ordered list, use the <ol> tag, and add each item as a <li> (list item) within the <ol>:

HTML Code:

Unordered Lists

Unordered lists are used to present a sequence of items in a bulleted format. To create an unordered list, use the <ul> tag, and add each item as a <li> (list item) within the <ul>:

HTML Code:

Links

Links are used to link to other web pages. To create a link, use the <a> tag, and add the link address in the href attribute:


Images

Images are used to add visual content to a web page. To add an image, use the <img> tag, and add the image address in the src attribute:

HTML Code:

Tables

Tables are used to present data in a tabular format. To create a table, use the <table> tag, and add each row as a <tr> (table row) within the <table>:

HTML Code:

Forms

Forms are used to collect user input. To create a form, use the <form> tag, and add each input field as a <label> (label) and <input> (input field) within the <form>:

HTML Code:

Conclusion

HTML provides a variety of text formatting options to make your content more visually appealing and easy to read. By using the tags discussed in this tutorial, you can create headings, paragraphs, lists, bold and italic text, links, and images in your HTML documents.