I have mainly worked at server side layer of enterprise applications (Java EE, Spring framework).
I have difficult how we can combine all these technologies and make a "page", for example If i create
A little theory:
It helps to think of the HTML page you see in the browser made up of three components:
As for your question #1 of why mixing is possible, you are correct, it is because all three are eventually rendered in browser to make a what you called 'page'.
It helps to think that as you go from #1 > #2 > #3 you progressively enhance the page.
HTML and CSS are NOT programming languages. So you are not combining anything.
HTML is a set of specifications to describe the elements of your page.
CSS is set of rules to tell browser how to display those elements.
All three of them are used along with each other to get the desired behavior on the page that user sees.
So how does a browser use these three
Browser starts by reading the HTML to create what is known as a
Then it "looks" at the CSS and "applies" the CSS to the
content tree and creates what is called a
render tree. This has the styling information added.
Finally it goes though
layout process, where each of the HTML elements are assigned exact physical window coordinates to display at.
Finally everything is "painted" and you see the stylized HTML page.
Here's a diagram that describes this process for WebKit browsers (source)
This Article describes this process in great details if you are interested in further reading.
About your question #2 on why
.html extension. Technically speaking the .html extension is just a carry over from filesystems of operating systems, and browser does not care! What browsers do care about is what is called a mime-type and is typically returned by the Web-servers.
Browsers are "taught" to behave a certain way when they see a specific mime-type. Some common ones are