Complete HTML Tags Notes with Examples
Basic Structure
Tag Description Example Output
<!DOCTYPE html> Defines document type <!DOCTYPE html> Defines HTML5
<html> Root element <html>...</html> Wraps page
<head> Metadata container <head>...</head> Holds info
<body> Main content <body>...</body> Visible page
Head Section
Tag Description Example Output
<title> Title of page <title>My Site</title> Appears in tab
<meta> Metadata <meta charset='UTF-8'> Encodes page
<link> Links CSS <link rel='stylesheet' href='[Link]'> Adds styles
<style> Internal CSS <style>h1{color:red;}</style> Styles applied
<script> JavaScript <script>alert('Hi!')</script> Runs JS
Text Formatting
Tag Description Example Output
<p> Paragraph <p>Hello</p> Hello
<b> Bold <b>Bold</b> Bold
<i> Italic <i>Italic</i> Italic
<u> Underline <u>Underlined</u> Underlined
<mark> Highlight <mark>Highlight</mark> Highlight
<small> Smaller text <small>Small</small> Small
<big> Larger text <big>Big</big> Big
<sup> Superscript x<sup>2</sup> x²
<sub> Subscript H<sub>2</sub>O H■O
<strong> Strong importance <strong>Important</strong> Important
<em> Emphasized <em>Note</em> Note
<del> Deleted text <del>Old</del> Old
<ins> Inserted text <ins>New</ins> New