Experiment 1: HTML Tags Reference

<!-- --> (Comment)
Inserts a comment. Not rendered in the browser.
<!-- This is a comment -->
(Not visible in browser)
<a> (Anchor)
Creates a hyperlink to another page or site.
<a href="https://bing.com">Link</a>
Link
<b> (Bold)
Makes the text bold without adding extra importance.
<b>Bold Text</b>
Bold Text
<big> (Big)
Increases the size of the text. Deprecated in HTML5.
<big>Big Text</big>
Big Text
<body> (Body)
Defines the main content of the HTML document.
<body>Page Content</body>
Page Content
<br> (Break)
Inserts a single line break.
Line 1<br>Line 2
Line 1
Line 2
<center> (Center)
Centers the content. Deprecated in HTML5.
<center>Centered</center>
Centered
<dd> (Definition Description)
Defines the description of a term in a definition list.
<dd>This is a definition</dd>
This is a definition
<form> (Form Tag)
Defines an HTML form for user input.
<form action="/submit" method="post">
  <input type="text" name="username" placeholder="Username">
  <input type="password" name="password" placeholder="Password">
  <input type="submit" value="Login">
</form>


<dl> (Definition List)
Defines a list of terms and their descriptions.
<dl>
  <dt>Term</dt>
  <dd>Definition</dd>
</dl>
Term
Definition
<dt> (Definition Term)
Defines a term in a definition list.
<dt>Term</dt>
Term
<em> (Emphasis)
Displays emphasized text, usually italic.
This is <em>important</em>
This is important
<font> (Font)
Defines font face, size, and color. Deprecated in HTML5.
<font face="Arial">Text</font>
Text
<h1> to <h5> (Headings)
Define HTML headings from largest (<h1>) to smallest (<h5>).
<h1>Heading</h1>
<h2>Heading</h2>
<h3>Heading</h3>
<h4>Heading</h4>
<h5>Heading</h5>

Heading

Heading

Heading

Heading

Heading
<head> (Head)
Contains metadata, scripts, and links. Not visible in the browser.
<head><title>Page Title</title></head>
(Not visible in browser)
<hr> (Horizontal Rule)
Inserts a horizontal line (thematic break).
<hr>

<html> (HTML Root)
The root element of an HTML document.
<html></html>
(Represents the full HTML document)
<img> (Image)
Embeds an image into the document.
<img src="image.jpg" width="200">
Sample Image
<input> (Input Field)
Creates an interactive input control.
<input type="text">
<li> (List Item)
Defines an item in a list.
<li>Item</li>
<link> (External Resource)
Links an external resource like a CSS file. Placed in <head>.
<link rel="stylesheet" href="style.css">
(Not visible in browser)
<marquee> (Marquee)
Creates scrolling text. Deprecated in HTML5.
<marquee>Scrolling Text</marquee>
Scrolling Text
<menu> (Menu List)
Represents a list/menu of commands. Not commonly used.
<menu><li>Item</li></menu>
  • Item
  • <meta> (Metadata)
    Specifies metadata like character encoding, description, etc.
    <meta name="description" content="HTML tutorial">
    (Not visible in browser)
    <ol> (Ordered List)
    Defines a numbered list of items.
    <ol>
      <li>First</li>
      <li>Second</li>
    </ol>
    1. First
    2. Second
    <option> (Select Option)
    Defines an option inside a <select> dropdown.
    <select>
      <option>Option 1</option>
      <option>Option 2</option>
    </select>
    <p> (Paragraph)
    Defines a block of paragraph text.
    <p>This is a paragraph.</p>

    This is a paragraph.

    <small> (Small Text)
    Renders text in a smaller font size.
    <small>Small text</small>
    Small text
    <strike> (Strikethrough)
    Displays text with a line through it. Deprecated in favor of <del>.
    <strike>Struck text</strike>
    Struck text
    <strong> (Strong Importance)
    Indicates strong importance. Typically bold.
    <strong>Important</strong>
    Important
    <table> (Table)
    Creates a table layout for structured data.
    <table border="1">
      <tr><td>A</td><td>B</td></tr>
      <tr><td>C</td><td>D</td></tr>
    </table>
    AB
    CD
    <td> (Table Data)
    Defines a cell in a table.
    <table border="1">
      <tr><td>Cell</td></tr>
    </table>
    Cell
    <th> (Table Header)
    Specifies a header cell in a table.
    <table border="1">
      <tr><th>Header</th></tr>
    </table>
    Header
    <title> (Document Title)
    Sets the title of the page shown in the browser tab.
    <title>My Webpage</title>
    (Displays in the browser tab, not in page)
    <tr> (Table Row)
    Defines a row in a table.
    <table border="1">
      <tr><td>Row</td></tr>
    </table>
    Row
    <u> (Underline)
    Renders underlined text.
    <u>Underlined</u>
    Underlined
    <ul> (Unordered List)
    Defines a bulleted list of items.
    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
    </ul>