Difference between html and html5 language in web design? This article is mainly to analyze the key and basic differences between html and html, hoping to help beginners learning html5.
What is html5?
html5 is a hypertext markup language first named by WHATWG (Web Hypertext Application Technology Working Group), and then combined with the W3C's xhtml2.0 (standard) to produce the latest generation of hypertext markup languages. Can be simply understood as: HTML 5 ≈ HTML4.0 + CSS3 + JS + API.
Second, what is the difference between hmtl5 and html?
The static web pages we develop on the web front-end are generally html4.0. At the same time it is in compliance with the W3C's xhtml1.0 specification. So what's the difference between them?
Third, the key core points of html
(1) Understanding: Floating and clearing floats and positioning In fact, I think there are only two points in CSS that need to be understood: the first is: floating and clearing floats. The second is: positioning. As long as you understand these two points deeply, I believe that the CSS part should not have many problems.
Why do you say that? Because I have contacted many novice friends, most of them don't understand why it is necessary to "clear the float" after using the float, and what it means to clear the float.
The practical purpose of clearing the float is to prevent some unusual small bugs on the webpage, such as: webpage misalignment. I believe that many novice friends have encountered such a problem: "Why my webpage is misplaced, and it is not laid out in the normal situation."
In fact, most of these situations are caused by clearing floats, so we can see the "importance of clearing floats".
In terms of positioning: we must understand the meaning of three types of positioning: relative positioning (position: relative) absolute positioning (position: absolute), as well as fixed positioning (position: fixed) and the default attribute static.
Among them, I think the most important thing to understand is absolute positioning, because absolute positioning is relative to an element. For example:
Friendly Tip: If an element is absolutely positioned, it will always look for a positioned element from the parent. If a location is found, it is positioned relative to it. If none are found, locate relative to the browser. It can be seen that the P element is positioned relative to the browser, because his parent DIV is not positioned.
Fourth, the new features of HTML5 extension (1) powerful drawing functions may be some animation, or pictures, in html5 can be achieved through powerful painting functions, plus JS can be achieved. But not in html4.0.
In HTML5, there are two things that can be drawn. Let's take a look at two magical things.
In canvas, once the graphic is drawn, it will not continue to get the attention of the browser. If its position changes, the entire scene also needs to be redrawn, including any objects that may have been covered by the graphic.
The advantages of using SVG over other image formats (such as JPEG and GIF) are:
(1) SVG images can be created and modified with a text editor (2) SVG images can be searched, indexed, scripted or compressed (3) SVG is scalable (4) SVG images can be edited at any resolution High-quality printing (5) SVG can be enlarged without image quality degradation. Both can be used for drawing. Let's take a look at the difference between them:
2. Does not support event handlers
3. Weak text rendering capabilities
4. Ability to save the resulting image in .png or .jpg format
5. Best for image-intensive games, many of which are frequently redrawn
1. Does not depend on resolution
2. Support event handler
3. Best for applications with large rendering areas (such as Google Maps)
4. High complexity will slow down rendering (any application that overuses the DOM is not fast)
5. Not suitable for game applications (2) New video tags may be in html4.0, we want to insert a video, and also need to quote a long section of code. But in the case of html5. We only need to use one video tag.
<video src = "Video Address"> </ video>
Ha ha summary: what are the benefits of html5 tags?
First: Save programmers time writing code.
Second: more conducive to SEO optimization to share a few about SEO (hidden programmer jokes)
1. The two most annoying things about program ape. The first thing is that others ask him to write a document for his code. What about the second? It is someone else's program that left no documentation.
2. The course of reading the program ape: x language introduction —> x language application practice —> x language advanced programming —> x language science and art —> programming beauty —> programming way —> programming zenith —> cervical spondylosis Rehabilitation guide.
3. When I was not in college, I was in the third year of summer vacation. I ran to the Book City over there and wanted to buy the legendary C ++ book. Then I saw a C #. I saw, hey, this ++ is quite artistic. , Overlapped, so I bought C # back ...
4. Q: Which son of program ape hates Kangxi the most? Answer: Hey, because he is a bug.
5. One day, the program monkeys suddenly found that their wages had fallen into the well! Everyone was scared, and they hung one by one and stretched out of the tree into the well for salaries. Just when they touched their salary, an old programmer suddenly shouted in excitement: don't be stupid, the salary to be raised is still hanging in the sky!
6, Zhuge Liang is an excellent program ape, each bag is written for a different case! But good programmers can't beat better bugs! Zhuge Liang, who was six out of the mountain and seven into the Central Plains, bowed to death, and died after only one wrong case-Ma Ma, the entire structure was broken!
7. A true portrayal of the program ape in life, a game with a pack of cigarettes, and a computer with one afternoon. A box of instant noodles and a pot of water can manage a whole day.
8. The program ape has 3 children, named Ctrl, Alt, and Delete. If they are not obedient, the program ape just needs to knock them at the same time.
9, the Constitution hit the ball! Chinese laws are all .txt files, not .exe files.
10. Colleagues said that when writing i ++, he always felt that he was writing me.