Introduction to HTML

Source: Internet
Author: User

Because the company's business needs, do python development, I need to prepare front-end development, so want to do well, must be solid foundation, from the basic start, I will record my learning process in the knowledge points.

First, the introduction of HTML
-html is a Hypertext markup (tag) language
-It is responsible for the structure of the three elements of the Web page
-html use labels to identify different parts of a Web page
-so-called hypertext refers to hyperlinks, and hyperlinks allow us to jump from one page to another
(1) Elements
We refer to a complete label as an element
Elements and tags can be considered a synonym
According to the World Wide Web Consortium, which defines standards such as Html,dom,xml, a Web page consists of three parts: structure, performance, behavior

Where the words are explained separately:
Structure:
-"HTML to describe the structure of the page
Performance
-CSS to control the style of elements in a page
Behavior
-"JavaScript is used to respond to user actions
HTML Two child tags are head and body,body is the content that the Web page is visible
head= Meta (elements provide meta-information about the page (meta-information), such as descriptions and keywords for search engines and update frequency. ) and title
Body= "H1,div, etc.
HTML first implementation and then there are standards

HTML annotations are not displayed on the Web page in the format:<!--...-->

Based on the version of HTML. With the 99htm4l and 00 XHTML and the 14 HTML5

How do I let the browser know which version of HTML it is?

You need to add doctype to the top of the page.

Because xhtm and HTML4 documentation are too long and cumbersome, but we are now using HTML5, so HTML5 's statement and simple

HTML5 's declaration is <!doctype html>

If you do not write the document description, the browser will go in a strange mode, after entering the strange mode, the browser parsing page will cause the page to display, so avoid entering the strange mode, you must write a document description.

Garbled problem:

Since the computer is a very stupid machine, it only knows two things 0 and 1

The content that is saved in the calculation is eventually converted to binary to be saved, including the contents of the Web page.

Encoding: The process of converting a character to a binary encoding according to certain rules

Decoding: The process of converting a binary encoding into a character based on certain rules

Character sets: The rules used for encoding and decoding, which we call a character set

Common character Sets: (ASCII (US), iso-8859-1 (Europe), GBK (China), GB2312 (Chinese, Chinese system default encoding), UTF-8 (now is the universal code, almost many countries can use, so it is generally used))

In the Chinese system browser, the default is to use GB2312 to decode.

So you need to tell the browser what character sets are decoded, meta is used to set the metadata of the page, such as the character set of the Web page, keywords and introduction

Meta is a self-closing tag that, when written from the end tag, can be added to the start tag by adding A/

Concrete implementation <meta charset= ' Utf-8 ' >

The root cause of garbled characters, encoding and decoding using different character sets

Introduction to HTML

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.