Web standards learning to understand the separation of structure and presentation

Web standards learning to understand the separation of structure and presentation
When discussing Web standards, one thing that always comes up is the importance of separating structure from presentation.

Understanding the difference between structure and presentation can be difficult at first, especially if you are not used to thinking about the semantic structure of documents.

However, it is important to understand this because, when structure and presentation are separated, it is easy to control presentation using a CSS document.

The structure consists of the main body of the document, plus semantic and structural tags.

Presentation is the style you give to your content. In most cases, presentation is how a document looks, but it can also affect how a document "sounds" - after all, not everyone uses a graphical browser.

Separate structure and presentation as much as possible.

In theory, you should use one HTML document to store content and structure, and one CSS document to control the presentation of the entire document.

It is still common today to have websites where presentation and structure are not separated.

So when we first start learning, we should develop a good habit of putting them in separate files. XHTML files can link and share external CSS and JavaScript documents.

<<:  Use CSS to achieve circular wave effect

>>:  Docker images export and import operations

Recommend

How to deploy nodejs service using Dockerfile

Initialize Dockerfile Assuming our project is nam...

Use of filter() array filter in JS

Table of contents 1. Introduction 2. Introduction...

Solve the problem of Nginx returning 404 after configuring proxy_pass

Table of contents 1. Troubleshooting and locating...

Web page html special symbols html special characters comparison table

Special symbols Named Entities Decimal encoding S...

MySQL fuzzy query statement collection

SQL fuzzy query statement The general fuzzy state...

Tutorial on installing GreasyFork js script on mobile phone

Table of contents Preface 1. Iceraven Browser (Fi...

js object-oriented method to achieve drag effect

This article shares the specific code for impleme...

Zookeeper stand-alone environment and cluster environment construction

1. Single machine environment construction# 1.1 D...

Detailed explanation of the use of docker tag and docker push

Docker tag detailed explanation The use of the do...

JavaScript to achieve click image flip effect

I was recently working on a project about face co...

Steps to deploy hyper-V to achieve desktop virtualization (graphic tutorial)

The hardware requirements for deploying Hyper-V a...

How to use nginx to intercept specified URL requests through regular expressions

nginx server nginx is an excellent web server tha...