Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a shorthand version of HTML available?

I remember reading an article about a shorthand version, or extension, of HTML a few months ago. Its purpose was to make HTML code significantly more concise, by removing end tags, and it may have allowed loops of some sort as well. I want to use it now, but I can't seem to remember what it was called.

Searching online, I found Haml, but Haml syntax doesn't look like the example that I remember from the article. The syntax from the article made use of right angle brackets, which were a sort of replacement for indentation.

What is this language?

like image 292
monguin Avatar asked Jun 09 '10 14:06

monguin


People also ask

How do you make HTML code readable?

For readability, add blank lines to separate large or logical code blocks. For readability, add two spaces of indentation. Do not use the tab key.

How many HTML tags are there?

There are four required tags in HTML. These are html, title, head and body. The table below shows you the opening and closing tag, a description and an example. These are the tags you put at the beginning and end of an HTML file.


2 Answers

Update

Zen Coding has been renamed to Emmet and has its codebase at GitHub.


I think you are looking for Zen Coding, which can be found at http://code.google.com/p/zen-coding/.

Zen Coding is an editor plugin for high-speed HTML, XML, XSL (or any other structured code format) coding and editing. The core of this plugin is a powerful abbreviation engine which allows you to expand expressions—similar to CSS selectors—into HTML code.

Example

div#page>div.logo+ul#navigation>li*5>a

Expands into

<div id="page">
  <div class="logo"></div>
  <ul id="navigation">
    <li><a href=""></a></li>
    <li><a href=""></a></li>
    <li><a href=""></a></li>
    <li><a href=""></a></li>
    <li><a href=""></a></li>
  </ul>
</div>
like image 101
sshow Avatar answered Sep 29 '22 08:09

sshow


To answer the general question (from the title) yes there are quite a few.

These are a few that I have looked at for my own work:

  • Jade
  • Haml
  • SHH
  • Slim

If you add more in comments I can add them to the answer (and they will also exist in the comments).

like image 32
QueueHammer Avatar answered Sep 29 '22 08:09

QueueHammer