<!DOCTYPE html>:- Purpose: Defines the document type and version of HTML.
- Example:
<!DOCTYPE html>
<html>:- Purpose: Wraps the entire HTML document.
- Example:
<html>...</html>
<head>:- Purpose: Contains meta-information about the HTML document.
- Example:
<head>...</head>
<title>:- Purpose: Sets the title of the HTML document.
- Example:
<title>My Web Page</title>
<body>:- Purpose: Contains the content of the HTML document.
- Example:
<body>...</body>
<h1> to <h6>:- Purpose: Defines headings (h1 is the largest, h6 is the smallest).
- Example:
<h1>This is a Heading</h1>
<p>:- Purpose: Defines a paragraph.
- Example:
<p>This is a paragraph.</p>
<a>:- Purpose: Creates hyperlinks.
- Example:
<a href="https://example.com">Visit Example.com</a>
<img>:- Purpose: Embeds images.
- Example:
<img src="image.jpg" alt="Description">
<ul>and<li>:- Purpose: Creates an unordered list and list items.
- Example:
<ul><li>Item 1</li><li>Item 2</li></ul>
These are just a few examples, and HTML includes many more tags for various purposes.
Riya Answered question December 19, 2023
HTML tags are the keywords on a web page that define how your web browser must format and display your web page. Almost all tags contain two parts, an opening, and a closing tag.
Sandhya Answered question June 23, 2023
