Be Genius


Bo Jeanes

I am an software engineer who has lived and worked in New York, Brisbane, Chicago, San Francisco, and now Melbourne. I primarily work in Ruby though am a functional programmer at heart and a fan of programming languages in general. In particular, I love Rust and Clojure but keep my eye on many langauges all the time.

Iterative HTML5 - Turning a comma-separated list into a semantic list

In the process of going through the redesign of, I keep finding better ways to make the HTML more semantic.

Jack Chen and I have been turning the design into HTML over the last few days and we’ve been striving to be as semantic as possible by taking advantage of new HTML5 elements and by separating the content further from the design code with all the new CSS3 selectors.

Here’s an example of something we just did to make the HTML cleaner and more meaningful, whilst still maintaining the look and style.

Here’s what we are styling:


Usually your HTML (or HAML in this case) would look something like this:

    = link_to 'Dr Nic Williams', ''
    = link_to 'Bodaniel Jeanes', ''
    = link_to 'Jack Chen', ''
    = link_to 'Ryan Bigg', ''

However, we can make this list of people more semantic by using an <ul> element and some CSS magic.

Here’s what the new HTML (HAML here) would look like:

      %li= link_to 'Dr Nic Williams', ''
      %li= link_to 'Bodaniel Jeanes', ''
      %li= link_to 'Jack Chen',       ''
      %li= link_to 'Ryan Bigg',       ''

And the CSS (Sass here):

      padding-top: 6px
      float: left

        list-style: none
        margin: 0
        padding: 0

          display: inline

            content: ","

            content: ""


None yet

You need to login with GitHub in order to comment.