Home  >  Article  >  Web Front-end  >  How does the browser run HTML? _html/css_WEB-ITnose

How does the browser run HTML? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:40:041754browse

What is a web page

A web page (HTML page) is an application that runs on a browser (Browser) and can interact with users.

This picture shows the browser running HTML

What do you want to explain? A format, a file composed of character codes (HTML Document)

2. This file is composed of HTML Tag, CSS style, and JS code. HTML Tag makes up the file, and css and Js are loaded when the web page is loaded. Various resources

3. When running a web page on a browser, the browser will first create an HTML running environment (HTML Context). This environment contains

various resources used when the web page is running. . Then, the browser begins to read the HTML file, loads it into memory, and parses the tags according to the syntax. During the parsing process, the browser can

divide it into two types according to the semantics of the tags

① System resource type

is used to describe the browser, operating parameters in the operating environment, style settings and other resources, such as JS and CSS. They will not be displayed to the user through the browser,

, but in the background provide various resources used when the web page is running to the browser, and the running environment uses

②User interface type

Used for various user interface controls (such as textbox, button) displayed on web pages

4. During the process of the browser analyzing the tags that make up the file, the file will also be converted For the object model DOM (Document Object Model) that the program code can process,

and create this object model in the running environment. DOM is a tree-like object model. The browser will convert an HTML file into a DOM object book,

and each DOM node in the object tree corresponds to a tag in the HTML file.

DOM is a set of APIs provided by browsers to developers in the HTML running environment to control HTML files. The DOM is controlled on the DOM object tree through the DOM API. Various operations on the node

will be reflected on the HTML file

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn