CodeCanyon

How do you organize your markup?

352 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Germany
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
chack says

Hey,

I’m just thinking about a readable and easy to understand markup for my HTML . Till yet I tried
<div id="big div"> </div>
--- <div id="smaller div" />
----- <p>bliblablu</p>
---

But this can also get the opposite effect and will disturb the optic if you use much spacing and lines which are divided into 2.

So I’m still searching for a way to set my markup :(

How do you design your markup and are you using some tools for it like styeneat (what im using for my CSS ).

Edit: I see they don’t add my spaces so Im using -

38 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Netherlands
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
WouterToering says
I always use:
<div id="someid">
    <div id="child">
        <h3>Title perhaps?</h3>
        <p>My paragraph</p>
    </div>
</div>

So it looks pretty much like yours, This is the best way for me imho :P

(Took me a while to use the pre command in stead of code lol :P)

352 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Germany
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
chack says

Well, thats my scheme :)

960 posts
  • Sold between 100 and 1 000 dollars
  • Has been a member for 3-4 years
  • Bought between 10 and 49 items
  • Exclusive Author
  • Microlancer Beta Tester
  • United States
fillerspace says

Be sure to use classes so that you can change the style consistently across the entire page without repeating your style rules. For example that div id=”child” could be a div class=”child” and then you can style the class like this: div .child {padding:20px; line-height: 1.7em;} etc. so that every div with a child looks the same.

352 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Germany
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
chack says

Of course but that’s not my question :)

I wanted to know how you style the markup for buyers so they can understand & edit the theme like they want.

1965 posts Review Manager
  • Envato Staff
  • Has been a member for 4-5 years
  • Attended a Community Meetup
  • Australia
  • Beta Tester
  • Contributed a Blog Post
  • Contributed a Tutorial to a Tuts+ Site
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
+7 more
jremick staff says
249 posts
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 50 and 99 users
  • Sold between 100 000 and 250 000 dollars
  • Won a Competition
der says
This might be helpful: http://blog.themeforest.net/tutorials/examples-and-tips-for-great-htmlcss-formatting/

Very nice article you’ve got there! indeed very useful!

659 posts
  • Sold between 5 000 and 10 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
  • Microlancer Beta Tester
ChillThemes says

Here’s the way I format my markup, I comment everything where it ends so I know what DIV is being closed.

<div id="some-id">
    <div class="some-class">
        Content
    </div><!-- .some-class -->
</div><!-- #some-id -->
352 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Germany
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
chack says

Thats very usefull, particularly for long code.

by
by
by
by
by