Basic HTML Tags
Every HTML page starts with a <!DOCTYPE html> declaration, followed by the <html> root element. Below are the most commonly used tags with examples.
Tag Reference Table
| Tag | Description | Example |
|---|---|---|
| <h1> to <h6> | Headings from largest (h1) to smallest (h6) | <h1>Hello</h1> |
| <p> | Defines a paragraph of text | <p>Some text</p> |
| <a> | Creates a hyperlink to another page or section | <a href="url">Link</a> |
| <img> | Embeds an image (self-closing tag) | <img src="pic.jpg" alt="desc"> |
| <ul> / <ol> | Unordered (bulleted) or ordered (numbered) list | <ul><li>Item</li></ul> |
| <li> | List item inside <ul> or <ol> | <li>First item</li> |
| <table> | Creates a table with rows and cells | <table><tr><td>Data</td></tr></table> |
| <div> | A block-level container for grouping content | <div>...</div> |
| <span> | An inline container for styling parts of text | <span>text</span> |
| <button> | A clickable button | <button>Click</button> |
| <br> | Inserts a single line break | Line1<br>Line2 |
| <hr> | Horizontal rule (thematic break) | <hr> |
Ready-to-Copy Snippets
Headings & Paragraph
<h1>Main Title</h1> <h2>Subtitle</h2> <p>This is a paragraph.</p>
Links & Images
<a href="https://example.com">
Visit Example
</a>
<img src="photo.jpg"
alt="My Photo">
Lists
<ul> <li>Apple</li> <li>Banana</li> </ul> <ol> <li>First</li> <li>Second</li> </ol>
Tables
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>Amey</td>
<td>25</td>
</tr>
</table>
Big Live Compiler
100% FREE • No Backend
Edit HTML, CSS, or JS below — click Run Code (or press Ctrl + Enter) to see the output instantly.
Live Preview — output appears here
Help Desk
Need assistance? Reach out to us through our official channels.