| HTML Reference Hub |
HTML Paragraphs |
HTML Paragraph TagThe HTML <p> tag is used to create paragraphs on a webpage. A paragraph contains a block of text that is separated from other content by automatic spacing. Paragraphs help organize information, making webpages easier to read and understand. Browsers automatically add a small margin before and after each paragraph. Syntax
<p>
This is a paragraph.
</p>
Example
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>
</body>
</html>
OutputThis is the first paragraph. This is the second paragraph. HTML Line Break (<br>)The <br> tag is used to insert a line break without starting a new paragraph. It is useful for writing poems, addresses, or content that requires a new line. Syntax<br> ExampleHello<br> Welcome to HTML<br> Learning Output
Hello HTML Horizontal Line (<hr>)The <hr> tag is used to create a horizontal line across the webpage. It is commonly used to separate different sections of content. Syntax<hr> Example<p>HTML Tutorial</p> <hr> <p>CSS Tutorial</p> OutputHTML Tutorial CSS Tutorial HTML CommentsHTML comments are used to write notes inside the HTML code. Comments are ignored by web browsers and are not displayed on the webpage. They help developers understand and maintain the code. Syntax<!-- This is a comment --> Example<!-- Website Header --> <h1>Welcome</h1> <!-- End of Header --> Best Practices
|