Quickly write HTML code in conjunction with Zen Coding (Sublime Text2 article)

Source: Internet
Author: User

First of all, how to add Zen coding plugins in Sublime Text2

Press CTRL + ' (that is ~ this key) to copy the following code to confirm the restart sublime Text2

Import urllib2,os;pf=' packagecontrol.sublime-package'ifelse None;o Pen (Os.path.join (IPP,PF),'wb'). Write (Urllib2.urlopen ('http:// sublime.wbond.net/'+pf.replace (','%20' ) )). Read ())

Restart see as shown in successful installation on behalf of the package Control

The next step is to temporarily share the grammar of Zen coding that you are not so familiar with.

1. Create a new HTML

Do not know how to create a new HTML page, how to enter the document declaration and head that a lump of things. Now with Zen Coding, you can instantly generate an HTML framework for the corresponding document declaration by typing in a few letters.

4.014.011.0 1.01.1)HTML:  5 (HTML5)

Then press ctrl+e, and you'll be able to create a new success

2. If you are familiar with CSS selectors, you can write HTML code efficiently with a short code similar to CSS selectors.

div#header>div#logo+ul.nav>li.item-$*5>a

Then click on the shortcut key Ctr+e, will automatically generate the following HTML code:

<div id="Header"> <div id="logo"></div> <ulclass="nav"> <liclass="item-1"><a href=""></a></li> <liclass="item-2"><a href=""></a></li> <liclass="item-3"><a href=""></a></li> <liclass="item-4"><a href=""></a></li> <liclass="item-5"><a href=""></a></li> </ul></div>

Some abbreviations that are commonly used in 3.head

Meta:utf, Meta:compatstyle, Link:css, Link:print, Link:favicon, Link:rss,script, SCRIPT:SRC

The above is only about the abbreviation of HTML, CSS abbreviations are more, it is recommended to view Zen Coding Small copy , learning CSS Zen Coding Way

RELATED links:http://rpsh.net/archives/zen-coding-npp/

http://www.cn-sass.com/blog/32.html

Quickly write HTML code in conjunction with Zen Coding (Sublime Text2 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.