Block-level Tags in HTML
Primary Block-level Tags
Block-level Tags are generally used for a particular block of content in a Webpage of HTML. Block-level markup elements appear on the webpage as if they have a line break before and after the content. A Block-level markup element covers the whole horizontal area of its parent markup element (container), and the vertical area is equal to the height of its contents, by creating a "block". Browsers generally display the block-level markup element with a new line before and after the markup element.
Tags | Description |
---|---|
<p> | Define a Paragraph |
<h1> to <h6> | Defines the HTML Headings |
<br> | Insert a Single line Break |
<blockquote> | It specifies a section that is quoted from another source. A browser usually indents this element. |
<pre> | It is used for indicating performed text |
<address> | It provides contact information for a document. The text in this element usually renders in italics. |
<hr> | This tag represents a horizontal rule. It is used to separate content in an HTML page. |
In Block-level Tags, there are many tags such as Paragraph tag <p> defines a paragraph. HTML defines six levels of headings like H1, H2, H3, H4, H5, and H6 with H1 being the highest level and H6 being the least level.
So let's take a look at the example...
Example :
<!DOCTYPE html>
<html>
<head>
<title> Block-level Tags in HTML </title>
</head>
<body>
<h1>This is a Heading Tag</h1> <!--This tag is used for Headings-->
<hr> <!-- This tag is used to draw a Horizontal line -->
<p>This is a Paragraph Tag</p> <!--This tag defines the text as a part of paragraph-->
<br> <!--This is a break tag to break the line-->
<blockquote> This is a Blockquote Tag</blockquote> <!--It gives the Indentation -->
<br>
<address>This is a Address Tag</address> <!--It generally display Text in Italic-->
</body>
</html>
Output :
In the above program, we can see, that all the Primary Block-level Tags can be used to perform specific operations. The program also defines every Block-level tag through the comments.
So, now it's time to end the session. See you guys Next Time, stay tuned for further updates on HTML Programming Languages...!!!
I hope, our website will definitely help you to improve your Programming Skills and Knowledge.
Thanks for Visiting...!!!
0 Comments
Please do not add Any Spam link in Comments !