In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "HTML5 how to add and discard tags", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "HTML5 how to add and discard tags" bar!
I. abandoned labels
The following HTML 4.01elements have been deleted in HTML5. Although browsers still support these tags for compatibility reasons, it is recommended to use new alternative tags. Paradoxically, the old browser does not have enough support for the new tags, depending on the audience of the project.
1. Elements that can be replaced by CSS
These elements include basefont, big, center, font, s, strike, tt, u. These elements are purely for page presentation, and the content of the presentation should be done by CSS.
2. Frame framework
These elements include frameset, frame, and noframes. The frame framework is not supported in HTML5, only the iframe framework is supported, or the above three tags are deleted in the form of multiple pages created by the server.
3. Elements supported by only some browsers
These elements contain tags like applet, bgsound, blink, marquee, and so on.
4. Other abolished elements
Abolish rb, use ruby substitute repeal acronym use abbr substitute repeal dir use ul substitute abolish isindex use form and input replace repeal listing use pre replace repeal xmp use code substitute repeal nextid use guids abolish plaintex use "text/plian" (unformatted body) MIME type substitution
Second, the new label 1, the new structure label
In HTML4.01, div is widely used in various layout environments, but there is no clear definition. HTML5 semantics div for SEO. The new structure tags are as follows:
A), the section element represents a content block in the page, such as a chapter, header, footer, or other part of the page. Can be with H2, H3. And other elements are combined to represent the document structure. Example: in HTML5... In HTML4.
B) the article element represents a piece of independent content on the page that is not relevant to the context. Like an article.
C) the aside element represents auxiliary information related to the content of the article element other than the content of the article element.
D), the header element represents a content block in the page or the title of the real page.
E), hgroup elements represent a combination of the title of a real page or a content block in a page.
F), the footer element represents the footnote of the entire page or a content block in the page. Generally speaking, he will include the name of the creator, the date of creation, and the creator's contact information.
G), the nav element represents the part of the navigation link in the page.
H), the figure element represents a separate stream content, which generally represents an independent unit in the main stream content of the document. Use the figcaption element to add a title to the figure element group. For example:
PRC
The People's Republic of China was born in 1949
Often write in HTML4
Prc
The People's Republic of China was born in 1949
In order to help you make learning easy and efficient, share a large number of materials for free to help you overcome difficulties on your way to becoming a front-end engineer or even a full-stack engineer. Here to recommend a front-end full-stack learning exchange circle: 784783012 welcome everyone to learn and communicate and make common progress.
When you really start learning, it is inevitable that you do not know where to start, resulting in inefficiency that affects your confidence in continuing learning.
But the most important thing is not to know which technologies need to be mastered, step on the pit frequently while learning, and eventually waste a lot of time, so effective resources are still necessary.
2. Add other elements 2.1and meter
Represents a numerical value within a specific range, and can be used for wages, quantities, percentages, etc. Max represents the maximum value, min represents the minimum value, and value represents the current value.
You can use js control to change it from 0 to 100.
2.2 、 time
Time . Indicates the time value, and the attribute datetime emphasizes the time conference time: 2015-10-6
Because the tag is a semantic tag, it has no special effect when viewed on the browser, which is basically the same as no tag.
2.3 、 progress
Used to represent a progress bar
Progress
Max: maximum, value at completion
Value: current valu
2.4 、 datalist
This label defines a list of optional data. In conjunction with the input element, you can create a drop-down list of input values. When combined with input, the selection can be completed and some can be entered.
2.5, mark element
It is mainly used to visually present to the user what text needs to be highlighted or highlighted. The search keyword is highlighted in the search results of a typical application. HTML5;HTML4 .
2.6.The ruby element
Define ruby comments (Chinese phonetic or character). Use with and tags. The ruby element consists of one or more characters (requiring an explanation / pronunciation) and a rt element that provides this information, as well as an optional rp element that defines what to display when the browser does not support the "ruby" element.
2.7.The rt element
Define the interpretation or pronunciation of characters (Chinese Bopomofo or characters).
2.8.The rp element
Used in ruby comments to define what is displayed by browsers that do not support ruby elements.
2.9.The wbr element
Represents a soft line break. The difference from the br element: the br element indicates that the line must be wrapped here; wbr means that when the browser window or parent element is wide (when there is no need for a line break), there is no line break, and if the width is not enough, take the initiative to wrap the line here.
2.10. Canvas element
Define graphics, such as charts and other images. Elements are just graphics containers (canvases) and must be drawn using scripts.
Var canvas = document.getElementById ('myCanvas'); var ctx = canvas.getContext (' 2d'); ctx.fillStyle ='# FF0000'; ctx.fillRect (0,0,80,100); 2.11, command element
Represents a command button, such as a radio button, check box, or button. The command element is visible only if it is within the menu element. Otherwise, this element will not be displayed, but you can use it to specify keyboard shortcuts.
Play function setVolume (obj) {document.getElementById ("mp3") .volume=obj.value*0.01;}
The volume is only between 0 and 1.
3.3.The embed element
Used to embed content (including various media). The format can be Midi, Wav, AIFF, AU, MP3,flash, etc.
Example: code example in HTML4
Thank you for reading, the above is the content of "how to add and discard tags in HTML5". After the study of this article, I believe you have a deeper understanding of how to add and discard tags in HTML5, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.