Re-learn the semantic HTML5

Did so many years of front-end, before the interview when the interviewer will always be the question: How do you understand the semantic HTML ?

To be honest, I encountered this problem before when the reference is to find answers from the Internet, then down, in their own language reorganize, it becomes their own understanding.

Why to re-learn the semantics of HTML5, because this year, the company arranged a job for me, let me do the official website from a project, and then hope to go up in the rankings discharged to home as possible Baidu search.

Official network, for me, it is quite easy, I can speak out several programs, react in, vue of, jquery, or what framework are not used. Can achieve. And in fact, I quickly finished the work. But in the subsequent Baidu search ranking I'd encountered some problems.

In fact, this belongs to the category of SEO work, no way, the company has deliberately impossible to hire an SEO expert to give the sub-project dedicated to do SEO.

I find all kinds of information through various blog (Recommended: SEO and link HTM ), a variety of forums, and finally the last results were pretty good.

Here to talk about semantics in the end is what?

1. Headings

Headings in fact, is our common h1, h2, h3 these labels, where h1 should be a title page, in fact, the analogy to the word document is a Word document title.

Headings quantity and structure of the page should expand, just like a Word document, if the title structure clear words. Then the content of the document must be legible, and Headings pages if justified, then the same for search engine crawlers which is also friendly.

2. List

We do the front, ul, ol these original style most like to eliminate, to engage in some other styles. Or you should use them, use div to achieve.

The final results may show nothing different, but for search engines, go big difference. ol and ul intention is an ordered list and unordered lists, search engines read them, they'll be the property of the child element of the same level, they belong to the same List.

3. No

I was doing this when the official website, beginning with a navigation div to achieve. In fact, this is wrong, because there is no way to use div elements explain this node is a navigation menu node. The Nav elements directly semantics, this is navigation. After reading the search engine you can quickly understand the overall structure of the site.

 

Today's content at first to side, as well as part of a continuing -

Guess you like

Origin www.cnblogs.com/crackday/p/11666631.html