0% found this document useful (0 votes)
2 views

HTML_Tags_Assignment

HTML tags are essential components of web pages that define various elements such as headings, paragraphs, and images. The document outlines basic, formatting, hyperlink, list, table, form, semantic, and self-closing tags, along with their uses. Additionally, it explains the purpose of comments in HTML for documentation purposes.

Uploaded by

zeguslive
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

HTML_Tags_Assignment

HTML tags are essential components of web pages that define various elements such as headings, paragraphs, and images. The document outlines basic, formatting, hyperlink, list, table, form, semantic, and self-closing tags, along with their uses. Additionally, it explains the purpose of comments in HTML for documentation purposes.

Uploaded by

zeguslive
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Understanding HTML Tags

1. What Are HTML Tags?


HTML tags are the building blocks of web pages. They define elements such as headings,
paragraphs, links, images, and more. Tags usually come in pairs: an opening tag (e.g., <p>)
and a closing tag (e.g., </p>).

2. Basic Tags and Their Use


<html>, <head>, <body> – Define the structure of an HTML document.

<title> – Sets the title of the web page (shown in the browser tab).

<h1> to <h6> – Define headings, where <h1> is the largest and <h6> is the smallest.

<p> – Defines a paragraph of text.

<br> – Inserts a line break.

<hr> – Inserts a horizontal rule (line).

3. Formatting Tags
<b>, <strong> – Make text bold.

<i>, <em> – Make text italic.

<u> – Underlines text.

<mark> – Highlights text.

4. Hyperlink and Image Tags


<a href="https://example.com"> – Creates a hyperlink.

<img src="image.jpg" alt="Description"> – Displays an image.

5. List Tags
<ul> – Creates an unordered (bulleted) list.

<ol> – Creates an ordered (numbered) list.

<li> – Defines a list item.


6. Table Tags
<table> – Creates a table.

<tr> – Table row.

<td> – Table data/cell.

<th> – Table header.

7. Form Tags
<form> – Defines an HTML form.

<input> – Creates an input field.

<label> – Defines a label for input elements.

<textarea> – Multi-line text input.

<button> – Clickable button.

8. Semantic Tags
<header>, <footer>, <article>, <section>, <nav> – Provide meaning to the structure of the
document.

9. Self-Closing Tags
Tags like <br>, <hr>, and <img> do not need a closing tag. They are self-contained.

10. Comments in HTML


<!-- This is a comment --> – Comments are ignored by the browser and are used for
documentation.

You might also like