1.html5: Actually, 1.html 5

Source: Internet
Author: User

1.html5: Actually, 1.html 5

1.html 5 origin, historical background ......

According to the general routine, I should discuss the origins and development history of html5, its superiority, and other special books here. However, since you are consciously looking for similar articles, it indicates that you have an early understanding. Even if you don't, there are a lot of similar things online. I will not write any nutritious content here. So I skipped N words ............

What is 2.html 5?

According to the official statement, html languages are called hypertext markup language. What is hypertext markup language?

First, we need to establish a concept. In fact, an html page is a document, which is almost the same as opening a Word document. Below are some experiments:

Text <span> text </span> <scolia> text </scolia> <scolia abcd = 123> text </scolia>

 

The above code is accessed in the browser as follows:

<Em> text </em> <strong> text </strong>

 

The effect displayed in the browser:

  

This time the effect is very obvious, with a tilt and a bold. <Em>, <strong>, and <span> are both built-in labels. Why is the difference so great?

If you have learned a little about the scripting language before, the following explanation is quite understandable, because its behavior is similar to that of the scripting language.

First, we can see that the content is actually a document, and the document itself can not contain any label, just as what we see in the Word document can be a simple text. However, just as we can edit text in Word documents, our document Viewer (that is, the browser) can also. However, unlike the editing method of using the mouse and shortcut keys in word, html document editing is in the form of tags, just as the text Skew and bold effects are achieved above.

  From the scripting language perspective, webpage documents are actually source code files, and our browser is the script interpreter. The browser implements corresponding functions by interpreting specific labels. But unlike the real scripting language programming, the browser does not require all text to be tagged, that is, only part of the code in a file can comply with the browser syntax, the browser only explains the part of the Code. If there is no tag or the tag is not recognized, it will be ignored and displayed as common text.

<Em>, <strong>, and <span> are built-in labels. After the browser interprets these labels (the process of this explanation can also be called rendering ), add different effects to it. Of course, <em> and <strong> have built-in Skew and bold effects, while <span> does not have any built-in effects, which leads to the above display differences. If one day the browser adds an effect to the <span> tag, or the <scolia> tag I wrote earlier. Then, when I use the corresponding tag, it will have a corresponding effect.

In fact, the biggest pain for front-end is not how to build code, but how to be compatible with various browsers. I also use the script language to explain why it is compatible.

First of all, the traditional script language interpreter only has one official version, which is the most different version, but you must choose which version, then, the interpreter of this version is used to build the Code. At any time, the interpreter can only interpret the same code.

However, the interpreter of the html language is a browser, but there are more than one type of browser. There are some differences in the interpretation of browsers from various companies, and there are also differences between different versions of the same company. The biggest difficulty is that you can ask yourself to only use a certain interpreter to explain the Code, rather than asking your users to use any browser to browse your webpage. The result is the same code, which has different effects on different browsers. If a browser does not support a certain syntax, the text in the html language will be treated as a common text, which is why it should be compatible.

In fact, we can also use the scripting language idea to understand css and JavaScript. If you didn't know what a scripting language is before, I'm sorry this article may not help you understand it. At this time, you may need to understand it by yourself in other ways. Only what you are understanding is actually yours.

 

  If you want to find videos and learn html5 or other front-end languages, you can go to www.yc60.com

It is free, not to mention I sell advertisements.

My front-end knowledge is also learned from there, and a lot of content in my blog is also taken from the courseware there, plus part of my own understanding. It is written here as a reference statement.

 

Related Article

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.