Is there a language I can use to write my website's HTML, which:
For example, it should be to HTML what CoffeeScript is to JS.
Also, what is your experience with whatever you suggest?
Also have a look at Comparison of web template engines and Scala Tags
An HTML tag is a special word or letter surrounded by angle brackets, < and >. You use tags to create HTML elements , such as paragraphs or links. Many elements have an opening tag and a closing tag — for example, a p (paragraph) element has a <p> tag, followed by the paragraph text, followed by a closing </p> tag.
Copied! HTML stands for HyperText Markup Language. It is a standard markup language for web page creation. It allows the creation and structure of sections, paragraphs, and links using HTML elements (the building blocks of a web page) such as tags and attributes.
The <i> tag in HTML is used to display the content in italic style. This tag is generally used to display the technical term, phrase, the important word in a different language. The <i> tag is a container tag that contains the opening tag, content & closing tag. Syntax: <i> Contents</i>
A good choice is Haml. In Haml, you write highly structured markup that resembles a stripped-down form of HTML, and where common things have easy shortcuts. For example, adding an element, div, id, or class is done just by changing one character.
It even lets you pass variables in and operate on them in the language of your choice by deferring to a scripting language, so it's actually more powerful than HTML since the implicit scripting makes it Turing-complete.
Here's an example:
%body #header %h1 Bob Loblaw's Law Blog %h2 by Bob Loblaw #content - @entries.each do |entry| .entry %h3.title= entry.title %p.date= entry.posted #footer %p All content copyright © Bob Loblaw. This becomes something like:
<div id='header'> <h1>Bob Loblaw's Law Blog</h1> <h2>by Bob Loblaw</h2> </div> <div id='content'> <div class='entry'> <h3 class='title'>You don't need double-talk; you need Bob Loblaw</h3> <p class='date'>Tuesday, October 31, 2006</p> </div> <div class='entry'> <h3 class='title'>Why should you go to jail for a crime someone else noticed?</h3> <p class='date'>Friday, August 11, 2006</p> </div> </div> <div id='footer'> <p> All content copyright © Bob Loblaw. </p> </div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With