HTML Text Formatting


In this tutorial of 'HTML Simplified Series', we will learn text formatting. This means how we can bold, italic, underline, etc. the text.

This will be the main template to apply our code to execute, we will write our source code inside the body tag and will see the result.


index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Text Formatting in HTML</title>
</head>
<body>

    <!-- Our content will goes here -->

</body>
</html>


Now, let's start with learning Text Formatting in HTML.

Text Formatting tags in HTML

  • Text formatting tags are used to format the text of HTML documents.

  • These are mainly used to display the text in a special type.


1). Bold

<b> tag is used to bold the text.

<p> In the paragraph <b>This is bold</b></p>

Output: In the paragraph This is bold


2). Strong

<strong> tag is also used to bold but it is used to give more importance to the text as compared to bold text.

This is <strong> Special strong text </strong>

Output: This is Special strong text


3). Italic

<i> tag is used to italic the text.

<i> This is an italic text </i>

Output: This is an italic text


4). Emphasized

<em> defines the emphasized text. The text within <em> tag interacts like the <i> tag.

<em> This is emphasized text </em>

Output: This is emphasized text


5). Underline

<u> is used to underline the text. This will create a horizontal line under the text.

<u> Text with underline </u>

Output: Text with underline


6). Delete

<del> tag is used to define the deleted text. Basically, this will place a line in the middle of the text.

<p> In my paragraph <del> This is Deleted </del></p>

Output: In my paragraph This is Deleted


7). Insert

<ins> defines a text that has been inserted into the document.

<p> This is an <ins> inserted </ins></p>

Output: This is an inserted


HTML Text Formatting Cheatsheet PDF Download

Download Now



Post a Comment

1 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
  1. Please teach me more on HTML and css

    ReplyDelete

Top Post Ad

Below Post Ad