Emmet最全提示说明

Emmet最全提示说明

前一篇文章简单了说明了Emmet的使用:Emmet相关使用

今天我就将关于subline中Emmet插件的snippets.json文件进行具体说明,

在snippets.json文档中,我们能够看到Emmet能够支持多种文档格式的语法提示

如:variables,css,html,xml,xsl,haml,scss,sass等,仅仅要装了Emmet插件,我们就能够利用Emmet的简洁高效的写法来编写自己的html文档.

以下就当中的html来进行说明

1.输入 !!!  ,会被扩展为

 <!doctype html>

2.输入!!!4t,
会被扩展为

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  

3.输入!!!4s
,
会被扩展为

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

4.输入!!!xt
,
会被扩展为

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

5.输入!!!xs
,
会被扩展为

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

6..输入!!!xxs,会被扩展为

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

7.输入c
,
会被扩展为

<!--  -->

8.
输入
cc:ie6
,
会被扩展为

<!--[if lte IE 6]>
        
<![endif]-->

9.
输入
cc:ie
,
会被扩展为

<!--[if IE]>
        
<![endif]-->

10.
输入
cc:noie
,
会被扩展为

<!--[if !IE]><!-->
        
<!--<![endif]-->

11.
输入
!或者html:5
,
会被扩展为

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

</body>
</html>

12.
输入
a
,
会被扩展为

<a href=""></a>

13.
输入
a:link
,
会被扩展为

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

14.
输入
a:mail
,
会被扩展为

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

15.
输入
abbr
,
会被扩展为

<abbr title=""></abbr>

16.
输入
acronym(h5废弃)
,
会被扩展为

<acronym title=""></acronym>

17.
输入
base
,
会被扩展为

<base href=""/>

18.
输入
col
,
会被扩展为

<col/>

19.
输入
link:css
,
会被扩展为

<link rel="stylesheet" href="style.css"/>

20.
输入
link:print
,
会被扩展为

<link rel="stylesheet" href="print.css" media="print"/>

21.输入link:favicon,会被扩展为

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>

22.输入link:touch,会被扩展为<

<link rel="apple-touch-icon" href="favicon.png"/>

23.输入style,会被扩展为

<style></style>

24.输入script:src,会被扩展为

<script src=""></script>

25.输入img,会被扩展为

<img src="" alt=""/>

26.输入embed,会被扩展为

<embed src="" type=""/>

27.输入object,会被扩展为

<object data="" type=""></object>

28.输入param,会被扩展为

<param name="" value=""/>

29.输入area,会被扩展为

<area shape="" coords="" href="" alt=""/>

30.输入area:d,会被扩展为

<area shape="default" href="" alt=""/>

31.输入area:c,会被扩展为

<area shape="circle" coords="" href="" alt=""/>

32.输入area:r,会被扩展为

<area shape="rect" coords="" href="" alt=""/>

33.输入form:get,会被扩展为

<form action="" method="get"></form>

34.输入form:post,会被扩展为

<form action="" method="post"></form>

35.输入input:hidden,会被扩展为

<input name="" type="hidden"/>

36.输入select:disabled,会被扩展为

<select name="" id="" disabled=""></select>

37.输入menu:context,会被扩展为

<menu type="context"></menu>

38.输入html:xml,会被扩展为

<html xmlns="http://www.w3.org/1999/xhtml"></html>

然后,还有非常多简写的html元素缩写,我就不一一列举了,以下:

“bq”: “blockquote”,
“acr”: “acronym”,
“fig”: “figure”,
“figc”: “figcaption”,
“ifr”: “iframe”,
“emb”: “embed”,
“obj”: “object”,
“src”: “source”,
“cap”: “caption”,
“colg”: “colgroup”,
“fst”: “fieldset”,
“fst:d”: “fieldset[disabled]”,
“btn”: “button”,
“btn:b”: “button[type=button]”,
“btn:r”: “button[type=reset]”,
“btn:s”: “button[type=submit]”,
“btn:d”: “button[disabled]”,
“optg”: “optgroup”,
“opt”: “option”,
“tarea”: “textarea”,
“leg”: “legend”,
“sect”: “section”,
“art”: “article”,
“hdr”: “header”,
“ftr”: “footer”,
“adr”: “address”,
“dlg”: “dialog”,
“str”: “strong”,
“prog”: “progress”,
“fset”: “fieldset”,
“fset:d”: “fieldset[disabled]”,
“datag”: “datagrid”,
“datal”: “datalist”,
“kg”: “keygen”,
“out”: “output”,
“det”: “details”,
“cmd”: “command”,
“doc”: “html>(head>meta[charset=UTF-8]+title{${1:Document}})+body”,
“doc4”: “html>(head>meta[http-equiv=\”Content-Type\” content=\”text/html;charset=${charset}\”]+title{${1:Document}})+body”,

“html:4t”:  “!!!4t+doc4[lang=${lang}]”,
“html:4s”:  “!!!4s+doc4[lang=${lang}]”,
“html:xt”:  “!!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]”,
“html:xs”:  “!!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]”,
“html:xxs”: “!!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]”,
“html:5”:   “!!!+doc[lang=${lang}]”,


“ol+”: “ol>li”,
“ul+”: “ul>li”,
“dl+”: “dl>dt+dd”,
“map+”: “map>area”,
“table+”: “table>tr>td”,
“colgroup+”: “colgroup>col”,
“colg+”: “colgroup>col”,
“tr+”: “tr>td”,
“select+”: “select>option”,
“optgroup+”: “optgroup>option”,
“optg+”: “optgroup>option”

假设对snippets.json具体内容感兴趣,或者想自己自己定义扩展Ememt使用方法,能够下载该文件并去Ememt官方站点上了解.


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/119006.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 经典SQL语句大全

    经典SQL语句大全SQL语句参考,包含Access、MySQL以及SQLServer基础创建数据库CREATEDATABASEdatabase-name删除数据库dropdatabasedbname备份sqlserver创建备份数据的deviceUSEmasterEXECsp_addumpdevice’disk’,’testBack’,’c:\mssql7backup\MyN

    2022年4月29日
    41
  • c++cstring头文件_fstream头文件

    c++cstring头文件_fstream头文件函数strcpy原型:char*strcpy(char*s1,constchar*s2);作用:将字符串2复制到字符数组1当中去说明:字符数组1的长度应不小于字符串2的长度”字符数组1″必须写成数组名形式,”字符串2″可以为字符数组名,也可以是一个字符串常量在未对字符数组1赋初值时,复制时将”字符串2″中的字符串和其后的”/0″一

    2025年11月4日
    3
  • java 创建数组的三种方式及区别

    java 创建数组的三种方式及区别创建数组的三种方式 其实分为 2 类 一种是静态的创建 如方式一 一种是动态的创建 只不过根据写法的不同分为方式二和方式三 数组初始化的三种方式 1 声明 分配空间并赋值 int arr0 0 1 2 2 int arr1 声明 此时存放一个引用 为 nullarr1 newint 0 1 2 分配空间并赋值 3 int arr2

    2026年1月29日
    1
  • myeclipse中,项目上有个叉报错,文件没有错误[通俗易懂]

    myeclipse中,项目上有个叉报错,文件没有错误

    2022年1月19日
    46
  • java中重定向和转发的区别_java中转发和重定向的使用区别

    java中重定向和转发的区别_java中转发和重定向的使用区别java重定向和转发的区别response.sendredirect("http://www.foo.com/path/error.html");重定向和转发有一个重要的不同:当使用转发时,JSP容器将使用一个内部的方法来调用目标页面,新的页面继续处理同一个请求,而浏览器将不会知道这个过程。与之相反,重定向方式的含义是第一个页面通知浏览器发送一个新的页面请求。因为,当你使用重定向时,浏览器中所…

    2025年8月29日
    12
  • 教你win10系统显卡驱动安装失败的解决方法【系统天地】

    教你win10系统显卡驱动安装失败的解决方法【系统天地】我们日常在对电脑的使用过程中,经常都会遇到这样或那样的问题。比如说win10系统显卡驱动安装失败该怎么办呢?别着急,还有小编在呢?接下来小编就来告诉大家win10电脑系统显卡驱动安装失败怎么解决。详细教你win10系统显卡驱动安装失败怎么办:方法一,删除之前的显卡驱动文件重新安装1,首先,右键点击“此电脑”,菜单栏选择“管理”。2,进入计算机管理界面后,点击“设备管理器”,然后在界面右侧展开“显示适配器”选项,并右键点击显卡驱动程序,菜单栏选择“属性”下一步。3,点击“卸载设备”。4,显卡驱动程

    2022年5月22日
    37

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号