You request a page by domain name, which gets translated into an exact address on a Web server somewhere. The request is transmitted over the Internet to the Web server using a protocol called HTTP, or Hypertext Transfer Protocol.
The receiving Web server gets your request, and figures out how to satisfy your request. For dynamic pages, the Web server uses other services to format the correct info into an HTML page.
The Web server returns information to your browser that is packaged up in the form of HTML pages.
The HTML that is returned may just be text, but it can also include images, audio, and video.
The HTML that is returned can either be directly pulled from the server’s hard drive without modification (a so-called static page), or the HTML may be created right then in response to your request for the page (a dynamic page). If nobody asks for it, does the page exist? Dynamically-generated pages are created by a program that reads a database or other data source, and then creates HTML code that inserts the info from the database.
When your browser receives HTML in response to the request for the page, you can’t be sure how or when it was created. You can always View Source (but it may not be helpful). Read more about viewing the underlying code here.
Browsers are incredibly optimistic about displaying HTML. They will always try to render a page, regardless of errors, omissions, bad design, mixed metaphors, whatever! Here is a perfect example: the 1-line file. Even though problematic code may appear correctly in your page when you view it, you can’t be sure that different browsers will treat the errors the same way. In fact, you can assume that browsers will react differently to errors, since they even react differently to properly-validated code. All browsers know to ignore HTML and CSS directives that they don’t understand, and there are even ways to create browser-specific code to manage the differences. But while an old browser may ignore the parts it doesn’t understand, those parts are likely key to your layout: "and the walls came tumblin’ down!"
There is no difference between reading HTML from your own hard drive and reading the same file from the Web, as long as the file doesn’t rely on back-end services (like PHP or a database). Your browser will display it the same way as long as it is straight HTML.
Factors that Affect the Browsing Experience
Cultural sensitivity: colors, left-to-right vs right-to-left, type of content
You don’t know how the user got here, or where they are going next.
Connection speeds can vary dramatically.
Time delay between client and server
Variation in fonts: available fonts, plus size overrides by people
Variation in colors: available colors on a given computer; monitor variations; OS variations
Variation in browsers: different bugs, different defaults, different non-standard quirks
Support for HTML/CSS/JavaScript/Flash
User suppression or modification of CSS, JavaScript, Flash, or images