Blog Image

HTML Tags Explained: Structure Your Web Pages with Ease

 


HTML (HyperText Markup Language) is the standard language used to create web pages. It uses tags to structure content. Each HTML tag tells the browser how to display the content enclosed within it.


What is an HTML Tag?


HTML tags are keywords surrounded by angle brackets (< >).


Most tags come in pairs: an opening tag and a closing tag.


Example: <p> for opening and </p> for closing.


The closing tag is usually the same as the opening tag, but with a forward slash (/).


 


Commonly Used HTML Tags


1. <html>: The root tag that defines the whole HTML document.



2. <head>: Contains metadata, like the title and links to CSS.



3. <title>: Sets the page title that appears in the browser tab.



4. <body>: Encloses the content visible on the page.



5. <h1> to <h6>: Headings, with <h1> being the largest and <h6> the smallest.



6. <p>: Defines a paragraph.



7. <a>: Creates a hyperlink. Example: <a href="https://example.com">Click Here</a>.



8. <img>: Embeds an image. Example: <img src="image.jpg" alt="Description">.



9. <ul> and <li>: Creates an unordered list (<ul>) with list items (<li>).



10. <div>: Defines a block section of the page, useful for layout.


 


* Self-Closing Tags


Some tags don’t need a closing tag and are self-contained:


<br>: Inserts a line break.


<img>: Displays an image.


Questions:



1.What is HTML?
2.What is TAG?
3.Which Tag is the root element of HTML document?
4.Which tags are used to define paragraph in HTML?
5.What are self closing TAG?

Author Photo

Shreyash Yelmar

Batch Number: Batch-13