Use of Emmet plugins in sublime Text3

Source: Internet
Author: User

First, you want to quickly encode a common plugin in the editor, the following is the use of the Emmet plugin:

HTML5 how the document structure is generated:

1),!+tab key

2), Html:5 +tab key

Generation of the meta character set in head header:

1), Meta:utf + TAB key generation: <meta http-equiv= "Content-type" content= "Text/html;charset=utf-8" >

2), META:VP +tab key generation: <meta name= "viewport" content= "Width=device-width, User-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 "> Browser viewport

3), Meta:compat + TAB key generation: <meta http-equiv= "x-ua-compatible" content= "ie=8" > compatible to Browser IE8

4), Link:css +tab key generation: <link rel= "stylesheet" href= "Style.css" >

5), SCRIPT:SRC + TAB key generation: <script src= "" ></script>

Content body in the use of Emmet plugins:

1), generate tag with class style P.text +tab key

Generate <p class= "text" ></p>

2), generate label with ID style p#text +tab key

Generate <p id= "text" ></p>

3), a tag generates URL prefix a:link+tab key

Generated: <a href= "/http" ></a>

A label is the email address a:mail+tab key

<a href= "mailto:" ></a>

4), according to the location relationship between labels to generate labels

A), generate sibling, sibling tag, p tag after first sibling element P.box+span.box +tab key

Generated:

<p class= "box" ></p>
<span class= "box" ></span>

b), descendants tagged ul > li +tab key

If you generate multiple identical descendant labels eg ul > li*4 +tab key; indicates that 4 Li is generated

c), generate the parent of the current tag, also called the upper label H2 > Span.haha^div.info +tab key is H2 and Div is sibling element

Generated:

<div class= "Info" ></div>

5), generate tags while generating internal text a{text content}+tab key

Generated by: <a href= "" >php Chinese network </a>
6), generate tags, and generate some properties P[title = ' This is a description '] +tab key

Build: <p title= "This is a description" ></p>

When generating tags, properties and text content are also generated directly such as a[href= ' www.baidu.com ']{Baidu search} +tab key

Generated: <a href= "www.baidu.com" > Baidu search </a>

7), quickly generate a navigation with 8 list items such as ul.list>li.items*8>a{navigation bar information} +tab key

Generated:

<ul class= "list" ><li class= "items" ><a href= "" > Navigation bar Information </a></li><li class= "items" > <a href= "" > Navigation bar Info </a></li><li class= "items" ><a href= "" > Navigation bar Info </a></li> <li class= "Items" ><a href= "" > Navigation bar Information </a></li><li class= "items" ><a href= "" > Navigation bar Information </a></li><li class= "Items" ><a href= "" > Navigation bar Information </a></li><li class= "items" > <a href= "" > Navigation bar Info </a></li><li class= "items" ><a href= "" > Navigation bar Info </a></li> </ul>

8), automatically add numbers or sort labels to tags: $,@

A),ul.list>li.items*5>a{navigation bar $}+tab key

<ul class= "list" ><li class= "items" ><a href= "" > Navigation bar 1</a></li><li class= "Items" > <a href= "" > Navigation bar 2</a></li><li class= "items" ><a href= "" > Navigation bar 3</a></li>< Li class= "items" ><a href= "" > Navigation bar 4</a></li><li class= "items" ><a href= "" > Navigation bar 5</a ></li></ul>

      ul.list>li.items*5>a{navigation bar $$} +tab key

<ul class= "list" ><li class= "items" ><a href= "" > Navigation bar 01</a></li><li class= "Items" > <a href= "" > Navigation bar 02</a></li><li class= "items" ><a href= "" > Navigation bar 03</a></li> <li class= "Items" ><a href= "" > Navigation bar 04</a></li><li class= "items" ><a href= "" > Navigation bar 05 </a></li></ul>

    ul.list>li.items*5>a{navigation bar $$$} +tab key

Automatically add numbers or sort labels to tags: $,@<ul class= "list" ><li class= "items" ><a href= "" > Navigation bar 001</a></li> <li class= "Items" ><a href= "" > Navigation bar 002</a></li><li class= "items" ><a href= "" > Navigation bar 003</a></li><li class= "items" ><a href= "" > Navigation bar 004</a></li><li class= " Items "><a href=" "> Navigation bar 005</a></li></ul>

b) ul.list>li.items*5>a{navigation bar [email protected]} + TAB----Indicate descending display list items

ul.list>li.items*5>a{navigation [email protected]}+tab key <ul class= "list" ><li class= "items" ><a href= "" > Navigation bar 05</a></li><li class= "items" ><a href= "" > Navigation bar 04</a></li><li class= " Items "><a href=" "> Navigation bar 03</a></li><li class=" items "><a href=" "> Navigation bar 02</a>< /li><li class= "Items" ><a href= "" > Navigation bar 01</a></li></ul>

c), starting from the specified number, @ followed by the digital ul.list>li.items*5>a{navigation bar [email protected]}---means starting from 100

<ul class= "list" ><li class= "items" ><a href= "" > Navigation bar 100</a></li><li class= "items" ><a href= "" > Navigation bar 101</a></li><li class= "items" ><a href= "" > Navigation bar 102</a></li ><li class= "Items" ><a href= "" > Navigation bar 103</a></li><li class= "items" ><a href= "" > Navigation bar 104</a></li></ul>

More Emmet usage can be found on the official website.

Use of Emmet plugins in sublime Text3

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.