HTML common tags and HTML semantic understanding

Source: Internet
Author: User
Tags button type turbo boost

HTML Common Tags

As a quasi-front-end development engineer, although we can query the MDN when we encounter unfamiliar HTML tags, we should also keep in mind the use of most common HTML tags to avoid affecting productivity.

The following is my web-based data collation of common HTML tags and their use, hoping to help more new students, but also can comb their own knowledge of the HTML system, to consolidate the role of knowledge.

div

div tags are used to combine other HTML elements and are inherently meaningless. Often used in the layout of the page, such as an expanded AD page framework is roughly the following:

<body>    <div id="wrap-container">        <div id="collapsed-container"></div>        <div id="expanded-container"></div>    </div></body>
h1~h6, p, span, strong, em...

This type of label is used to set up text, the common way is to fill the paragraph, such as the pop-up legal box text HTML structure as follows:

  <div id= "Legal-window" >  

One of the things to note is b andstrong
bRepresents bold on a style
strongShow the importance of content, play an important role

ul, li, ol, dl, dt, dd

This type of label is used to set the contents of the list, such as the navigation bar drop-down menu, multi-video thumbnails and so on:

<ul class="nav-tools-list">    <li>        <div>                        <span>Build & Price</span>        </div>    </li>    <li>        <div>                        <span>Incentives & Offers</span>        </div>    </li>    <li>        <div>                        <span>Request a Local Quote</span>        </div>    </li>    <li>        <div>                        <span>Search Dealer Inventory</span>        </div>    </li></ul>
formForm related

When a form is involved in a page, you need to use a form-related tag:

<form name="frm-sample" class="frm-sample" action="try" method="post">    <input type="text" class="form-control" placeholder="Name">    <div id="status-message"></div>    <div id="sample-captcha"></div>    <a id="check-is-filled" class="info-btn">Check if visualCaptcha is filled</a>    <button type="submit" name="submit-bt" class="submit">Submit form</button></form>
a

A tag is used to open a link, send mail, paragraph jumps and other functions. You need to be aware of the default events that prevent labels from being used.

Link jumps, the common HTML structure about the share button is as follows:

<div id= "Sharebox" > <ul> <li id= "Facebook" > <a target= "_blank" rel= "nofollow" da            Ta-shareway= "Facebook" >  </a> </li> <li id= "Twitter" > <a target= "_blank" rel= "nofollow" da        ta-shareway= "Twitter" >  </a> </li> <li id= "Pinterest" > <a data-pin-do= "Buttonpin" data-pin-config= "None" target = "_blank" rel= "nofollow" data-shareway= "Pinterest" >  </li> <li id= "email" > <a target= "_blank" rel= "nofollow" data-shareway= " Email ">  </a> </li> </ul&gt    ; <p></p></div> 

Sometimes we come across a requirement that requires a link to be clicked and no action is generated.
JavaScript pseudo-protocol for a bit more.

On the understanding of HTML tags, we should also note that it is his semantics.

Semantic meaning is to use the correct label to do the right thing, HTML semantics is to make the content structure of the page, easy to browser, search engine analysis, in the absence of a style CCS is also displayed in a document format, and is easy to read.

For example, we need to create a navigation bar, then, we should be a new one div , no, this will lead to structural confusion is not good to distinguish, we should use the nav label to create a navigation bar, that nav is, navigation, navigation meaning, which is more conducive to the content structure of the page, Easy to maintain and read.

In this regard, learning HTML is the process of learning English, we only know the definition of a label, we only knew how to use him.

HTML common tags and HTML semantic understanding

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.