Fundamentals 15 min read

Master Web Fundamentals: Domains, HTML Basics, and the HTTP Protocol

This comprehensive guide explains the concept, structure, and types of domain names, details how to register and manage them, introduces web pages and HTML fundamentals including tags, syntax, and HTML5 enhancements, and demystifies the HTTP protocol, its workflow, request/response formats, version evolution, and HTTPS security.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master Web Fundamentals: Domains, HTML Basics, and the HTTP Protocol

Domain Names

A domain name is a human‑readable identifier that maps to an IP address (e.g., 172.217.14.206) and serves as the address of a website or other network resource.

Core role : Acts as a "door‑plate" for a site, simplifying user access.

Resolved to an IP address via the DNS system.

Structure

Domain names use a hierarchical, dot‑separated format from right to left. Example: mail.example.com Top‑Level Domain (TLD) : The rightmost label (e.g., .com, .org, .cn). TLDs are divided into:

Generic TLDs (gTLD) such as .com, .org, .net.

Country‑code TLDs (ccTLD) such as .cn, .us, .jp.

Second‑Level Domain (SLD) : The label directly left of the TLD, e.g., example in example.com. It is user‑chosen and must be registered.

Subdomain : A prefix to the SLD, e.g., mail in mail.example.com. Subdomains are used to separate services or sections of a site.

Types

By hierarchy : TLD, SLD, subdomain.

By usage :

General‑purpose (e.g., .com, .net).

Industry‑specific (e.g., .edu, .gov, .hospital).

Geographic (e.g., .nyc, .paris).

Brand (e.g., .google, .apple).

Special types :

Internationalized Domain Names (IDN) supporting non‑Latin characters, e.g., 中国移动.中国.

Reserved names such as localhost and example.com.

Registration and Management

Registration process :

Search for an available name through a registrar (e.g., GoDaddy, Alibaba Cloud) and purchase it.

Provide verified owner information and pay annual renewal fees.

Managing bodies :

ICANN – global coordination of the DNS.

National bodies (e.g., China’s CNNIC for .cn).

Privacy protection :

Enable WHOIS privacy to hide personal details.

Web Pages and HTML

Web page concept

A web page is an information carrier accessed via a browser, composed of text, images, video, and hyperlinks, and built on HTML (HyperText Markup Language). Each page is identified by a unique URL (e.g., https://www.example.com/page.html) and can be static or dynamically generated.

HTML basics

HTML defines the structure and semantics of a page using tags. It works together with CSS for styling and JavaScript for interactivity.

HTML document structure

<!DOCTYPE html>
<!-- Declare HTML5 document type -->
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Page Title</title>
    <link rel="stylesheet" href="style.css">
  </head>
  <body>
    <h1>This is a heading</h1>
    <p>This is a paragraph.</p>
    <img src="image.jpg" alt="Image description">
    <script src="script.js"></script>
  </body>
</html>

HTML tag classification

Semantic tags (HTML5) : <header>, <nav>, <section>, <article>, <footer> – improve readability and SEO.

Content tags : <h1>, <p>, <ul>, <ol>, <a>, <img>, <table>.

Functional tags : <form>, <input>, <video>, <audio>, <div>, <span>.

HTML syntax rules

Tags are enclosed in angle brackets, e.g., <tag>.

Most tags have opening and closing forms, e.g., <p>content</p>.

Self‑closing tags (e.g., <img src="...">) do not need an end tag.

Attributes provide additional information, e.g.,

<a href="https://example.com" target="_blank">Link</a>

.

Static vs. dynamic pages

Static page : Content is pre‑generated HTML files; only HTML/CSS/JS are needed; updates require manual file edits.

Dynamic page : Content is generated on each request by server‑side code (PHP, Python, etc.) and often uses a database; updates occur automatically based on data or user input.

HTML5 new features

Additional semantic tags ( <article>, <section>, <nav>) for better structure and SEO.

Native multimedia tags <video> and <audio> eliminate the need for plugins.

The <canvas> element enables drawing and game development.

Enhanced form controls: new input types ( email, date, range) and attributes ( placeholder, required).

Client‑side storage APIs localStorage and sessionStorage replace cookies for larger, more secure data.

HTTP Protocol

Definition and core characteristics

HTTP (HyperText Transfer Protocol) is an application‑layer protocol based on the client‑server model. It is used to transfer hypertext, images, video, and other resources over the web.

Stateless : Each request is independent; state is maintained via cookies or sessions.

Connection model : HTTP/1.0 opens a new TCP connection per request; HTTP/1.1 and later reuse persistent connections.

Plain‑text transmission : Data is unencrypted unless HTTPS is used.

Flexibility : Any MIME type can be transferred using the Content‑Type header.

Workflow

Client sends request : Browser creates an HTTP request from a URL.

TCP connection established : Typically via a three‑way handshake; HTTP/1.1 reuses the connection.

Server processes request : Parses the request, may query a database or read a file.

Server returns response : Generates an HTTP response containing a status code and the requested resource.

Connection closed : Usually via a four‑way handshake unless the connection is kept alive.

HTTP request message

GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/html
Cookie: session_id=abc123

Common methods : GET – retrieve a resource (idempotent). POST – submit data (e.g., form submission). PUT – replace a resource. DELETE – remove a resource.

HTTP response message

HTTP/1.1 200 OK
Content-Type: text/html
Set-Cookie: session_id=abc123
Content-Length: 1024

<!DOCTYPE html>
<html>...</html>

Status code categories :

1xx – Informational (e.g., 101 Switching Protocols).

2xx – Success (e.g., 200 OK, 201 Created).

3xx – Redirection (e.g., 301 Moved Permanently).

4xx – Client error (e.g., 404 Not Found).

5xx – Server error (e.g., 500 Internal Server Error).

Version evolution

HTTP/1.0 : Supports multiple MIME types; each request opens a new TCP connection.

HTTP/1.1 : Adds persistent connections, pipelining, and the Host header for virtual hosting.

HTTP/2 : Binary framing, multiplexing, header compression, and server push improve performance.

HTTP/3 : Built on QUIC (UDP) to eliminate head‑of‑line blocking and further reduce latency.

HTTPS – Secure extension

Encryption : TLS/SSL encrypts HTTP payload, preventing eavesdropping and tampering.

Authentication : Server presents a CA‑signed digital certificate to verify its identity.

Default port : HTTPS operates over port 443 (HTTP default is 80).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Web developmentFundamentalsHTMLDomain NamesHTTP Protocol
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.