Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is HAML?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 328
    Comment on it

    HAML(HTML abstraction  markup language) provides an elegant syntax which is easy to understand, maintain and use.

    • It is introduced by Hampton Catlin with its initial release in 2006, it is used for making HTML simpler, easier and cleaner.
    • It gives flexibility to have some dynamic content in HTML, PHP, NODE.JS, ASP and in Ruby.
    • For running Haml code, file need to be saved with .haml extension.
    • The latest version of Haml is rubygem is 4.0.7 and 4.1.0

     

    Source code HAML: 

    %html
      %head 
        %title Welcome
      %body
        %h1 Explaination ul li
        %ul
          %li one
          %li two
          %li
            %ol
              %li one
              %li two
          %li three
          %li four
          %ul
            %li five
            %li six
            %li
              %ol
                %li seven
                %li eight
    %h1 link Used like this
    %h3
      %a{:href => '#', :class => 'bar', :title => 'Bar'}hello haml
      %h1 This is input box
      %input{:type => 'text'}
      %br
      %h1 Button
      %button submit

     

    Source Code LESS:

    ul {
      li {
        color: #000;
      }
    }
    h1{
      color:red
    }
     
    button{
      color:green;
      padding:2px 50px;
      font-size:18px;
    }

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: