Attention Firefox 2 user: your browser is out of date. Please visit http://getfirefox.com to get the newest version!

webbunny tumblelog

 

Photoshop is completely irrelevant when it comes to proper web development. Your tools are HTML & CSS, not some over-priced, crappy piece of Adobe software.

Design is how well thought-out something is, not how many layers in your PSD you have. Armed with nothing but free software, even on the most basic computer, you can single-handily invent the next greatest website, rivalling the biggest corporations with highly paid developers.

Never forget that—with just Notepad, you can take on the world.

Kroc Camen of Camen Design (his new site is coming soon, and is beautiful - on the outside and inside!)
 
No, no, no! You’re doing it wrong!

You may want orange text, and that may be a lovely orange, but this is completely the wrong way to go about doing it. The whole point of CSS is that it should be a separate layer of styling which is added to your website, and can be interchangeable. You should be able to change the colour of that orange text some day.

To use a class name such as ‘orangetext’ you are completely missing the point. When it comes to changing that orange to perhaps a blue or green, you are going to either:

Have something in your HTML called ‘orangetext’ that is blue, causing confusion to anyone else looking at your code (and to your future self, when you forget why you did this)
Or you have to go through your website replacing ‘orangetext’ with something else

Neither of these outcomes are desirable.

So what should I do?



Solution 1: Use class and id names that describe the content, not the presentation. Perhaps simply use the <em> tag, which implies an emphasis; or <strong>, which implies a strong emphasis


Solution 2: Use HTML5 and CSS3 to completely eradicate class names. It can be done (that website has no <divs>, no classes, no ids). This not only makes your code future-proof, but also beautiful.

I have not yet got to the point where I am building websites without classes (one major hurdle is Internet Explorer support, as usual) but at the very least you should make sure your class names are representative of the content and not the presentation. A couple of examples follow:

BAD: <span class='orangetext'>     GOOD: <em>
BAD: <p class='title'>     GOOD: <h1>

No, no, no! You’re doing it wrong!

You may want orange text, and that may be a lovely orange, but this is completely the wrong way to go about doing it. The whole point of CSS is that it should be a separate layer of styling which is added to your website, and can be interchangeable. You should be able to change the colour of that orange text some day.

To use a class name such as ‘orangetext’ you are completely missing the point. When it comes to changing that orange to perhaps a blue or green, you are going to either:

  • Have something in your HTML called ‘orangetext’ that is blue, causing confusion to anyone else looking at your code (and to your future self, when you forget why you did this)
  • Or you have to go through your website replacing ‘orangetext’ with something else

Neither of these outcomes are desirable.

So what should I do?

  • Solution 1: Use class and id names that describe the content, not the presentation. Perhaps simply use the <em> tag, which implies an emphasis; or <strong>, which implies a strong emphasis
  • Solution 2: Use HTML5 and CSS3 to completely eradicate class names. It can be done (that website has no <divs>, no classes, no ids). This not only makes your code future-proof, but also beautiful.

I have not yet got to the point where I am building websites without classes (one major hurdle is Internet Explorer support, as usual) but at the very least you should make sure your class names are representative of the content and not the presentation. A couple of examples follow:

BAD: <span class='orangetext'>     GOOD: <em>
BAD: <p class='title'>     GOOD: <h1>

 
This aggravates me very much. If you produce a new website with code like this then you should not be in the business of making websites.

Not only do you devalue the profession, but you produce utter crap that lowers everybody&#8217;s expectations on the web. You encourage browsers to be lazy with new CSS features because you are not using them. You discourage people to upgrade their browsers because your site does not look right in standards-based browsers. You are therefore indirectly responsible for the slow adoption of new browsers, and the stagnating of the web as a whole.

Get off my internet! &lt;/rant&gt;

This aggravates me very much. If you produce a new website with code like this then you should not be in the business of making websites.

Not only do you devalue the profession, but you produce utter crap that lowers everybody’s expectations on the web. You encourage browsers to be lazy with new CSS features because you are not using them. You discourage people to upgrade their browsers because your site does not look right in standards-based browsers. You are therefore indirectly responsible for the slow adoption of new browsers, and the stagnating of the web as a whole.

Get off my internet! </rant>

 

HTML5 Print Style Sheets - an idea

I just had a great idea how coding your site in HTML5 can allow you to utilise a universal print stylesheet.

A great print stylesheet called Hartija is available on Google Code, but it still requires that you alter the stylesheet to hide your header, nav, footer, etc.

If you code in HTML5, and use the <header>, <nav> and <footer> tags, then this can be put in your print stylesheet once and you will not have to change it again:

body > header,
body > nav,
body > footer { 
display:none; 
}

This assumes that your header, nav and footer are all direct descendants from the body. If you are in the habit of having an outer ‘wrapper’ element then alter the code accordingly.

This will not work in Internet Explorer 6 but frankly, I am past caring about that particular browser!

 

HTML5 improves human readability

I am currently updating my blog to be HTML5 (you probably won’t see the results for a few days while I iron out all the kinks) and came across another benefit to coding in HTML5.

If you author websites you’re probably used to doing something like this:

</div> <!-- end of navigation -->
</div> <!-- end of post -->
</div> <!-- end of wrapper -->
</div> <!-- end of footer -->

Without these little comments, it can be difficult to see what that </div> is for. A major validation error often occurs when you have one too few—or too many—end tags for these divs, and this is known as div soup.

Of course, using HTML5 those closing tags look something like this:

</nav>
</article>
</section>
</footer>

Semantics are extremely useful, not just for making you code machine-readable, but also for making it human readable!

 
HTML 5 Boilerplates

Without going in to the discussion of why HTML 5 is available today and not 2022, this article is going to give you a series of HTML 5 boilerplates that you can use in your projects right now.

 
I realise that the content on my blog varies quite dramatically. You may be interested to read about my opinions and links regarding web design but may not be impressed with my militant atheism.
Or perhaps you read my blog just to see what is happening in my life and are not interested in all this technical stuff (although I need to increase frequency of life posts!).
The lack of any PHP on my tumblelog really limits what I can do, but I have managed to do some trickery with the Tumblr Theme tags and CSS to create some cute &#8216;tag tabs&#8217;.
You can now filter my posts to Web–only, Science–only, Quotes–only and Life–only by clicking the relevant tab. If there is any interest, I will write about how I managed to highlight the correct tab.
Have fun filtering!

I realise that the content on my blog varies quite dramatically. You may be interested to read about my opinions and links regarding web design but may not be impressed with my militant atheism.

Or perhaps you read my blog just to see what is happening in my life and are not interested in all this technical stuff (although I need to increase frequency of life posts!).

The lack of any PHP on my tumblelog really limits what I can do, but I have managed to do some trickery with the Tumblr Theme tags and CSS to create some cute ‘tag tabs’.

You can now filter my posts to Web–only, Science–only, Quotes–only and Life–only by clicking the relevant tab. If there is any interest, I will write about how I managed to highlight the correct tab.

Have fun filtering!

about shaun…

Name: Shaun Robinson

Age: 25

Occupation: Web Designer / Developer

Location: Ipswich, United Kingdom

Living with: My partner Andrew, and two kids Elliot and Oliver.

contact me