Semantic Cognition and understanding of HTML5 tags (1)

Source: Internet
Author: User

With the increasing processing capacity of servers, Internet-level development has finally begun to become increasingly popular (I and many people said a few years ago that we should not simply focus on the so-called enterprise-level development, but will soon enter the Internet-level development ), HTML5 push brings more opportunities and hotspots to front-end technologies.

I use vs2008 development tools. As a representative of lazy people (who have strong dependence on development tools, are too lazy to remember API words, too lazy to type more, and too lazy to check manuals, intelliisense has always been a very important thing for me. I like Microsoft's development platform, that is, I like development on Microsoft's platform only when vs development tools have good and high-speed intelliisense, for those who are used to using notebooks, I have always admired and never refused. When vs2008 does not have good support for HTML5, I never practiced it until I saw "HTML 5 intelliisense and validation schema for Visual Studio 2008 and Visual Web Developer, I started to support HTML5 in vs2008. At least element and CSS development had the intelliisense service for the lazy. Sorry, I'm so happy. Unfortunately, I have not yet supported the Dom's Scripting script API (Oh, you can argue with many friends about how to express this. You can understand what I mean, this plug-in does not support HTML5, such as canvas. getcontext ).

After downloading this plug-in, we can see the new HTML5 verification architecture in the tool -- option, which can also be counted as the target verification architect HTML5 in the page development environment. At the same time, some intelliisense support for HTML tags and CSS is started.

The earliest and most impressive, especially for lazy people like me, the most important thing to remember is that the initialization of HTML elements is very simple to the extreme.

<!DOCTYPE html>

I was very excited when I first heard that I didn't want to write the content in doctype. I finally didn't want to write any messy things, I am ashamed to help you with all ide solutions.

Next, let's talk about the new elements of HTML5. Before learning about the new elements, I would like to explain my personal views. The use of tags is a matter of opinion. The standard is a guide and reference, different people have different understandings of Harry Potter (Shakespeare I am not talking about you). My understanding begins with the semantic tag of html4:

  1. Tags are classified in many ways. In html4, I simply divide tags into default blocks and default inline, and divide tags into semantic and non-semantic (style labels are not discussed.
  2. In addition to Div I, all other labels have semantics (under the Declaration, style labels such as font have long been not used in html4 ), div only logically treats some labels as a group and can be processed together.
If you agree with me, you will also agree that many new structure-based elements in HTML5 are used to replace Div, or replace part of Div. These elements are used to describe the use of element regions and groups. The reason is that in the future, web pages will not only be visible to browsers on PCs, but also be provided to mobile devices, proprietary devices, and browsers on small devices for convenience, these browsers need to re-process the page content in different environments to give users a better reading experience. The content of all pages must provide valuable guidance to the browser, this allows the browser to handle cropping, highlighting, and specific operations.
All documents should have a Header element, especially the page itself is a document object. If there is no special reason, the top part of your page should have a Header element, other articles may have headers. Be careful to avoid header misuse. the header indicates a set of auxiliary texts of the nature of the introductory or navigation, remember the navigation and introductory keywords. Therefore, the top header of the page should contain a navigation label: nav. Although it seems that there are no necessary rules, I think that nav should only contain ol or Li elements. After all, Nav is used for navigation, and navigation should be a set of paths. Header can also contain other information for introduction, such as the company icon, company name, or product name on the homepage.
<Body> Of course.
<Body> 

Let's just say that the ol and UL are retained in HTML5. My personal suggestion is to remove the similar elements with complicated interpretations, such as retaining abbr and dropping acronym, unfortunately, both ol and UL are retained, but I suggest using ol. For document pages, such as the homepage of a blog with the Primary and Secondary titles, you can use the hgroup element in the header for processing.

<Header> 

The document itself can be marked with the article element, which can describe the entire article and all its information. Usually articles also contain headers (I am talking about often) or hgroups (this is not necessarily needed ). Does article need a header? Are there several ways to determine whether H and some descriptions combine the header information? If there is only H and there is no other description, you do not need to use the header.

<Article> 

If there is a primary subtitle, but there is no descriptive description, then the direct hgroup can also

<Article> 

Now we should be more interested in the header to describe to the browser which is the header area of the document. Today, I am exhausted. I will continue to understand and recognize HTML elements tomorrow. For HTML5, I agree with the principle of being self-explanatory and not reluctant. An element is the most suitable for us to understand where to use it. It makes sense to use it.














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.