Text Formatting.

Html Text Formatting

Html Text Formatting.

Bold (<strong>) and italic (<em>) text

You may use bold and italics to format written paragraph text, section, header, or title text, and web page text information at every level of HTML web page design using the tag element. These html elements are used to give straightforward web page content a significant bold and italic font impact.

Text Formatting.

Therefore, let’s bold and italicize a short paragraph of text on a web page in HTML.

Html Bold text tag (<strong>).

You may make any paragraph, segment, or piece of information bold by using the html “<strong>” tag element. Strong tags are typically used to text on certain web pages. which you want to emphasize or give the highest level of priority.

Strong tag example.

<p>This is a simple paragraph</p>

<p>This is a simple paragraph<strong>but this is a bold text </strong> paragraph </p>

In this example, “bold” text will be displayed in the paragraph text font style along with ordinary paragraph text.

Strong Tag Example.

<!DOCTYPE html>

<html>

  <head>

    <title>Paragraph tag example</title>

    <link rel=”stylesheet” href=”styles.css” />

  </head>

  <body>

      <h1 class=”title”>Simple paragraph preview </h1>

     <p>This is simple paragraph</p>

     <p>This is a simple paragraph<strong> but this is a bold text </strong>paragraph</p>

  </body>

</html>

Html Italic text.

To turn a straightforward HTML paragraph block italic, use the <em> element. The html em element is used to italicize plain text so that online viewers would notice it. HTML paragraph content that is italicized skews significantly to one side from regular website paragraph text. The significance of a certain text or piece of information on a website is shown by italic text.

Here is a straightforward HTML text that has been highlighted.

<p>This is a simple paragraph text</p>

<p>This is a paragraph with <em>italic text</em> effect</p>

The word “italic text” from an HTML web page is shown in italicized font order in this example.

You should keep in mind that the HTML <strong> and <em> tags are intended for semantic coding of web pages, while you may actually apply these visual styles (bold or italic fonts) in web browsers or CSS (Cascading Style Sheets). This makes it simple to deploy text and information to several web pages. For repeated adjustments using css on your web page, css in html is more beneficial.

Italic Tag Example.

<!DOCTYPE html>

<html>

  <head>

    <title>Italic Paragraph tag example</title>

    <link rel=”stylesheet” href=”styles.css” />

  </head>

  <body>

      <h1 class=”title”>Simple Italic paragraph preview </h1>

     <p>This is a simple paragraph text</p>

<p>This is a paragraph with <em>italic text</em> effect</p>

  </body>

</html>

If you can display simple html paragraph text in bold and italic format using css.

<style>

  strong {

    font-weight: bold;

  }

  em {

    font-style: italic;

  }

</style>

To do this, with inline or external CSS, the <strong> tag will always render its content in bold font, and the <em> tag will render its html text information content in italicized font.

Underlining text (<u>)

If you want to add the impression of an underlined paragraph to a straightforward HTML web page. So, using the <u> HTML tag, underline the content in the following paragraph. In HTML, the underlining text is typically rarely utilized much because it nearly always appears as linked text. For web page text, you may typically get the required view impact by using alternative styling methods, such as CSS.

So, let’s highlight a little section of plain HTML text.

<p>This is a simple paragraph text</p>

<p>This is a text with<u> underlined</u> effect</p>

Here in this example, the word “underline” will be displayed with the underline html tag effect.

Underline Tag Example.

<!DOCTYPE html>

<html>

  <head>

    <title>Underline Paragraph tag example</title>

    <link rel=”stylesheet” href=”styles.css” />

  </head>

  <body>

      <h1 class=”title”>Simple Underline paragraph preview </h1>

     <p>This is a simple paragraph text</p>

<p>This is a text with<u> underlined </u> effect</p>

  </body>

</html>

Bold text(<b>)

Any plain-looking HTML text on a web page can be made bold by using the <b> element. To indicate that the typed html content is shown in bold font format, use the <b> tag in HTML. Older HTML 4 versions utilized it. However, there is no unique tag meaning like the <strong> tag in HTML 5.

So let’s use the bold element in HTML to make a basic text bold.

<p>This is a simple paragraph text</p>

<p>This is a paragraph <b> with bold text </b> effect</p>

In the above example, the words “With bold text” are shown in bold font.

Bold and Italic Tag Example.

<!DOCTYPE html>

<html>

  <head>

    <title>Bold and italic Paragraph tag example</title>

    <link rel=”stylesheet” href=”styles.css” />

  </head>

  <body>

      <h1 class=”title”>Simple Bold and Italic paragraph preview </h1>

      <p>1. Bold Html tag</p>

     <p>This is a simple paragraph text</p>

<p>This is a paragraph <b> with bold text </b> effect</p>

<p>2. Italic Html Tag</p>

<p>This is a simple paragraph text</p>

<p>This is a paragraph <b> with italic text </b> effect</p>

  </body>

</html>

Superscript (<sup>) and subscript (<sub>) text

If you wish to show text in an HTML web page above and below regular text. Therefore, you may produce superscript text (text that appears above the regular baseline) using the <sup> html tag element, and subscript text (text that appears below the normal baseline) using normal text. You may do this by using the <sub> HTML tag element. These html tag elements are often used for mathematical formula previews, scientific chemical formulas, copyrights, registered trademarks, symbols, footnotes, and other conditions on a particular html web page.

Let’s utilize a superscript html element on a web page that uses HTML.

Html Superscript text (<sup>).

To make any html paragraph text superscript text, you use the <sup> tag element.

Example.

<p>This is a <sup>mitacaemys.com</sup> text display as superscript format </p>

In this example, the words “mitacaemys.com” will display above the normal text baseline.

Html Subscript text (<sub>).

To make any simple html paragraph text in subscript text format, you use the <sub> html tag element.

Example.

<p>This is a <sub>mitacaemys.com</sub> text display as subscript format</p>

In this example, the words “mitacaemys.com” will display below the normal text baseline.

Superscript and subscript html tag example.

<!DOCTYPE html>

<html>

  <head>

    <title>Superscript and subscript tag example</title>

    <link rel=”stylesheet” href=”styles.css” />

  </head>

  <body>

      <h1 class=”title”>Superscript and subscript paragraph preview </h1>

      <p><strong>Superscript Html Tag Example</strong></p>

      <p>This is a <sup>mitacaemys.com</sup> text display as superscript format </p>

      <p><strong>Subscript Html Tag Example</strong></p>

      <p>This is a <sub>mitacaemys.com</sub> text display as subscript format</p>

      <h3>Some of the professional sup and sub tag example</h3>

      <p>a<sup>2</sup>-b<sup>2</sup>=(a-b) (a+b) </p>

      <p>H<sub>2</sub>O</p>

  </body>

</html>

Rate this post

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top