HTML Basic Tags: Paragraph , Bold, Underline, Italic, Line Break tag

 

HTML Tags:

HTML tags are used for the web browser which defines that how web browser will format and display the content. With the help of tags, a web browser can easily distinguish between an HTML content and a simple content. HTML tags contain three main parts: opening tag, content and closing tag.

When a web browser reads an HTML document, browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents. Each HTML tags have different properties.




Paragraph Tag:

The paragraph tag is used to write your text in paragraph format. The <p> tag or "paragraph tag" offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening <p> and a closing </p> tag. We can use different properties in paragraph.


Here’s an example of a paragraph tag:

<!DOCTYPE html>
<html>
   <head>
      <title>Paragraph Example</title>
   </head>
   <body>
      <p>This is a first paragraph of text.</p>
      <p>This is a second paragraph of text.</p>
   </body>
</html>


This will produce the following result −

This is a first paragraph of text.

This is a second paragraph of text.


~ Video ~





Bold Tag:

HTML <b> tag shows the text in bold format. It is strictly a presentational element. If you want to show your text in bold letters then put it within <b>.......</b> tag.

To make text bold in HTML, use the <b>…</b> tag or <strong>…</strong> tag. Both the tags have the same functioning, but <strong> tag adds semantic strong importance to the text. The <b> tag is a physical markup element, but do not add semantic importance.


Here’s an example of a bold tag:

<!DOCTYPE html> 
 
<html> 
 
   <head>
      <title>Bold Example</title>
   </head>

   <body>
      <b>This is a bold letter example.</b>
      <p>We can <b> bold </b> a letter in paragraph tag.</p>
   </body>

</html>


This will produce the following result −


This is a bold letter example.

We can bold a letter in paragraph tag



Line Break Tag:

The <br/> tag is used to break a line, whenever you use the <br /> element, anything following it starts from the next line. This tag is an example of an empty element, where you do not need opening and closing tags, as there is nothing to go in between them.


Here’s an example of a line break tag:


<!DOCTYPE html>

<html>

   <head>
      <title>Line Break  Example</title>
   </head>
   <body>
      <p>Hello<br />
         This is a line break example.<br />
         Thanks<br />
         Decoder</p>
   </body>
</html>


This will produce the following result −

Hello
This is a line break example
Thanks
Decoder



Underline Tag:

To underline a text in HTML, we use the <u> tag. The <u> tag helps to underline a word or a sentence. We can use <u> tag in between of some other tags like <p> tag, <b> tag etc.

Here’s an example of a underline tag:

<html
    <head
        <title>u Tag</title
    </head

    <body
        <u> Tag </u> 
        <p> A <u>computer science</u> student </p
    </body
</html>  


This will produce the following result −

Tag

A computer science student



Italic Tag:

The <i> tag is used to italicise the text. It opens with <i> and ends with </i> tag. When we want to stand out any text from a paragraph we generally use italic tag. We can use <i> tag in between of some other tags like <p> tag, <b> tag etc.

Here’s an example of a italic tag:
<!DOCTYPE html>
<html>

<head>
    <title>Italic</title>
</head>

<body>
        <i> Hello everyone </i>
    <p>I want to be a <i>good programmer</i> for my growth</p>
</body>

</html>

This will produce the following result −

Hello everyone
I want to be a good programmer for my growth



👉👉👉👉💓💓💓 Thank You ðŸ’“💓💓👈👈👈👈


Mr. Safal Sharma 

(M.C.A, Ph.D in Computer Application)


Keep Supporting Me:-
Email: decoderbusiness@gmail.com
Instagram: https://www.instagram.com/safaldecoder/
Facebook: https://www.facebook.com/safal.decoder.1


Comments

Popular posts from this blog

ShayariAndQuotes Privacy Policy

GST Calculator Privacy Policy