Question

I'm in the process of coding my own Tumblr Theme.

Well I was wondering how should I list the posts? In the basic theme, (the one you get when you sign up) doesn't use list items (<li>). But I saw in another theme that it does use list items.

By the way, this is what I mean...

<div class="post-text"><div>
<div class="post-audio"><div>
...

or

<ul>
 <li class="post-text"></li>
...
</ul>

I'm confused on the way I should go - I want to go to the semantic way of doing it because the theme will be built in HTML5.

Was it helpful?

Solution

In Tumblr you can code it anyway you like - either by using list items, divs, or in your case sections, asides and nav.

I've mostly built themes using divs, seeing as you might end up with a case where you use lists within your post descriptions; in which case you'll end up with lists in lists in lists. Of course this is perfectly valid (beats using tables!), but for posterity sake I don't like it very much.

If you want scope out some code of a tumblr theme I've built using HTML5, check out Minimus - a commercial theme I've got going at themeforest :)

Hope it helps...

OTHER TIPS

It depends what your theme presents the posts as - are they separate divisions within the page, or are they a list of items for the user to browse over?

If you want to build it semantically, go with the right element. In this case, if you're going to be doing it in HTML5, I'd think that you would use a different tag entirely - I'd think that an <article> tag, or a <section> tag would better fit here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top