Home > Web Front-end > HTML Tutorial > HTML document declaration and coding tag study notes

HTML document declaration and coding tag study notes

PHPz
Release: 2017-04-23 11:18:37
Original
1386 people have browsed it

I summarized the HTML document declaration and coding tag study notes. For more tutorials, please pay attention to the php Chinese website html video tutorial

Document declaration

Function: In order for the browser to better display HTML files, you must tell the browser that your file is HTML

Syntax:

  • The declaration must be placed on the first line of the HTML document

  • The declaration is not an HTML tag

Encoding tag

If the encoding type is set incorrectly, garbled characters will be displayed when you need to display characters of a non-browser-set encoding type

## Solution:

    ##In tag in the ; tag to set the encoding type, to set the encoding type to utf-8.
  1. element can provide meta information of the page, which contains relevant information corresponding to html. The client browser or server-side program will process it based on this information. The main attributes are:
##http-equiv, similar to the HTTP header protocol, it will respond to the browser with some useful information, which helps better Display
  • content (content type), such as content="text/html"
  • charset (encoding type), included in content, For example, content="text/html;charset=utf-8"
  • ## 3. Full version

                                                                                               

The above is the detailed content of HTML document declaration and coding tag study notes. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template