- The HTML Comment are describe the extra feature about the tags.
Syntax to give the comments in HTML:
<!- – Write your comments here – ->
Note: Comment is not show by the browser, but they can help to understand the HTML source code.
First Program in HTML
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <!-- This is a comment --> <h4>This is a Heading</h4> <p>This is a paragraph.</p> </body> </html>
This is a HeadingThis is a paragraph.
What is Empty Tag?
The empty tag means that it has no end tag(Closing tag).
Example of HTML Empty Tag
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h4> BR tag </h4> <p>If you want to break a line <br> in a paragraph, </p> <h4>HR Tag</h4> <p><hr>HR tag is used to draw a horizontal line</p> </body> </html>
BR tagIf you want to break a line in a paragraph.
HR tag is used to draw a horizontal line.