A brief discussion on HTML doctype and encoding

A brief discussion on HTML doctype and encoding

DOCTYPE

Doctype is used to tell the browser which version of HTML to use to parse the instructions. It must be on the first line. In some versions, DTD needs to be introduced. HTML5 does not need to introduce DTD.

Chinese garbled characters

reason

The encoding format of the code parsed by the browser is inconsistent with the source code encoding format. For example, if the document is saved as GBK, garbled characters will appear.

Solution

The code is saved in the same encoding format as the one used to parse it.

The above brief discussion on HTML doctype and encoding is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

<<:  CSS3 filter code to achieve gray or black mode on web pages

>>:  Common writing examples for MySQL and Oracle batch insert SQL

Recommend

XHTML Getting Started Tutorial: Using the Frame Tag

<br />The frame structure allows several web...

The iframe refresh method is more convenient

How to refresh iframe 1. To refresh, you can use j...

Teach you how to install mysql database on Mac

Download MySQL for Mac: https://downloads.mysql.c...

React internationalization react-intl usage

How to achieve internationalization in React? The...

Detailed installation tutorial of Docker under CentOS

Docker is divided into CE and EE. The CE version ...

One question to understand multiple parameters of sort command in Linux

The sort command is very commonly used, but it al...

iFrame is a great way to use it as a popup layer to cover the background

I have been working on a project recently - Budou ...

Implementation of CSS3 button border animation

First look at the effect: html <a href="#...

Mysql experiment: using explain to analyze the trend of indexes

Overview Indexing is a skill that must be mastere...

How to use html2canvas to convert HTML code into images

Convert code to image using html2canvas is a very...

Vue implements seamless scrolling of lists

This article example shares the specific code of ...

CentOS 7.x deployment of master and slave DNS servers

1. Preparation Example: Two machines: 192.168.219...

Detailed steps to install MySQL 5.7 via YUM on CentOS7

1. Go to the location where you want to store the...