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 ~
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 −
HelloThis is a line break example
Thanks
Decoder
Underline Tag:
Here’s an example of a underline tag:
Comments
Post a Comment