Compling html files
Are HTML files compiled? If yes, which compiler is开发者_JAVA技巧 used? If no then how does the browser find any errors?
HTML files are not compiled; they could be said to be interpreted.
The raw HTML file data (mark-up text) is pushed / pulled down the wire to the client / browser upon request which then, using its own engine implementation (for the most part, and if the client is a visual rendering browser) will render the contents as it sees fit.
This is why while one thing might work as desired in, say, Chrome, that same thing could potentially be rendered unexpectedly by other clients - For example, IE has been made notorious for inventing its own way of processing mark-up and neglecting the 'standard', but the MS team now seem to be coming to their senses.
The client / browser finds errors just as a compiler would at compile time, only at what could be labelled as runtime. It knows what can be handled by its own means and can therefore report it. And at this point the client already has the data, obviously.
HTML is not "compiled." It's delivered to the client (in most cases a web browser) and "rendered" in some way by that client (in most cases as a visual web page in a web browser).
There are various rendering engines used by various browsers. Errors are determined and handled by the rendering engines.
As was stated, HTML is not compiled.
However, confusingly enough, Microsoft has a help format called Compiled HTML (.CHM). Although, this isn't compiled in the same sense as a computer program is compiled, but more "compiled" like a book is compiled. In other words, this is just a single file representation of many HTML files.
精彩评论