HTML Working
4 min read ·
Web development is broadly divided into frontend and backend.
The frontend refers to the visible part of a website that users interact with directly. This includes text, images, forms, buttons, tables, and layouts. Frontend development is primarily done using HTML, CSS, and JavaScript.
The backend handles the logic and data processing that happens behind the scenes. It manages tasks such as storing data, handling user requests, authentication, and server side operations. Backend development commonly uses languages such as Python, Java, Ruby, or JavaScript with databases.
In simple terms, the frontend displays content, while the backend controls how that content works.
How Websites Work
When a user wants to access a website, they type a web address into a browser.
The browser sends a request to a web server where the website files are stored.
The server responds by sending the required files back to the browser. These files usually include HTML, CSS, and JavaScript.
The browser then processes these files and displays the website to the user.
Role of HTML in a Website
HTML is responsible for defining the structure of a web page.
It tells the browser what content exists on the page and how that content is organized.
An HTML file is created using a text editor and saved with a
.html extension.Once saved, the browser reads this file and converts the HTML code into a visual web page.
From Code to Web Page
The development process usually follows this flow.
A developer writes HTML code in a code editor.
The file is saved as an HTML document.
The browser opens the file or receives it from a server.
The browser reads and interprets the HTML tags.
The page is displayed in a readable and visual format.
The browser does not display HTML tags themselves. Instead, it uses them as instructions.
What Is a Web Browser
A web browser is a software application that understands HTML.
Its main job is to read HTML documents and display them as web pages.
Browsers convert HTML tags into headings, paragraphs, images, links, and other visual elements.
Popular browsers include Chrome, Edge, Firefox, and Safari.
Browsers act as the bridge between raw HTML code and the final user interface.
What Is an HTML Document
An HTML document is a plain text file that contains HTML code.
It is saved with a
.html or .htm extension.Inside the document, HTML tags are written using angle brackets.
These tags give instructions to the browser about page structure and content placement.
The tags themselves are fixed and standardized by web standards.
What Is a Rendered Page
A rendered page is the final output shown in the browser.
It is the visual representation of the HTML document after the browser processes it.
The rendered page includes formatted text, images, links, and layout as seen by users.
Users never see the raw HTML unless they view the page source.
How a Basic Website Works
A basic website follows a simple request and response cycle.
The browser sends a request to the web server.
The server responds with HTML, CSS, and JavaScript files.
The browser processes these files.
The website is displayed on the screen.
This process happens very quickly, often within milliseconds.
How a Browser Processes HTML
A browser performs two major tasks when loading a web page.
The first task is parsing.
During parsing, the browser reads the HTML code and converts it into a structured representation called the Document Object Model.
The second task is rendering.
During rendering, the browser uses this structure to draw elements on the screen and display the final web page.
The internal details of this process are complex and will be explored later.