Emmet(zen coding)

15
Emmet(Zen Coding) Overview
  • Upload

    -
  • Category

    Education

  • view

    3.284
  • download

    0

description

Simple overview of Emmet technology

Transcript of Emmet(zen coding)

Page 1: Emmet(zen coding)

Emmet(Zen Coding)Overview

Page 2: Emmet(zen coding)

What is Emmet?

Page 3: Emmet(zen coding)

“Emmet (previously known as Zen Coding)

is a web-developer’s toolkit that can greatly improve your HTML & CSS workflow:”

Emmet web site

Page 4: Emmet(zen coding)

How to Install it?

Page 5: Emmet(zen coding)

You should have one of those IDE

Page 6: Emmet(zen coding)

Download Emmet plugin:

Go to http://docs.emmet.io/ and chose your favorite IDE from the list.

Follow the instruction and install the plugin

Some editors support package control and console line plugin installation

Page 7: Emmet(zen coding)

Syntax

Page 8: Emmet(zen coding)

Expand single element (element name)

You type:

div

p

img

You get:

<div></div>

<p></p>

<img src="" alt="">

Page 9: Emmet(zen coding)

Expand multiple elements (*n)

You type:

div*2

p*3

img*2

You get:

<div></div><div></div>

<p></p><p></p><p></p><p></p>

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

Page 10: Emmet(zen coding)

Add Custom text in elements({})

You type:

p{Lorem ipsum}

a{Click me}

You get:

<p>

Lorem ipsum

</p>

<a href=“”>Click me</a>

Page 11: Emmet(zen coding)

Element nesting (>) child nesting

You type:

ul>li

div>p

You get:

<ul>

<li></li>

</ul>

<div>

<p></p>

</div>

Page 12: Emmet(zen coding)

Element nesting (+) siblings nesting

You type:

div+div>p+span

You get:

<div></div>

<div>

<p></p>

<span></span>

</div>

Same Level as second div

Same Level as the p element

Page 13: Emmet(zen coding)

Element nesting (^) climb up

You type:

div>p>span^span

You get:

<div>

<p>

<span></span>

</p>

<span></span>

</div>

Level 2 nesting Back to Level 1

Page 14: Emmet(zen coding)

Element nesting (^) climb up

You type:

div>p>span^^span

You get:

<div>

<p>

<span></span>

</p>

</div>

<span></span>

Level 2 nesting

Outside of nesting

Page 15: Emmet(zen coding)

Attributs

Id attribute:

div#header

class attribute

div.someHeader

custom attribute

div[name = “theHead”]

<div id=“header”>

</div>

<div class=“someHeader”>

</div>

<div name=“theHead”>

</div>