Paragraph Tags, Text Formatting, Line Break, HTML attributes in HTML

 Paragraph Tag:

          Paragraph Tags is used for creating paragraph



<!DOCTYPE html>
    <html>
        <head>
            <title></title>
        </head>
        <body>
            <p>This is a Paragraph</p>
        </body>
    </html>




Text Formatting Tags:

  •  <b>  =>  Bold Text
  • <big>  =>  Big Text
  • <i>  =>  Italic Text
  • <small>  =>  Small Text
  • <Strong>  =>  Strong Text
  • <sub>  =>  Subscripted Text
  • <sup>  =>  Superscripted Text  
  • <ins>  =>  Inserted Text
  • <del>  => Deleted Text


<!DOCTYPE html>
    <html>
        <head>
            <title></title>
        </head>
        <body>
            <p><b>Good Morning</b></p>
            <p><big>Good Morning</big></p>
            <p><i>Good Morning</i></p>
            <p><small>Good Morning</small></p>
            <p><strong>Good Morning</strong></p>
            <p>H<sub>2</sub>O</p>
            <p>5x<sup>2</sup></p>
            <p><ins>Good Morning</ins></p>
            <p><del>Good Morning</del></p>
           
           
        </body>
    </html>



Line Break:

          <br> is used to break the line.  It has no end tag.

<!DOCTYPE html>
    <html>
        <head>
            <title></title>
        </head>
        <body>
            <p>There are eight planets <br> in our solar system</p>
        </body>
    </html>



HTML attributes:

            Attributes provides additional information about an element or a tag, while also modifying them. Most attributes have a value; the value modifies the attributes.


<!DOCTYPE html>
    <html>
        <head>
            <title></title>
        </head>
        <body>
            <p align="center">Good Morning</p>
        </body>
    </html>


The value of "center" indicates that the content within the p element should be aligned to the center.


     Attributes are always specified in the start tag, and they appear in name = "value" pairs.

width attribute:

          This attribute is used for adjusting a width.

For Example:


<!DOCTYPE html>
    <html>
        <head>
            <title></title>
        </head>
        <body>
            <p align="center">Good Morning</p>
            <hr width="50%">
            <p align="center">Good Night</p>
        </body>
    </html>


Practice in this HTML code editor

//Practice your code here

Post a Comment

Previous Post Next Post