Say a sublime Text 2 plugin, Emmet (formerly: Zen Coding)

Source: Internet
Author: User
Tags convert text to html

Tools/Materials
    • Sublime Text 2

    • Installing the Emmet Plugin

Method/Step
  1. To generate the initial structure of the HTML document:

    !<tab>

    <!doctype html>

    <meta charset= "UTF-8" >

    <title>Document</title>

    <body></body>

    Html:5<tab>

    <!doctype html>

    <meta charset= "UTF-8" >

    <title>Document</title>

    <body></body>

    Html:xs<tab>

    <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >

    <meta http-equiv= "Content-type" content= "Text/html;charset=utf-8" >

    <title>Document</title>

    <body></body>

    Html:4s<tab>

    <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD" >

    <meta http-equiv= "Content-type" content= "Text/html;charset=utf-8"/>

    <title>Document</title>

    <body></body>

  2. To generate a label with Id,class:

    Emmet default tag is div

    #id <tab>

    <div id= "id" ></div>

    P#id<tab>

    <p id= "id" ></p>

    H1#id<tab>

    <H1 id= "id" >

    Span#id<tab>

    <span id= "id" ></span>

    .class<tab>

    <div class= "Class" ></div>

    P.class<tab>

    <p class= "Class" ></p>

    H1.class<tab>

    <H1 class= "Class" >

    Span.class<tab>

    <span class= "Class" ></span>

    Enter more than one class to add two. Class1.class2

    .class1.class2<tab>

    <div class= "Class1 class2" ></div>

  3. Grammar:

    Grammar:

    Generation of descendants

    DIV>SPAN>P>H1 <tab>

    <div>

    <span>

    <p>

    </p>

    </span>

    </div>

    +: Generation Peers

    DIV+SPAN+P+H1 <tab>

    <div></div>

    <span></span>

    <p></p>

    ^: Production of tertiary generation

    Div>span>p^h1<tab>

    <div>

    <span>

    <p></p>

    </span>

    </div>

    *: Generate duplicate multiple points

    Ul>li*3 <tab>

    <ul>

    <li></li>

    <li></li>

    <li></li>

    </ul>

    (): Generate grouping

    Ul> (li.li_1*3) + (li.li_2*3) <tab>

    <ul>

    <li class= "Li_1" ></li>

    <li class= "Li_1" ></li>

    <li class= "Li_1" ></li>

    <li class= "Li_2" ></li>

    <li class= "Li_2" ></li>

    <li class= "Li_2" ></li>

    </ul>

    [attr]: Build Properties

    A[href=index.html title=index]<tab>

    <a href= "index.html" title= "index" ></a>input[type=button]

    Input[type=submit name=submit]<tab>

    <input type= "Submit" Name= "Submit" >

    $: The number of generated numbers is the number of digits @ The specified start number @– reverse

    Ul>li.li_$*3<tab>

    <ul>

    <li class= "Li_1" ></li>

    <li class= "Li_2" ></li>

    <li class= "Li_3" ></li>

    </ul>

    Ul>[email Protected]*3,

    <ul>

    <li class= "Li_0" ></li>

    <li class= "Li_1" ></li>

    <li class= "Li_2" ></li>

    </ul>

    Ul>[email protected]*3

    <ul>

    <li class= "Li_3" ></li>

    <li class= "Li_2" ></li>

    <li class= "Li_1" ></li>

    </ul>

    {}: Generate content

    P{$}*3<tab>

    <p>1</p>

    <p>2</p>

    <p>3</p>

    A[href=index.html]{click}+a[href=test.html]{mouseover}<tab>

    <a href= "index.html" >click</a>

    <a href= "test.html" >mouseover</a>

    Senior:

    lorem*: Generate Test text, * denotes 0-Unlimited default 30 words

    P>lorem2<tab>

    <p>lorem ipsum.</p>

    P>lorem4<tab>

    <p>lorem ipsum dolor sit.</p>

    P>lorem6<tab>

    <p>lorem ipsum dolor sit amet, consectetur.</p>

    P>lorem<tab>

    <p>lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum, Delectus nostrum pariatur accusamus necessitatibus maiores ut natus id sit ab vel assumenda ratione harum quas ad Ipisci Eveniet temporibus praesentium ducimus!</p>

    Socket function

    <ul>

    <li></li>

    <li></li>

    <li></li>

    </ul>

    After select all, Ctrl+shirt+g, enter div.demo1>h1{test1}+div.test2<tab>

    <div class= "Demo1" >

    <div class= "Test2" >

    <ul>

    <li></li>

    <li></li>

    <li></li>

    </ul>

    </div>

    </div>

    Convert Text to HTML tags

    1. Pupils

    2. Middle School students

    3. College students

    4. Postgraduate

    5. Doctoral students

    After select all: Ctrl+shift+g input:ul>li*>a<tab>

    <ul>

    <li><a href= "" >1. Elementary school </a></li>

    <li><a href= "" >2. Middle School students </a></li>

    <li><a href= "" >3. College </a></li>

    <li><a href= "" >4. Graduate </a></li>

    <li><a href= "" >5. PhD </a></li>

    </ul>

    Remove all serial numbers

    Ul>li*>a|t<tab>

    <ul>

    <li><a href= "" > Pupils </a></li>

    <li><a href= "" > Middle school students </a></li>

    <li><a href= "" > College students </a></li>

    <li><a href= "" > Postgraduate </a></li>

    <li><a href= "" > PhD </a></li>

    </ul>


Say a sublime Text 2 plugin, Emmet (formerly: Zen Coding)

Related Article

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.