HTML

HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure of a web page using elements, which are represented by tags.

HTML Introduction

HTML (HyperText Markup Language) is the standard language for creating web pages.

Example:

<!DOCTYPE html>
<html>
<head>
    <title>Introduction to HTML</title>
</head>
<body>
    <h1>Welcome to HTML!</h1>
    <p>This is my first HTML page.</p>
</body>
</html>

HTML Editors

You can write HTML in editors like VS Code, Sublime, or Notepad.

Example in VS Code: Create an index.html file and type:


HTML Basic

Basic structure includes <!DOCTYPE>, <html>, <head>, and <body>.

Example:


HTML Elements

HTML elements include a start tag, content, and an end tag.

Example:


HTML Attributes

Attributes provide additional information about elements.

Example:


HTML Headings

HTML supports headings <h1> to <h6>.

Example:


HTML Paragraphs

Paragraphs are defined with the <p> tag.

Example:


HTML Styles

Inline styles can be applied using the style attribute.

Example:


HTML Formatting

Formatting tags include <b>, <i>, <u>, and <strong>.

Example:


HTML Quotations

Use <blockquote> for block quotes and <q> for inline quotes.

Example:


HTML Comments

Add comments with <!-- -->.

Example:


HTML Colors

Define colors using names, HEX, or RGB.

Example:


HTML CSS

CSS can be added inline, internally, or externally.

Example:


Links are created using the <a> tag.

Example:


HTML Images

Images are embedded using <img>.

Example:


HTML Favicon

Favicons are added in the <head>.

Example:


HTML Page Title

Set the page title with the <title> tag.

Example:


HTML Tables

Create tables using <table>.

Example:


HTML Lists

Create ordered and unordered lists.

Example:


HTML Block & Inline

Block elements take up full width, inline elements do not.

Example:


HTML Div

Div is a container for grouping.

Example:


HTML Classes

Use class to group elements.

Example:


HTML Id

The id attribute uniquely identifies an element.

Example:


HTML Iframes

Embed another webpage with <iframe>.

Example:


HTML JavaScript

Embed JavaScript into HTML.

Example:


HTML Forms

Forms collect user input.

Example:


HTML Canvas

Draw graphics using the <canvas> tag.

Example:


HTML Video

Embed video files.

Example:


HTML Audio

Embed audio files.

Example:


HTML Web Storage

Store data locally using localStorage.

Example:


HTML Geolocation

Get the user’s location.

Example:


HTML Drag/Drop

HTML5 provides drag-and-drop functionality using the draggable attribute.

Example:


HTML Web Workers

Web Workers allow running scripts in background threads without blocking the page.

Example:

worker.js:


HTML SSE (Server-Sent Events)

SSE allows the server to push updates to the client.

Example:

server.php (example server code):


HTML APIs

APIs integrate advanced functionality into web pages. Examples include geolocation, storage, and drag/drop.


HTML File Paths

File paths determine the location of resources like images, CSS, or JavaScript.

Example:

  • Relative Path: images/example.png

  • Absolute Path: https://example.com/images/example.png


HTML Head

The <head> section contains metadata, links to stylesheets, and scripts.

Example:


HTML Responsive

Responsive design ensures pages work on different devices using CSS media queries.

Example:


HTML Computercode

Tags like <code>, <pre>, and <kbd> display computer-related content.

Example:


HTML Symbols

Use symbols for currency, math, and more.

Example:


HTML Emojis

HTML supports emojis using Unicode values.

Example:


HTML Charsets

Specify the character set using UTF-8 for modern web pages.

Example:


HTML URL Encode

URL encoding converts characters to a valid format for URLs.

Example:


HTML vs. XHTML

HTML is more forgiving, while XHTML requires stricter syntax.

Example XHTML:


HTML SVG

SVG creates vector graphics.

Example:


HTML Media

HTML supports video, audio, and YouTube content.


HTML YouTube

Embed YouTube videos using <iframe>.

Example:


Last updated