Thumb

HTML Text Formatting

1/29/2020 6:35:49 AM

In this section we will learn how to format text and also how-to stile our font or text. When we use font family, we can style our font or text on the other hand we can use the tag to style our font. Like ‘i’ tag style our font italic. If I want to use inner style, we can do it. Text formatting means our text or our font how to represent on our browser we can set it. Now some text style code given bellow and explain the code:

<!DOCTYPE html>
<html>
      <head>
      	<title>This is HTML</title>
      </head>
      <body>
      <!--HTML Text Formatting-->
<div style="text-align: center;">
  <p style="color: green">Hey, myself Farhan Sakib Jesy.<sub> Web Designing</sub> & Developing is<sup> my Passion.</sup></p>
 <i style="font-size: 24px">Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion.</i>
<p>
  <b>Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion.</b>
</p>
<p>
  <mark>Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion.</mark>
</p>
<p>
  <strong>Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion.</strong>
</p>
<p>
  <del>Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion.</del>
</p>

<p>
  <ins>Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion.</ins>
</p>
<p>
  <em>Hey, myself Farhan Sakib Jesy. Web Designing & Developing is my Passion.</em>
</p>
</div>
      </body>
</html>

Output:

In this code we write some text format by using tag. But we can also use style attribute to style the text. We can our output the deferent text format. We can use font family and also change the text style and font size.