Home > Article > Web Front-end > What three layers does the front-end page consist of?
The front-end page is composed of three layers: "structure layer", "presentation layer" and "behavior layer". The structure layer is the skeleton of the page, created by HTML, used to build the structure of the document; the presentation layer is the style of the page, created by CSS, used to set the presentation effect of the document; the behavior layer is the behavior of the page, created by JavaScript, used to Implement the document's behavior.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5&&javascript version 1.8.5, Dell G3 computer.
The three layers of the front-end page are the structure layer, the presentation layer, and the behavior layer.
Structural layer is the skeleton of the page, created by HTML or XHTML markup language, and is used to build the structure of the document.
HTML is used to define the content of the web page, such as title, text, images, etc.;
The presentation layer is the style of the page, Created by CSS (Cascading Style Sheets) and used to set the presentation effect of the document.
CSS is used to control the appearance of the web page, such as color, font, background, etc.;
The behavior layer is the behavior of the page. Created by the JavaScript language and used to implement document behavior.
JavaScript is used to update the content in the web page in real time, such as obtaining data from the server and updating it to the web page, modifying the style of some tags or the content thereof, etc., which can make the web page more vivid.
However, there are some potential areas of overlap between these three technologies. For example, DOM technology can be used to change the structure of web pages. Examples of overlapping techniques can also be found in CSS. Predefined symbols (pseudo class attributes) like :hover and :focus allow us to change the rendering based on user-triggered events. Changing the presentation of elements is of course the "sphere of influence" of the presentation layer, but reacting to user-triggered events is the domain of the behavioral layer. This overlap of presentation and behavior layers creates a gray area.
For more programming-related knowledge, please visit: Programming Learning! !
The above is the detailed content of What three layers does the front-end page consist of?. For more information, please follow other related articles on the PHP Chinese website!