Full HTML Course in Simple Language
Nowadays, people spend more time in the virtual world than at their jobs. We have access to every information. This makes it necessary to consider that, in addition to the growing need for online platforms, a decent website is necessary for "visiting," "selling," "having conversions," and many other purposes. Now, in order to stand out as developers, we must study web development. As everyone is aware, HTML (Hyper Text Mark-up Language) is the most fundamental language to understand before beginning any web development project. We will learn the fundamentals of websites in this area of the course, including what HTTP, HTTPS, SSL, and the distinction between HTTP and HTTPS are.
Why I have to know all these things?
So, as we know all the websites are surfed on web browser whether on computer, laptop or on mobile. Yes, you can be on different web browsers like Mozilla, chrome, edge etc. but all the browsers communicate to the server is a same manner or we can say using “following” the same protocols. That’s why it become important to know about the protocols before starting our journey.
What is HTTP?
HTTP (Hypertext Transfer Protocol) is a set of protocol. It is the foundation of the communication on the www (world wide web). It’s is use for transferring the data from the user side (usually a web browser, like Mozilla Firefox, chrome, edge etc.) and a server over the internet. HTTP works on the Request-Response model, like user from his browser creates a request or we can say HTTP request. These requests are process by the server and server check the authorization and the authentication of the user and based on that server give the response (response can be a webpage: HTML page or JSON Data, etc.) along with the status code.
HTTP is stateless Protocol:
HTTP is a stateless protocol because if doesn’t store any information about previous requests. Every single request is independent from the previous one, but you have options like cookies and sessions can maintain context.
HTTP requests can be of various methods:
- GET: Retrieve Data
- POST: Send data to the server (usually we use this for form submissions)
- PUT: Update the resources
- DELETE: Delete a resources
- HEAD: Retrieve headers only, without the body
- OPTIONS: Find supported HTTP methods on a server or resources.
HTTP Response can contain following methods:
- 200 OK: Request Successful
- 404 Not Found: Requested resources or page not found
- 500 Internal Sever Error: Indicates the server-side errors
- 403 Forbidden Error: Server refused to deliver the resource
- …. many more
These are some common error codes which non-developer user also see most frequently.
Example of a HTTP Request / HTTP Response
Request:
GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Response:
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1234
What is the difference between HTTP & HTTPS?
What is HTTPS?