6.S063 Design for the Web: Languages and User Interfaces

Emmet

Emmet is a set of plugins for text editors which enables rapid editing and coding of HTML. Emmet uses syntax similar to CSS selectors to generate html code.

Integration with Editors

Examples

Creating a basic skeleton for an html page.

html:5
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
<link rel="shortcut icon" href="/favicon.svg">
</head>
<body>

</body>
</html>

Creating a simple semantic layout with header, main, sections, and a footer.

header+main>sections*3^footer
<header></header>
<main>
  <sections></sections>
  <sections></sections>
  <sections></sections>
</main>
<footer></footer>

Creating a table with 5 rows and 3 columns.

table>tr*5>td*3
<table>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>

Resources