Introduction to WEB and HTML
Tags: iwritecode, webdev, html, webserver
Published: 2022-11-06 07:08:55

### What is Web Server?

**Web servers** are an important part of a website and it is important to understand how a web server works on the internet or the World wide web. A website doesn't just depend on the coding or content part it depends on how the website performs on the internet and how much it is efficient so we need a good web server.

> A website is a collection of web pages while a web server is software that responds to the request for web resources.

<br>

![Web Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g2fcupbdo5t4zvwsdcvo.png)

<br>

A **web server** is a computer where web content is stored and also the content is served on the internet. that's why a user visits your website and sees your all content over the world because of a web server.

Nowadays worldwide most famous & widely used web server is [Apache 2](https://httpd.apache.org/)  and other web servers are `Nginx, Lighttpd`, etc. 

![Apache](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1tj24z8sw9qr65x8mmvb.png)

The biggest advantage of using this server is supports all operating systems ( `Windows, Mac, and Linux, etc.` ) and most websites ( around 70% )  are using `Apache` for hosting their content. `Apache is open-source` which means it is available for free, and can easily be accessed through online communities. a lot of online support is available in case you are stuck in a problem or error.

### How does it be Works?


![Client request](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1j58cnhw5nhofqzlvte.png)

The **web server** responds to the client's request in two ways one is sending the file to the client associated with the requested URL (  `Uniform Resource Locator` ) and the second ways generating a response by invoking a script and communicating with the server.

> URL is an acronym for Uniform Resource Locator and is a reference (an address) to a resource on the Internet

<br>

```
Example of URL : http://example.com

where the http is protocol identifier and the example.com is resource address.

```

When you type a URL into a browser that means the client sends a request for a web page, the web server searches for the requested page if it exists or is found then it will send it to the client with an HTTP ( `Hypertext Transfer Protocol` ) response. and if the requested web page is not found or does not exist web server sends an HTTP response ( `404 not found` ) 

### What is HTML ?
Basically, **HTML** is the main part of a web page. its full form is `Hypertext Markup Language`.  and you can also imagine `HTML is a bone of a web page` because you use it to structure your web page.

![HTML](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9svz4xqbhkma4efenf3.png)

The origin of the `HTML language` dates back to the `physicist Tim Berners-Lee`, its creator, a worker at CERN (European Organization for Nuclear Research) who at the end of 1989 proposed the HTML language together with the HTTP protocol, whose objective was to create a means to be able to share information between physicists of the time who worked all over the world.

The first version of HTML was released in 1991 ( HTML 1 ) .

- HTML 2 - Released in 1995
- HTML 3 - Released in 1997
- HTML 4 - Released in 1999
- HTML 5 - Released in 2014

HTML 5 is the latest version and this version includes many outstanding features.



#### Basic structure of HTML: 
```html
<!DOCTYPE html>
<html>
  <head>
    <title>SM8UTI</title>
  </head>
  <body>
   <h1>Smruti Ranjan Nayak</h1>
   <p>SM8UTI</p>
  </body>
</html>
```

in the above html code the `<!DOCTYPE html>` declaration defines that this document is an HTML document or file. the `html, head, title, body these are called elements or tags`. `<html>` is the root element. `<head>`, this element contains meta information, title, and links etc. and `<body>`, this element contains the body part of web page or content part.

The two most used extensions of HTML documents are `.html` and `.htm`.

Thank you very much for reading.
Sm8uti