0. How an website works

Structure of a webpage:

webpage-structure.png
In building a webpage, think of HTML, CSS, and JavaScript as different parts of a car.

  • HTML is like the car's skeleton, forming the basic structure and frame.
  • CSS adds the paint and finishing touches, making the car look appealing with color, style, and design.
  • JavaScript is similar to the engine and mechanical parts, infusing the car with functionality, movement, and interactive features.

Similarly, when developing a website, HTML lays out the structure, CSS enhances its visual appeal, and JavaScript provides interactivity and dynamic content

How do websites work?

When we want to access any information on the internet, we search for it using a web browser. The web browser retrieves the content from web servers, where it is stored in the form of HTML documents.

An HTML document is created by writing code with specific tags in a code editor of your choice. The document is then saved with the '.html' extension. Once saved, the browser interprets the HTML document, reads it, and renders the web page.

how page works.png
The text editor has the HTML code of a website. This website can now be viewed in a beautifully rendered format using a computer program known as a web browser.

  • Web Browser(client) requests websites like www.codewithharry.com from the web server.
  • Web server in return sends HTML, CSS, and JavaScript files to it.
  • HTML, CSS, and JavaScript files are parsed by a web browser which is responsible for showing you a beautiful website.