Lesson
17 of 26
Translate

DNS & Web Development

Domain Name System, domain hierarchy, HTML, CSS, JavaScript basics, web servers, static vs dynamic websites for UPSSSC AGTA.

Domain Name System (DNS)

What is DNS?

DNS (Domain Name System) is often called the “phonebook of the internet.” It converts human-readable domain names (like google.com) into machine-readable IP addresses (like 142.250.190.78) so that browsers can load websites.

Without DNS, you would have to memorize long number sequences to visit every website. DNS makes the internet user-friendly.


DNS Hierarchy

The DNS system is organized in a tree-like hierarchy with multiple levels:

LevelDescriptionExample
RootTop of the DNS tree, represented by a dot (.). (invisible in URLs)
TLD (Top-Level Domain)Category of the domain.com, .org, .in, .gov
SLD (Second-Level Domain)The actual name you registergoogle, wikipedia
SubdomainPrefix added before the domainmail.google.com, blog.example.com

Reading a domain name (right to left): mail.google.com = Root (.) + TLD (.com) + SLD (google) + Subdomain (mail)

Types of TLDs

TLD TypeExamplesPurpose
Generic TLDs (gTLD).com, .org, .net, .edu, .govGeneral categories
Country Code TLDs (ccTLD).in (India), .uk (UK), .us (USA), .jp (Japan)Country-specific
Sponsored TLDs.gov.in, .edu.in, .ac.inGovernment, education
New gTLDs.app, .tech, .xyz, .shopSpecialized categories

DNS Records

DNS stores different types of records, each serving a specific purpose:

RecordFull FormFunction
A RecordAddressMaps domain to IPv4 address
AAAA RecordQuad-AMaps domain to IPv6 address
CNAMECanonical NameCreates an alias (blog.site.com points to site.com)
MX RecordMail ExchangeDirects email to the mail server
NS RecordName ServerSpecifies the authoritative DNS server
TXT RecordTextStores text info (used for email verification, SPF)

DNS Resolution Process

When you type “google.com” in your browser, this happens:

  1. Browser Cache — checks if IP is already cached locally
  2. Recursive Resolver — your ISP’s DNS server looks up the domain
  3. Root Server — directs to the correct TLD server (.com)
  4. TLD Server — directs to the authoritative nameserver for google.com
  5. Authoritative NS — returns the actual IP address
  6. Browser — connects to the IP and loads the website

This entire process takes milliseconds.

ICANN

ICANN (Internet Corporation for Assigned Names and Numbers) is the global organization that manages and coordinates the DNS, IP addresses, and domain name registrations.

  • Headquartered in Los Angeles, USA
  • Ensures every domain name is unique worldwide
  • Domain Registrars (authorized by ICANN): GoDaddy, Namecheap, Google Domains

Web Development

Frontend vs Backend

AspectFrontendBackend
WhatWhat users see and interact withServer-side logic and database
LanguagesHTML, CSS, JavaScriptPython, PHP, Java, Node.js
FocusDesign, layout, user experienceData processing, security, logic
Runs OnBrowser (client-side)Server (server-side)

HTML (HyperText Markup Language)

HTML is the standard language for creating the structure of web pages. It uses tags to define elements.

Essential HTML Tags:

TagPurpose
<html>Root element of HTML page
<head>Contains metadata, title, links to CSS
<body>Contains visible page content
<h1> to <h6>Headings (h1 = largest, h6 = smallest)
<p>Paragraph
<a href="...">Hyperlink
<img src="...">Image
<table>, <tr>, <td>Table, table row, table data
<form>Input form for user data
<ul>, <ol>, <li>Unordered list, ordered list, list item

HTML5 New Tags

HTML5 introduced semantic tags that give meaning to content:

HTML5 TagPurpose
<header>Page or section header
<nav>Navigation links
<section>Thematic grouping of content
<article>Independent, self-contained content
<footer>Page or section footer
<video>Embed video without plugins
<audio>Embed audio without plugins
<canvas>Drawing graphics via JavaScript

CSS (Cascading Style Sheets)

CSS controls the visual presentation of HTML elements — colors, fonts, spacing, layout.

  • Selector — targets which HTML element to style
  • Property — what to change (color, font-size, margin)
  • Value — the setting (red, 16px, 10px)
  • Three ways to add CSS: Inline, Internal (in <style> tag), External (.css file)

JavaScript

JavaScript adds interactivity and dynamic behavior to websites — dropdown menus, form validation, animations, real-time updates.

  • Client-side scripting language (runs in the browser)
  • Can also run on servers using Node.js
  • Not related to Java — despite the similar name

Web Development Stacks

A “stack” is a combination of technologies used to build a complete web application.

StackComponents
LAMPLinux, Apache, MySQL, PHP
MEANMongoDB, Express.js, Angular, Node.js
MERNMongoDB, Express.js, React, Node.js

Static vs Dynamic Websites

FeatureStatic WebsiteDynamic Website
ContentFixed, same for all usersChanges based on user/request
TechnologyHTML, CSS onlyHTML + server-side language (PHP, Python)
DatabaseNot requiredUsually required
SpeedFaster (pre-built pages)Slower (pages generated on request)
ExampleCompany brochure siteFacebook, Amazon, YouTube

Web Servers

A web server is software that receives HTTP requests from browsers and sends back web pages.

Web ServerDescription
ApacheMost popular open-source web server
NginxFast, lightweight, used for high-traffic sites
IISMicrosoft’s web server for Windows

Client-Server Architecture

  • Client — the browser (Chrome, Firefox) that requests web pages
  • Server — the computer that hosts the website and responds to requests
  • Communication happens via HTTP/HTTPS protocols

HTTP Methods

MethodFunction
GETRetrieve data from server (loading a page)
POSTSend data to server (submitting a form)
PUTUpdate existing data on server
DELETERemove data from server

Cookies and Sessions

FeatureCookiesSessions
Stored AtClient (browser)Server
PurposeRemember user preferences, login stateTrack user activity during visit
ExpiresCan persist across visitsEnds when browser closes (usually)

XML vs JSON

FeatureXMLJSON
Full FormExtensible Markup LanguageJavaScript Object Notation
ReadabilityVerbose, uses tagsLightweight, easy to read
UsageLegacy systems, SOAP APIsModern web APIs, REST
Example<name>Ram</name>{"name": "Ram"}

API (Application Programming Interface)

An API allows two software applications to communicate with each other. A REST API uses HTTP methods (GET, POST, PUT, DELETE) to exchange data, usually in JSON format.

  • Example: A weather app on your phone uses an API to fetch data from a weather server
  • APIs power most modern web and mobile applications

Key Takeaways

  • DNS converts domain names to IP addresses — the “phonebook of the internet”
  • DNS hierarchy: Root, TLD (.com, .in), SLD (google), Subdomain (mail)
  • ICANN manages global domain name system
  • HTML = structure, CSS = styling, JavaScript = interactivity
  • HTML5 added semantic tags: header, nav, section, article, footer, video, audio
  • LAMP and MEAN are popular web development stacks
  • Static websites are fixed; dynamic websites change based on user requests
  • REST APIs use HTTP methods to exchange data in JSON format

Summary Cheat Sheet

ConceptKey Details
DNSConverts domain names to IP addresses
TLD.com, .org, .net, .in — top of domain hierarchy
ccTLDCountry-specific — .in (India), .uk, .us
A RecordMaps domain to IPv4 address
MX RecordDirects email to mail server
CNAMECreates alias for a domain
ICANNManages DNS globally, HQ in Los Angeles
DNS ResolutionBrowser, Recursive resolver, Root, TLD, Authoritative NS
HTMLStructure of web pages — tags like h1, p, a, img
HTML5Semantic tags — header, nav, section, video, audio
CSSStyling — colors, fonts, layout
JavaScriptInteractivity — runs in browser, also Node.js
LAMPLinux, Apache, MySQL, PHP
MEANMongoDB, Express, Angular, Node.js
Static SiteFixed content, HTML/CSS only, faster
Dynamic SiteChanges per user, needs database, Facebook/Amazon
ApacheMost popular open-source web server
GET vs POSTGET retrieves data; POST sends data
CookiesStored in browser, persist across visits
SessionsStored on server, end when browser closes
JSONLightweight data format — {"key": "value"}
REST APIUses HTTP methods, exchanges JSON data

Knowledge Check

Take a dynamically generated quiz based on the material you just read to test your understanding and get personalized feedback.

Lesson Doubts

Ask questions, get expert answers

Lesson Doubts is a Pro feature.Upgrade