Loading...

Hyper Text Markup Language

HTML is the standard language used to create and structure content on the web. It tells the web browser how to display text, links, images, and other forms of multimedia.

HTML Tags

Keywords (tag names) surrounded by angle brackets like <html> that tell the browser how to format content.

Attributes

Provide additional information about elements. Placed in the opening tag (e.g., name="value").

Web Browser

Software that reads HTML files and renders them into visible web pages.

<!DOCTYPE>

A declaration that tells the browser what version of HTML is being used (currently HTML5).

HTML History

Year Milestone
1991 Tim Berners-Lee created HTML (unpublished).
1993 First public version released.
1995 HTML 2.0 released.
1997 HTML 3.2 released (HTML 3.0 was abandoned).
1998 W3C shifted focus to XHTML.
1999 HTML 4.01 released (widely used standard).
2000 XHTML 1.0 released.
2004 Mozilla & Opera formed WHATWG to evolve HTML.
2006 W3C collaborates with WHATWG on HTML5.
2012 HTML5 officially published.

Core Concepts

CSS (Style Sheets)

CSS defines how web documents look. It can be added in three ways:

  • External: Using <link> tag.
  • Internal: Using <style> in head.
  • Inline: Using style="..." attribute.
HTML Lists

Groups of items. HTML supports three main types:

  • Unordered: <ul> (Bullets).
  • Ordered: <ol> (Numbers).
  • Definition: <dl> (Terms/Desc).
  • * Lists can also be nested.
Document Structure
  • <head>: Metadata, Title, CSS (Not visible on page).
  • <body>: Main visible content (Images, text, links).
  • <title>: Browser tab name (Important for SEO).

Master Tag Reference Guide

Tag Description
<!-- --> Comment tag. Used to insert comments in source code; not displayed in browser.
<a> Anchor tag. Defines a hyperlink to link pages together using the href attribute.
<abbr> Defines an abbreviation or acronym (e.g., "HTML", "Mr."). Title attribute shows full text on hover.
<acronym> [Deprecated] Used to define acronyms. Use <abbr> instead.
<address> Defines contact information for the author/owner (email, address, phone). usually renders in italic.
<applet> [Deprecated] Formerly used to embed Java applets. Not supported in HTML5.
<area> Defines a clickable area inside an image map. Nested in <map>.
<article> Specifies independent, self-contained content (e.g., Blog post, News story).
<aside> Defines content aside from the main content (e.g., Sidebar).
<audio> Embeds sound content. Supports MP3, WAV, OGG.
<b> Specifies bold text without extra importance. Use as a last resort.
<base> Specifies the base URL/target for all relative URLs. Must be in <head>.
<basefont> [Deprecated] Formerly used to specify default font properties.
<bdi> Bi-Directional Isolation. Isolates part of text formatted in a different direction.
<bdo> Bi-Directional Override. Used to override current text direction.
<br> Line Break. Inserts a single line break. Empty tag.
<center> [Deprecated] Used to align content to center. Use CSS text-align: center instead.
<font> [Deprecated] Used to add style/size/color. Use CSS instead.
<h1>-<h6> Heading tags. H1 is largest, H6 is smallest.
<hr> Horizontal Rule. Inserts a horizontal line to separate content.
<nbsp> Non-breaking space entity. Prevents automatic line breaks.
<p> Paragraph tag. Structures text into paragraphs.
<pre> Preserve Formatting. Displays text exactly as written (including spaces/breaks).
<thead> Table Head. Groups header content in a table. Used with tbody/tfoot.
<time> Defines a specific time/datetime in a machine-readable format.
<title> Defines the document title shown in browser tab. SEO critical.
<track> Specifies text tracks (subtitles/captions) for audio/video elements.
<tt> [Deprecated] Teletype text. Monospaced font.
<u> Underline. Represents unarticulated text (misspelled words, etc).
<var> Variable. Defines a variable in programming/math. Displays in italic.
<video> Embeds video content. Supports MP4, WebM, OGG.
<wbr> Word Break Opportunity. Specifies where it is OK to break a line.