Jump To Content

LearnHub



What is Your Markup Style? (Discussion)

Carsten saidThu, 23 Oct 2008 19:58:36 -0000 ( Link )

For the most part, I like to wrap meaningful elements in <div> or <span> elements that reference the CSS classes that I want to apply to the elements within them. For example instead of:

<h3 class="content-block-title">Heading</h3>
                      

I would do:

<div class="content-block-title">
                        <h3>Heading</h3>
                      </div>
                      

It might seem silly for something this simple, but when you factor this ideolgy into an entire page I find it keeps the markup readable. I also find it strangely easier to create stylesheets against pages that are marked up like this.

What methods do other designers out there use?

Actions
Vote
Current Rating
0
Rate Up
Rate Down
No Votes
Your Response
Textile is Enabled (View Reference)