To know how webserver serves the pages, there need to be some background knowledge of a few things.
HTML: It stands for Hyper Text Markup Language. It is a markup tags oriented language. It describes the web documents/pages. Each
tag describes different document content. E.g. "
<p>" is used for describing paragraph.
CSS: It stands for Cascading Style Sheets. If you want any HTML element to be displayed in a specific style or the layouts of web pages, is defined here in CSS.
Its working is explained in different steps, the steps will be explained according to the above image, so that it could be understood easily.
- When you type any URL in the browser and hit enter. The request goes to that server (webdevelopertuts server as per image). I am not going into the details of how it goes to that specific server. If you want to know, how the request goes to that specific server or how DNS is resolved then read the article How Domain is translated/resolved into IP Address?.
- The server goes into the specific directory/folder where sites are maintained and find the specific site's folder. In this case dailywebsolutions.
- It finds for the specific file requested by the user. When it finds the file,
- Then it sends the content back to the user's computer from where the request was initiated. The computer's browser translates and show the content as defined in the code.
Don't confuse yourself with the other tags like <html>,<head> etc. Every tag has different purpose.