diff --git a/README.md b/README.md index 8b116f2..bb422c2 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ Feel free to take a look. You might learn new things. They have been designed to - [cURL](tools/curl.sh) - [Elasticsearch](tools/elasticsearch.js) +- [Emmet](tools/emmet.md) - [Git](tools/git.sh) - [Puppeteer](tools/puppeteer.js) - [Sublime Text](tools/sublime_text.md) diff --git a/tools/emmet.md b/tools/emmet.md new file mode 100644 index 0000000..64f6b52 --- /dev/null +++ b/tools/emmet.md @@ -0,0 +1,217 @@ +# EMMET +*The essential toolkit for web-developers* + +## Introduction +Emmet is a productivity toolkit for web developers that uses expressions to generate HTML snippets. + +## Installation +Normally, installation for Emmet should be a straight-forward process from the package-manager, as most of the modern text editors support Emmet. If you have difficulty setting up emmet with your editor and wish to check Emmet is supported by your favourite editor or not, you can check it from here. [Emmet Installation instructions](https://emmet.io/download/) + +## Usage +You can use Emmet in two ways: +* Tab Expand Way: Type your emmet code and press `Tab` key +* Interactive Method: Press `alt + ctrl + Enter` and start typing your expressions. This should automatically generate HTML snippets on the fly. + +__This cheatsheet will assume that you press `Tab` after each expressions.__ + +## Basics + +### Generating HTML 5 DOCTYPE +`html:5` +Will generate + +```HTML + + +
+ + + +| + | + | + | + | + |
|---|---|---|---|---|
This is paragraph
+This is paragraph
+``` + +### Attributes inside HTML tags +Attributes can be added using `[]` + +`a[href=https://google.com data-toggle=something target=_blank]` + +```HTML + +``` + +### Numbering +Numbering can be done using `$` +You can use this inside tag or contents. + +`h${This is so awesome $}*6` + +```HTML +
+
+
+
+
+```
+
+To start the numbering from specific number, use this way
+
+`img[src=emmet$@100.jpg]*5`
+
+```HTML
+
+
+
+
+
+```
+
+## Tips
+* Use `:` to expand known abbreviations
+
+`input:date`
+```HTML
+
+```
+
+`form:post`
+```HTML
+
+```
+
+`link:css`
+```html
+
+```
+
+* Building Navbar
+
+`.navbar>ul>li*3>a[href=#]{Item $@-}`
+
+```HTML
+
+```