Article Title
This is the content of the article.
Published on December 28, 2024
The <a> tag defines a hyperlink.
<!DOCTYPE html>
<html>
<head>
<title>Link Example</title>
</head>
<body>
<a href="https://www.example.com">Visit Example Website</a>
</body>
</html>
The <abbr> tag defines an abbreviation or acronym.
<!DOCTYPE html>
<html>
<head>
<title>Abbreviation Example</title>
</head>
<body>
<p>The <abbr title="World Health Organization">WHO</abbr>
was founded in 1948.</p>
</body>
</html>
The WHO was founded in 1948.
The <address> tag defines contact information for the author/owner of a document.
<!DOCTYPE html>
<html>
<head>
<title>Address Example</title>
</head>
<body>
<address>
Written by BLANK<br>
Visit us at:<br>
Example.com<br>
Box 69, SYDNEY<br>
UK
</address>
</body>
</html>
The <article> tag specifies independent, self-contained content.
<!DOCTYPE html>
<html>
<head>
<title>Article Example</title>
</head>
<body>
<article>
<h2>Article Title</h2>
<p>This is the content of the article.</p>
<p>Published on December 28, 2024</p>
</article>
</body>
</html>
This is the content of the article.
Published on December 28, 2024
The <aside> tag defines content aside from the page content.
<!DOCTYPE html>
<html>
<head>
<title>Aside Example</title>
</head>
<body>
<p>Main content here.</p>
<aside>
<h4>Sidebar</h4>
<p>This is additional information.</p>
</aside>
</body>
</html>
Main content here.
The <audio> tag defines sound content.
<!DOCTYPE html>
<html>
<head>
<title>Audio Example</title>
</head>
<body>
<audio controls>
<source src="audio.mp3" type="audio/mpeg">
<source src="audio.ogg" type="audio/ogg">
Your browser does not support the audio element.
</audio>
</body>
</html>
The <b> tag specifies bold text.
<!DOCTYPE html>
<html>
<head>
<title>Bold Text Example</title>
</head>
<body>
<p>This is <b>bold text</b>.</p>
</body>
</html>
This is bold text.
The <base> tag specifies the base URL for all relative URLs in a document.
<!DOCTYPE html>
<html>
<head>
<base href="https://www.example.com/images/">
<title>Base Example</title>
</head>
<body>
<img src="picture.jpg" alt="My Picture">
<!-- Will look for picture at https://www.example.com/images/picture.jpg -->
</body>
</html>
Base tag affects relative URLs in the document
(No visible output - affects URL resolution)
The <bdi> tag isolates text that might be formatted in a different direction.
<!DOCTYPE html>
<html>
<head>
<title>BDI Example</title>
</head>
<body>
<p>User <bdi>Joe</bdi>: 90 points</p>
<p>User <bdi>John</bdi>: 80 points</p>
</body>
</html>
User joe: 90 points
User John: 80 points
The <bdo> tag overrides the current text direction.
<!DOCTYPE html>
<html>
<head>
<title>BDO Example</title>
</head>
<body>
<p>Normal text</p>
<p><bdo dir="rtl">This text will go right to left</bdo></p>
</body>
</html>
Normal text
This text will go right to left
The <blockquote> tag specifies a section that is quoted from another source.
<!DOCTYPE html>
<html>
<head>
<title>Blockquote Example</title>
</head>
<body>
<blockquote cite="http://www.example.com">
This is a long quotation that needs to be set apart from other content.
</blockquote>
</body>
</html>
This is a long quotation that needs to be set apart from other content.
The <canvas> tag is used to draw graphics via JavaScript.
<!DOCTYPE html>
<html>
<head>
<title>Canvas Example</title>
</head>
<body>
<canvas id="myCanvas" width="200" height="100"
style="border:1px solid #000;">
Your browser does not support the canvas element.
</canvas>
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(10, 10, 150, 75);
</script>
</body>
</html>
The <cite> tag defines the title of a creative work.
<!DOCTYPE html>
<html>
<head>
<title>Cite Example</title>
</head>
<body>
<p>My favorite book is
<cite>The Great Gatsby</cite>
by F. Scott Fitzgerald.</p>
</body>
</html>
My favorite book is The Great Gatsby by F. Scott Fitzgerald.
The <code> tag defines a piece of computer code.
<!DOCTYPE html>
<html>
<head>
<title>Code Example</title>
</head>
<body>
<p>The <code>print()</code> function outputs text.</p>
<code>
x = 5;
y = 6;
z = x + y;
</code>
</body>
</html>
The print() function outputs text.
x = 5;
y = 6;
z = x + y;
The <data> tag links content with a machine-readable translation.
<!DOCTYPE html>
<html>
<head>
<title>Data Example</title>
</head>
<body>
<p>New Products:</p>
<ul>
<li><data value="398">Mini Dress</data></li>
<li><data value="399">Maxi Dress</data></li>
</ul>
</body>
</html>
New Products:
The <datalist> tag specifies a list of pre-defined options for an input element.
<!DOCTYPE html>
<html>
<head>
<title>Datalist Example</title>
</head>
<body>
<label for="browser">Choose your browser:</label>
<input list="browsers" id="browser" name="browser">
<datalist id="browsers">
<option value="Chrome">
<option value="Firefox">
<option value="Safari">
<option value="Edge">
<option value="Opera">
</datalist>
</body>
</html>
The <del> tag defines text that has been deleted from a document.
<!DOCTYPE html>
<html>
<head>
<title>Deleted Text Example</title>
</head>
<body>
<p>My favorite color is <del>blue</del> red.</p>
<p>Price: <del>USD 50</del> USD 40</p>
</body>
</html>
My favorite color is blue red.
Price: USD 50 USD 40
The <details> tag creates an interactive widget that can be opened or closed.
<!DOCTYPE html>
<html>
<head>
<title>Details Example</title>
</head>
<body>
<details>
<summary>Click to view more information</summary>
<p>This is additional information that can be
hidden or shown.</p>
</details>
</body>
</html>
This is additional information that can be hidden or shown.
The <dfn> tag represents a defining instance of a term.
<!DOCTYPE html>
<html>
<head>
<title>Definition Example</title>
</head>
<body>
<p>
A <dfn>variable</dfn> is a container for
storing data values.
</p>
<p>
<dfn title="HyperText Markup Language">HTML</dfn>
is the standard markup language for creating web pages.
</p>
</body>
</html>
A variable is a container for storing data values.
HTML is the standard markup language for creating web pages.
The <dialog> tag defines a dialog box or window.
<!DOCTYPE html>
<html>
<head>
<title>Dialog Example</title>
</head>
<body>
<dialog open>
<p>This is an open dialog window</p>
<button>Close</button>
</dialog>
</body>
</html>
This is an open dialog window
The <div> tag defines a division or section in an HTML document.
<!DOCTYPE html>
<html>
<head>
<title>Div Example</title>
<style>
.myDiv {
border: 2px solid blue;
padding: 10px;
margin: 5px;
}
</style>
</head>
<body>
<div class="myDiv">
<h2>This is a heading in a div</h2>
<p>This is some text in a div.</p>
</div>
</body>
</html>
This is some text in a div.
The <em> tag defines emphasized text.
<!DOCTYPE html>
<html>
<head>
<title>Emphasis Example</title>
</head>
<body>
<p>This is <em>very</em> important text.</p>
<p>Please <em>do not</em> forget to submit.</p>
</body>
</html>
This is very important text.
Please do not forget to submit.
The <embed> tag defines a container for external content or plugin.
<!DOCTYPE html>
<html>
<head>
<title>Embed Example</title>
</head>
<body>
<embed
src="example.pdf"
type="application/pdf"
width="300"
height="200">
</body>
</html>
The <fieldset> tag groups related form elements.
<!DOCTYPE html>
<html>
<head>
<title>Fieldset Example</title>
</head>
<body>
<form>
<fieldset>
<legend>Personal Information</legend>
<label for="name">Name:</label>
<input type="text" id="name"><br>
<label for="email">Email:</label>
<input type="email" id="email">
</fieldset>
</form>
</body>
</html>
The <figure> tag specifies self-contained content, like illustrations, diagrams, photos, etc.
<!DOCTYPE html>
<html>
<head>
<title>Figure Example</title>
</head>
<body>
<figure>
<img src="image.jpg" alt="Sample Image">
<figcaption>Fig.1 - Sample Image Description</figcaption>
</figure>
</body>
</html>
The <form> tag creates an HTML form for user input.
<!DOCTYPE html>
<html>
<head>
<title>Form Example</title>
</head>
<body>
<form action="/submit" method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="username"><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
The <header> tag defines a header for a document or section.
<!DOCTYPE html>
<html>
<head>
<title>Header Example</title>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
<nav>
<a href="#home">Home</a> |
<a href="#about">About</a> |
<a href="#contact">Contact</a>
</nav>
</header>
</body>
</html>
The <hr> tag creates a horizontal line to divide content.
<!DOCTYPE html>
<html>
<head>
<title>Horizontal Rule Example</title>
</head>
<body>
<p>Text above the line</p>
<hr>
<p>Text below the line</p>
</body>
</html>
Text above the line
Text below the line
The <i> tag defines text in an alternate voice or mood.
<!DOCTYPE html>
<html>
<head>
<title>Italic Text Example</title>
</head>
<body>
<p>Normal text and <i>italic text</i>.</p>
<p><i>Technical terms</i> are often italicized.</p>
</body>
</html>
Normal text and italic text.
Technical terms are often italicized.
The <iframe> tag defines an inline frame for embedding another document.
<!DOCTYPE html>
<html>
<head>
<title>IFrame Example</title>
</head>
<body>
<iframe
src="https://www.example.com"
width="300"
height="200"
title="Example Website">
</iframe>
</body>
</html>
The <img> tag embeds an image in the document.
<!DOCTYPE html>
<html>
<head>
<title>Image Example</title>
</head>
<body>
<img
src="example.jpg"
alt="Example Image"
width="300"
height="200">
<img
src="responsive.jpg"
alt="Responsive Image"
style="max-width: 100%; height: auto;">
</body>
</html>
The <input> tag specifies an input field where the user can enter data.
<!DOCTYPE html>
<html>
<head>
<title>Input Example</title>
</head>
<body>
<form>
<input type="text" placeholder="Text input"><br>
<input type="password" placeholder="Password"><br>
<input type="checkbox"> Checkbox<br>
<input type="radio" name="option"> Radio<br>
<input type="date"><br>
<input type="color"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
The <ins> tag defines text that has been inserted into a document.
<!DOCTYPE html>
<html>
<head>
<title>Insert Example</title>
</head>
<body>
<p>
My favorite color is <del>blue</del>
<ins>green</ins>.
</p>
<p>
Price: <del>USD 50</del>
<ins datetime="2024-12-29">USD 45</ins>
</p>
</body>
</html>
My favorite color is blue
green.
Price: USD 50
USD 45
The <kbd> tag defines keyboard input.
<!DOCTYPE html>
<html>
<head>
<title>Keyboard Input Example</title>
<style>
kbd {
background-color: #eee;
border-radius: 3px;
border: 1px solid #b4b4b4;
padding: 2px 4px;
font-family: monospace;
}
</style>
</head>
<body>
<p>Save: Press <kbd>Ctrl</kbd> + <kbd>S</kbd></p>
<p>Undo: Press <kbd>Ctrl</kbd> + <kbd>Z</kbd></p>
<p>To exit, press <kbd>Alt</kbd> + <kbd>F4</kbd></p>
</body>
</html>
Save: Press Ctrl + S
Undo: Press Ctrl + Z
To exit, press Alt + F4
The <label> tag defines a label for form elements.
<!DOCTYPE html>
<html>
<head>
<title>Label Example</title>
</head>
<body>
<form>
<label for="username">Username:</label>
<input type="text" id="username"><br>
<label>
<input type="checkbox"> Remember me
</label>
</form>
</body>
</html>
The <legend> tag defines a caption for a <fieldset> element.
<!DOCTYPE html>
<html>
<head>
<title>Legend Example</title>
</head>
<body>
<fieldset>
<legend>User Details</legend>
<label for="name">Name:</label>
<input type="text" id="name"><br>
<label for="age">Age:</label>
<input type="number" id="age">
</fieldset>
</body>
</html>
The <link> tag defines relationships between the current document and external resources.
<!DOCTYPE html>
<html>
<head>
<title>Link Example</title>
<link rel="stylesheet" href="styles.css">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<p>This page uses external CSS and has a favicon.</p>
</body>
</html>
This page uses external CSS and has a favicon.
(Link effects are not visible directly)
The <main> tag specifies the main content of a document.
<!DOCTYPE html>
<html>
<head>
<title>Main Example</title>
</head>
<body>
<header>Header content</header>
<main>
<h1>Main Content</h1>
<p>This is the main content area of the page.</p>
</main>
<footer>Footer content</footer>
</body>
</html>
This is the main content area of the page.
The <map> tag defines an image map with clickable areas.
<!DOCTYPE html>
<html>
<head>
<title>Map Example</title>
</head>
<body>
<img src="workplace.jpg" alt="Workplace"
usemap="#workmap" width="400" height="300">
<map name="workmap">
<area shape="rect" coords="34,44,270,350"
alt="Computer" href="computer.htm">
<area shape="circle" coords="337,300,44"
alt="Coffee" href="coffee.htm">
</map>
</body>
</html>
The <mark> tag defines text that should be highlighted.
<!DOCTYPE html>
<html>
<head>
<title>Mark Example</title>
</head>
<body>
<p>This is <mark>highlighted</mark> text.</p>
<p>Search results: The word
<mark>example</mark> was found.</p>
</body>
</html>
This is highlighted text.
Search results: The word example was found.
The <meta> tag provides metadata about the HTML document.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Example page">
<meta name="keywords" content="HTML, CSS, JavaScript">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>Meta Example</title>
</head>
<body>
<p>Meta tags are not visible in the page content.</p>
</body>
</html>
Meta tags are not visible in the page content.
(They provide information to browsers and search engines)
The <meter> tag defines a scalar measurement within a known range.
<!DOCTYPE html>
<html>
<head>
<title>Meter Example</title>
</head>
<body>
<p>
Disk usage: <meter value="0.6">60%</meter>
</p>
<p>
Progress: <meter value="0.8" min="0" max="1">
80%
</meter>
</p>
<p>
Temperature: <meter value="28" min="0" max="100"
low="20" high="80" optimum="25">
28 degrees
</meter>
</p>
</body>
</html>
Disk usage:
Progress:
Temperature:
The <noscript> tag defines alternate content for users who have disabled JavaScript.
<!DOCTYPE html>
<html>
<head>
<title>Noscript Example</title>
</head>
<body>
<script>
document.write("JavaScript is enabled");
</script>
<noscript>
Your browser does not support JavaScript!
</noscript>
</body>
</html>
JavaScript is enabled
(Noscript content would show if JavaScript was disabled)
The <object> tag defines an embedded object within an HTML document.
<!DOCTYPE html>
<html>
<head>
<title>Object Example</title>
</head>
<body>
<object
data="example.pdf"
type="application/pdf"
width="300"
height="200">
<p>Unable to display PDF file.</p>
</object>
<object
data="sample.svg"
type="image/svg+xml"
width="300"
height="200">
<p>Unable to display SVG file.</p>
</object>
</body>
</html>
The <ol> tag defines an ordered list.
<!DOCTYPE html>
<html>
<head>
<title>Ordered List Example</title>
</head>
<body>
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<ol type="A">
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ol>
</body>
</html>
The <optgroup> tag groups related options in a select list.
<!DOCTYPE html>
<html>
<head>
<title>Option Group Example</title>
</head>
<body>
<select>
<optgroup label="European Cars">
<option value="volvo">Volvo</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
<optgroup label="Asian Cars">
<option value="toyota">Toyota</option>
<option value="honda">Honda</option>
<option value="nissan">Nissan</option>
</optgroup>
</select>
</body>
</html>
The <output> tag represents the result of a calculation or user action.
<!DOCTYPE html>
<html>
<head>
<title>Output Example</title>
</head>
<body>
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
<input type="number" id="a" value="0"> +
<input type="number" id="b" value="0"> =
<output name="result" for="a b">0</output>
</form>
</body>
</html>
The <p> tag defines a paragraph.
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
<style>
.highlight { background-color: yellow; }
</style>
</head>
<body>
<p>This is a simple paragraph.</p>
<p class="highlight">
This is a highlighted paragraph with some
important information.
</p>
<p>
Paragraphs can contain multiple lines
and they maintain proper spacing.
</p>
</body>
</html>
This is a simple paragraph.
This is a highlighted paragraph with some important information.
Paragraphs can contain multiple lines
and they maintain proper spacing.
The <param> tag defines parameters for plugins embedded with an object element.
<!DOCTYPE html>
<html>
<head>
<title>Parameter Example</title>
</head>
<body>
<object data="movie.swf">
<param name="autoplay" value="true">
<param name="loop" value="false">
<param name="quality" value="high">
Your browser doesn't support this object.
</object>
<object data="video.mp4">
<param name="controller" value="true">
<param name="autostart" value="false">
Alternative content
</object>
</body>
</html>
The <picture> tag gives web developers more flexibility in specifying image resources.
<!DOCTYPE html>
<html>
<head>
<title>Picture Example</title>
</head>
<body>
<picture>
<source media="(min-width: 650px)"
srcset="img_large.jpg">
<source media="(min-width: 465px)"
srcset="img_small.jpg">
<img src="img_default.jpg"
alt="Default Image"
style="width:auto;">
</picture>
</body>
</html>
The <pre> tag defines preformatted text.
<!DOCTYPE html>
<html>
<head>
<title>Pre Example</title>
</head>
<body>
<pre>
This text
maintains its
formatting
and spaces.
function example() {
console.log("Hello");
}
</pre>
</body>
</html>
This text
maintains its
formatting
and spaces.
function example() {
console.log("Hello");
}
The <progress> tag represents the progress of a task.
<!DOCTYPE html>
<html>
<head>
<title>Progress Example</title>
</head>
<body>
<label for="task">Task progress:</label>
<progress id="task" value="70" max="100">
70%
</progress>
<br><br>
<label for="download">Download progress:</label>
<progress id="download" value="0.3">
30%
</progress>
</body>
</html>
The <q> tag defines a short quotation.
<!DOCTYPE html>
<html>
<head>
<title>Quote Example</title>
</head>
<body>
<p>The professor said:
<q>Learning HTML is fun!</q></p>
<p>According to Mozilla:
<q cite="https://www.mozilla.org/">
The Web is amazing!</q>
</p>
</body>
</html>
The professor said: Learning HTML is fun!
According to Mozilla: The Web is amazing!
The <ruby> tag specifies a ruby annotation (for East Asian typography).
<!DOCTYPE html>
<html>
<head>
<title>Ruby Example</title>
</head>
<body>
<ruby>
漢 <rt>かん</rt>
字 <rt>じ</rt>
</ruby>
<ruby>
明日 <rt>あした</rt>
</ruby>
</body>
</html>
The <samp> tag defines sample output from a computer program.
<!DOCTYPE html>
<html>
<head>
<title>Sample Output Example</title>
</head>
<body>
<p>Message from computer:</p>
<samp>
File not found.<br>
Press F1 to continue<br>
Press CTRL+ALT+DEL to restart
</samp>
</body>
</html>
Message from computer:
File not found.The <script> tag is used to embed a client-side script (JavaScript).
<!DOCTYPE html>
<html>
<head>
<title>Script Example</title>
</head>
<body>
<button onclick="showMessage()">Click me</button>
<script>
function showMessage() {
alert("Hello, World!");
}
</script>
<!-- External Script -->
<script src="external.js"></script>
</body>
</html>
The <section> tag defines a section in a document.
<!DOCTYPE html>
<html>
<head>
<title>Section Example</title>
</head>
<body>
<section>
<h2>Introduction</h2>
<p>This is the introduction section.</p>
</section>
<section>
<h2>Main Content</h2>
<p>This is the main content section.</p>
</section>
</body>
</html>
This is the introduction section.
This is the main content section.
The <select> tag creates a drop-down list.
<!DOCTYPE html>
<html>
<head>
<title>Select Example</title>
</head>
<body>
<label for="cars">Choose a car:</label>
<select id="cars" name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<br><br>
<label for="colors">Choose colors (multiple):</label>
<select id="colors" name="colors" multiple>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
</select>
</body>
</html>
The <small> tag defines smaller text.
<!DOCTYPE html>
<html>
<head>
<title>Small Text Example</title>
</head>
<body>
<p>This is normal text.</p>
<p><small>This is smaller text.</small></p>
<p>Copyright <small>© 2024</small></p>
</body>
</html>
This is normal text.
This is smaller text.
Copyright © 2024
The <source> tag specifies multiple media resources for media elements.
<!DOCTYPE html>
<html>
<head>
<title>Source Example</title>
</head>
<body>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
<audio controls>
<source src="audio.mp3" type="audio/mpeg">
<source src="audio.ogg" type="audio/ogg">
Your browser does not support the audio tag.
</audio>
</body>
</html>
The <span> tag is an inline container for text.
<!DOCTYPE html>
<html>
<head>
<title>Span Example</title>
<style>
.highlight { color: red; }
.bold { font-weight: bold; }
.italic { font-style: italic; }
</style>
</head>
<body>
<p>This is a paragraph with
<span class="highlight">highlighted</span> text.</p>
<p>Here's <span class="bold">bold</span> and
<span class="italic">italic</span> text.</p>
</body>
</html>
This is a paragraph with highlighted text.
Here's bold and italic text.
The <strong> tag defines text with strong importance.
<!DOCTYPE html>
<html>
<head>
<title>Strong Example</title>
</head>
<body>
<p>This is <strong>very important</strong> text.</p>
<p><strong>Warning:</strong> High voltage area.</p>
</body>
</html>
This is very important text.
Warning: High voltage area.
The <style> tag defines style information for a document.
<!DOCTYPE html>
<html>
<head>
<title>Style Example</title>
<style>
.custom-text {
color: blue;
font-size: 20px;
margin: 10px;
}
.box {
border: 2px solid red;
padding: 15px;
background-color: #f0f0f0;
}
</style>
</head>
<body>
<p class="custom-text">This text is styled.</p>
<div class="box">This is a styled box.</div>
</body>
</html>
This text is styled.
The <sub> tag defines subscript text.
<!DOCTYPE html>
<html>
<head>
<title>Subscript Example</title>
</head>
<body>
<p>H<sub>2</sub>O is the chemical formula for water.</p>
<p>CO<sub>2</sub> is carbon dioxide.</p>
<p>The value of X<sub>n</sub> is 5.</p>
</body>
</html>
H2O is the chemical formula for water.
CO2 is carbon dioxide.
The value of Xn is 5.
The <summary> tag defines a visible heading for the <details> element.
<!DOCTYPE html>
<html>
<head>
<title>Summary Example</title>
</head>
<body>
<details>
<summary>Click to show/hide details</summary>
<p>This is the hidden content that can be
shown or hidden.</p>
</details>
<details>
<summary>FAQ Question 1</summary>
<p>Here is the answer to FAQ Question 1.</p>
</details>
</body>
</html>
This is the hidden content that can be shown or hidden.
Here is the answer to FAQ Question 1.
The <sup> tag defines superscript text.
<!DOCTYPE html>
<html>
<head>
<title>Superscript Example</title>
</head>
<body>
<p>2<sup>3</sup> equals 8.</p>
<p>The 1<sup>st</sup> place winner.</p>
<p>E = mc<sup>2</sup></p>
</body>
</html>
23 equals 8.
The 1st place winner.
E = mc2
The <table> tag defines an HTML table.
<!DOCTYPE html>
<html>
<head>
<title>Table Example</title>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1, Cell 1</td>
<td>Row 1, Cell 2</td>
</tr>
<tr>
<td>Row 2, Cell 1</td>
<td>Row 2, Cell 2</td>
</tr>
</tbody>
</table>
</body>
</html>
| Header 1 | Header 2 |
|---|---|
| Row 1, Cell 1 | Row 1, Cell 2 |
| Row 2, Cell 1 | Row 2, Cell 2 |
The <template> tag holds content that will be hidden when the page loads.
<!DOCTYPE html>
<html>
<head>
<title>Template Example</title>
</head>
<body>
<button onclick="showContent()">Show Content</button>
<template id="myTemplate">
<h2>Hidden Content</h2>
<p>This content is initially hidden.</p>
<img src="example.jpg" alt="Example Image">
</template>
<script>
function showContent() {
let temp = document.getElementById("myTemplate");
let clon = temp.content.cloneNode(true);
document.body.appendChild(clon);
}
</script>
</body>
</html>
The <tbody> tag groups the body content in an HTML table.
<!DOCTYPE html>
<html>
<head>
<title>Table Body Example</title>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
thead { background-color: #f0f0f0; }
tbody { background-color: #ffffff; }
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>USD 100</td>
</tr>
<tr>
<td>February</td>
<td>USD 150</td>
</tr>
</tbody>
</table>
</body>
</html>
| Month | Savings |
|---|---|
| January | USD 100 |
| February | USD 150 |
The <td> tag defines a standard data cell in an HTML table.
<!DOCTYPE html>
<html>
<head>
<title>Table Data Example</title>
<style>
table, th, td {
border: 1px solid black;
padding: 8px;
text-align: center;
}
.highlight {
background-color: #ffeb3b;
}
</style>
</head>
<body>
<table>
<tr>
<td>Regular cell</td>
<td class="highlight">Highlighted cell</td>
</tr>
<tr>
<td colspan="2">Cell spanning two columns</td>
</tr>
<tr>
<td rowspan="2">Cell spanning two rows</td>
<td>Regular cell</td>
</tr>
<tr>
<td>Last cell</td>
</tr>
</table>
</body>
</html>
| Regular cell | Highlighted cell |
| Cell spanning two columns | |
| Cell spanning two rows | Regular cell |
| Last cell | |
The <textarea> tag defines a multi-line text input control.
<!DOCTYPE html>
<html>
<head>
<title>Textarea Example</title>
</head>
<body>
<label for="message">Message:</label><br>
<textarea id="message" name="message"
rows="4" cols="50"
placeholder="Enter your message here...">
</textarea>
<br><br>
<label for="readonly">Read-only text:</label><br>
<textarea id="readonly" name="readonly"
rows="2" cols="50" readonly>
This text cannot be modified.
</textarea>
</body>
</html>
The <tfoot> tag defines a footer content in an HTML table.
<!DOCTYPE html>
<html>
<head>
<title>Table Footer Example</title>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 5px;
}
thead { background-color: #e0e0e0; }
tfoot { background-color: #f5f5f5; }
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Item</th>
<th>Cost</th>
</tr>
</thead>
<tbody>
<tr>
<td>Item 1</td>
<td>USD 100</td>
</tr>
<tr>
<td>Item 2</td>
<td>USD 150</td>
</tr>
</tbody>
<tfoot>
<tr>
<td><strong>Total</strong></td>
<td><strong>USD 250</strong></td>
</tr>
</tfoot>
</table>
</body>
</html>
| Item | Cost |
|---|---|
| Item 1 | USD 100 |
| Item 2 | USD 150 |
| Total | USD 250 |
The <th> tag defines a header cell in an HTML table.
<!DOCTYPE html>
<html>
<head>
<title>Table Header Example</title>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 8px;
}
th {
background-color: #4CAF50;
color: white;
}
</style>
</head>
<body>
<table>
<tr>
<th scope="col">Name</th>
<th scope="col">Age</th>
<th scope="col">City</th>
</tr>
<tr>
<th scope="row">John</th>
<td>25</td>
<td>New York</td>
</tr>
<tr>
<th scope="row">Jane</th>
<td>30</td>
<td>London</td>
</tr>
</table>
</body>
</html>
| Name | Age | City |
|---|---|---|
| John | 25 | New York |
| Jane | 30 | London |
The <time> tag defines a specific time or datetime.
<!DOCTYPE html>
<html>
<head>
<title>Time Example</title>
</head>
<body>
<p>The meeting is scheduled for
<time datetime="2024-12-28 22:54:24">
December 28, 2024 at 10:54 PM
</time>
</p>
<p>Open hours:
<time>10:00</time> to <time>21:00</time>
</p>
<p>Concert Date:
<time datetime="2024-12-31">New Year's Eve</time>
</p>
</body>
</html>
The meeting is scheduled for
Open hours: to
Concert Date:
The <title> tag defines the title of the HTML document.
<!DOCTYPE html>
<html>
<head>
<title>My First Webpage | Home</title>
<style>
.browser-tab {
border: 1px solid #ccc;
padding: 5px 15px;
border-radius: 5px 5px 0 0;
background-color: #f8f9fa;
display: inline-block;
}
</style>
</head>
<body>
<p>The title appears in:</p>
<ul>
<li>Browser tab</li>
<li>Bookmarks</li>
<li>Search engine results</li>
</ul>
</body>
</html>
The title appears in:
The <tr> tag defines a row in an HTML table.
<!DOCTYPE html>
<html>
<head>
<title>Table Row Example</title>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 8px;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
tr:hover {
background-color: #ddd;
}
</style>
</head>
<body>
<table>
<tr>
<th>Product</th>
<th>Price</th>
</tr>
<tr>
<td>Apple</td>
<td>USD 1.00</td>
</tr>
<tr>
<td>Orange</td>
<td>USD 0.80</td>
</tr>
<tr>
<td>Banana</td>
<td>USD 0.75</td>
</tr>
</table>
</body>
</html>
| Product | Price |
|---|---|
| Apple | USD 1.00 |
| Orange | USD 0.80 |
| Banana | USD 0.75 |
The <track> tag specifies text tracks for media elements.
<!DOCTYPE html>
<html>
<head>
<title>Track Example</title>
</head>
<body>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<track src="subtitles_en.vtt"
kind="subtitles"
srclang="en"
label="English">
<track src="subtitles_es.vtt"
kind="subtitles"
srclang="es"
label="Spanish">
</video>
</body>
</html>
The <u> tag represents text that should be stylistically different from normal text.
<!DOCTYPE html>
<html>
<head>
<title>Underline Example</title>
</head>
<body>
<p>This is <u>underlined</u> text.</p>
<p>The word <u>misspelled</u> might be incorrect.</p>
<p>This is a <u class="proper-name">proper name</u>.</p>
</body>
</html>
This is underlined text.
The word misspelled might be incorrect.
This is a proper name.
The <ul> tag defines an unordered (bulleted) list.
<!DOCTYPE html>
<html>
<head>
<title>Unordered List Example</title>
<style>
.custom-list {
list-style-type: square;
}
.nested-list {
list-style-type: circle;
}
</style>
</head>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ul class="custom-list">
<li>First Item</li>
<li>Second Item
<ul class="nested-list">
<li>Sub-item 1</li>
<li>Sub-item 2</li>
</ul>
</li>
</ul>
</body>
</html>
The <var> tag defines a variable in programming or a mathematical expression.
<!DOCTYPE html>
<html>
<head>
<title>Variable Example</title>
</head>
<body>
<p>The area of a triangle is:
<var>b</var> × <var>h</var> / 2</p>
<p>In the equation <var>E</var> =
<var>m</var><var>c</var><sup>2</sup>,
<var>c</var> represents the speed of light.</p>
</body>
</html>
The area of a triangle is: b × h / 2
In the equation E = mc2, c represents the speed of light.
The <video> tag embeds video content in a document.
<!DOCTYPE html>
<html>
<head>
<title>Video Example</title>
</head>
<body>
<video width="320" height="240" controls autoplay muted>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
<video width="320" height="240"
poster="thumbnail.jpg" controls>
<source src="video.webm" type="video/webm">
<source src="video.mp4" type="video/mp4">
<track src="subtitles.vtt" kind="subtitles"
srclang="en" label="English">
Your browser does not support the video tag.
</video>
</body>
</html>
The <wbr> tag defines a possible line-break point.
<!DOCTYPE html>
<html>
<head>
<title>Word Break Example</title>
<style>
.narrow { width: 200px; border: 1px solid #000; }
</style>
</head>
<body>
<div class="narrow">
<p>This is a very long word:
super<wbr>cali<wbr>fragil<wbr>istic<wbr>
expiali<wbr>docious</p>
<p>A long URL:
https://<wbr>really<wbr>long<wbr>
domain<wbr>name.com</p>
</div>
</body>
</html>
This is a very long word:
super
A long URL:
https://