Whenever we use the internet, we visit different websites. We search for information on Google, watch videos on YouTube, shop online, read news, book tickets, check bank accounts, and interact with social media platforms.
But have you ever wondered what exactly a website is?
Before learning HTML and web development, it is important to understand this basic concept because, as a web developer, your main job is to build websites and web applications.
Let's understand it with a simple real-world example.
🏢 Imagine a Shopping Mall
Imagine you want to open a large shopping mall.
First, you need a building where everything will be located. Inside the building, you may have different shops, restaurants, a cinema, a food court, parking areas, information desks, and many other facilities.
Now imagine that people want to visit your mall.
They need a way to find the mall, enter it, move between different sections, and interact with the things available inside.
A website works in a very similar way.
Think of a website as a digital building on the internet.
Just like a physical building has different rooms and sections, a website has different web pages.
For example, an e-commerce website might have:
-
Home page
-
Products page
-
Product details page
-
About page
-
Contact page
-
Login page
-
Shopping cart page
All these pages together can form one website.
For example, imagine a website called myshop.com. The homepage could be available at:
myshop.com
A product page could be:
myshop.com/products
And a contact page could be:
myshop.com/contact
All of these pages belong to the same website.
🌐 Website and Web Page
One common confusion among beginners is the difference between a website and a web page.
A web page is a single page or document that you can access through a browser.
A website is a collection of related web pages that are connected together and usually belong to the same domain.
Think about our shopping mall example.
A shop inside the mall can be compared to a web page, while the entire mall can be compared to a website.
For example, codesofrohan.com can be considered a website, while an individual course page or article inside that website is a web page.
🏠 What Is a Domain Name?
Now let's say you have built your shopping mall. People need an address to find it.
For example:
"My shopping mall is located at Main Road, City Center."
On the internet, websites also need an address.
This address is called a domain name.
For example:
google.com
youtube.com
codesofrohan.com
When you type a domain name into your browser, the browser uses that address to find the required website.
So you can think of a domain name as the address of a digital building.
🚪 How Do We Access a Website?
In the real world, you can enter a building through its entrance.
On the internet, we access a website using a web browser such as Google Chrome, Microsoft Edge, Firefox, or Safari.
For example, when you type:
https://codesofrohan.com
into your browser, the browser communicates with the server where the website is stored and requests the required files.
The server sends those files back to the browser, and the browser processes them and displays the website on your screen.
These files can include HTML, CSS, JavaScript, images, fonts, and other resources.
This is why a browser is so important in web development.
🧱 What Is a Website Made Of?
Just like a physical building is made using different materials, a website is created using different technologies.
The three fundamental technologies you will commonly encounter are:
HTML → Defines the structure and content.
CSS → Controls the appearance and design.
JavaScript → Adds behavior and interactivity.
Let's use our building example again.
Imagine you are constructing a house.
The structure and rooms are similar to HTML.
The paint, furniture, decoration, and overall appearance are similar to CSS.
The electric doors, lights, switches, and other interactive features are similar to JavaScript.
Together, these technologies help us create a functional and attractive website.
🌍 Website vs Internet
Another important point is that a website and the internet are not the same thing.
The internet is the huge global network that connects computers and devices around the world.
A website is one of the many services and resources that are available through that network.
Think of the internet as a huge network of roads connecting different cities, while websites are like buildings located in those cities.
You use the roads to reach different buildings.
Similarly, you use the internet to access different websites.
🎯 Why Do We Build Websites?
Websites are used for countless purposes.
Businesses use websites to sell products and services. Educational platforms use them to provide courses. News organizations publish articles through websites. Developers create portfolios to showcase their work. Governments provide online services through websites.
Even the website you are currently learning from is a website.
As you continue learning HTML, you will learn how to create the structure of these digital buildings.
So, in simple words:
A website is a collection of related web pages and resources available on the internet, usually accessed through a domain name and viewed using a web browser.
Once you understand this concept, the next step is to understand how a website actually works behind the scenes and how technologies like HTML help us build it.