0% found this document useful (0 votes)
3 views6 pages

Essential HTML Tags and Functions

This document provides a comprehensive list of HTML tags along with their functions and examples. Each tag is described with a one-line function, demonstrating its purpose in web development. The tags include elements for text formatting, links, images, lists, tables, forms, and multimedia content.

Uploaded by

Sumit Sharma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Essential HTML Tags and Functions

This document provides a comprehensive list of HTML tags along with their functions and examples. Each tag is described with a one-line function, demonstrating its purpose in web development. The tags include elements for text formatting, links, images, lists, tables, forms, and multimedia content.

Uploaded by

Sumit Sharma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

### List of HTML Tags with One-Line Functions and Examples

1. **<p>**: Defines a paragraph.

- Example:

<p>This is a paragraph.</p>

2. **<h1> to <h6>**: Define headings, where <h1> is the largest and <h6> is the smallest.

- Example:

<h1>This is a heading</h1>

3. **<a>**: Creates a hyperlink.

- Example:

<a href="[Link] here</a>

4. **<img>**: Embeds an image.

- Example:

<img src="[Link]" alt="Example Image">

5. **<br>**: Inserts a line break.

- Example:

Line 1<br>Line 2

6. **<hr>**: Creates a horizontal rule.

- Example:

<hr>
7. **<ul> and <li>**: Create an unordered list.

- Example:

<ul>

<li>Item 1</li>

<li>Item 2</li>

</ul>

8. **<ol> and <li>**: Create an ordered list.

- Example:

<ol>

<li>First item</li>

<li>Second item</li>

</ol>

9. **<table>**: Defines a table.

- Example:

<table>

<tr>

<td>Row 1, Column 1</td>

<td>Row 1, Column 2</td>

</tr>

</table>

10. **<form>**: Creates an HTML form.

- Example:

<form action="[Link]">

<input type="text" name="name" placeholder="Enter your name">


</form>

11. **<input>**: Creates an input field.

- Example:

<input type="text" placeholder="Enter your name">

12. **<button>**: Creates a clickable button.

- Example:

<button>Click me</button>

13. **<div>**: Defines a division or section.

- Example:

<div>This is a div.</div>

14. **<span>**: Defines an inline container.

- Example:

<span style="color: red;">This is red text.</span>

15. **<strong>**: Makes text bold.

- Example:

<strong>This is bold text.</strong>

16. **<em>**: Emphasizes text (italicized).

- Example:

<em>This is italic text.</em>

17. **<blockquote>**: Defines a blockquote.


- Example:

<blockquote>This is a quote.</blockquote>

18. **<code>**: Displays code snippets.

- Example:

<code>[Link]('Hello, world!');</code>

19. **<script>**: Embeds or references JavaScript.

- Example:

<script>alert('Hello, world!');</script>

20. **<style>**: Embeds CSS styles.

- Example:

<style>body { background-color: lightblue; }</style>

21. **<header>**: Defines a header section.

- Example:

<header>Welcome to my website</header>

22. **<footer>**: Defines a footer section.

- Example:

<footer>&copy; 2024 My Website</footer>

23. **<nav>**: Defines navigation links.

- Example:

<nav>

<a href="#">Home</a>
<a href="#">About</a>

</nav>

24. **<main>**: Defines the main content.

- Example:

<main>This is the main content.</main>

25. **<section>**: Defines a section of a document.

- Example:

<section>This is a section.</section>

26. **<article>**: Defines an independent article.

- Example:

<article>This is an article.</article>

27. **<aside>**: Defines content aside from the main content.

- Example:

<aside>This is a sidebar.</aside>

28. **<audio>**: Embeds audio content.

- Example:

<audio controls>

<source src="audio.mp3" type="audio/mpeg">

</audio>

29. **<video>**: Embeds video content.

- Example:
<video controls>

<source src="video.mp4" type="video/mp4">

</video>

30. **<canvas>**: Used for drawing graphics via JavaScript.

- Example:

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #000;"></canvas>

### Summary

These HTML tags form the foundation of web development, each serving a unique purpose to

structure and style content effectively.

You might also like