Archive for the ‘CSS’ Category

Using FIR [Fahrner Image Replacement] – Part 1 – Basic implementation.

When I launched the new template used on this blog some weeks back, a discussion started out on the use of FIR, the Fahrner Image Replacement technique, on the H3 tags I used on the widgets in the different sidebars. Actually, these are not widgets per se as they are hard coded as small included files to maximise load time. An internal recipe if you want. Anyway, the main idea behind using FIR, which is a really old technique, is that I wanted the specific use of images just for these H3s. As pointed out in the comments, I did not go for heavy DOM scripting driven font apps such as Typekit or Google Fonts just because I had no need for these. If I had specific fonts to use for bigger portions I would have used those or Cufòn.

Usability and SEO.

FIR is not the only technique you can use for replacing text with images. You have several techniques which you can find out with a simple Google search. There’s also the sIFR, the Scalabe Inman Flash Replacement, which used Flash to replace text defined by web design guru Shaun Inman. There are 2 reasons why I like the Fahrner Image Replacement technique: usability and SEO. Its use maximises these two core elements. How? Simply because when all CSS are deactivated (which is the case for screen readers) the content is still present. This therefore keeps the content that is associated with the H tag. You can relate to this past article if you want more information on the importance of H tags. Please keep in mind that the way I use the FIR solution is a bit different from the original versions. As a matter of fact, I play more on semantics to reduce the use of unnecessary HTML tags.

Implementing FIR.

Basis.

The FIR implementation is fairly simple. You need to have an image file bearing your graphical text. The magic occurs with the use of CSS to get the text out of the way and replace it with this image. This is an all CSS technique which means that if there is any CSS failure, the fall back will just be the plain text. So here is a piece of simple code:

<html>
<head>
	<title>FIR technique</title>
</head>
<body>
	<h3>This is the text to be replaced</h3>
</body>
</html>

The replacement image is the following:

Hiding the text.

Now let’s get into the CSS-fu. First of all we need to “hide the text”. We cannot use the visibility attributes because we will not be able to exploit the H3 box that is generated. What we can do is reposition the text inside that box. Actually we will reposition it outside the box and even outside the screen, so far that no simple user screen can show the text. Here is how it goes (you will notice that I’m not using a separate CSS file for this just for the sake of the example):

<<html>
<head>
	<title>FIR technique</title>
	<style type="text/css">
		h3{
			text-indent: -9999px;
		}
	</style>
</head>
<body>
	<h3>This is the text to be replaced</h3>
</body>
</html>

The text-indent implementation throws the text at 9999 pixels on the left of the screen, so it will not be visible at all.

Replacing the text.

Still with CSS, we need will now get the image to occupy the space left. The image does not actually occupy the space, it sits as a background image and we will be tweaking the heights and widths to adjust to the image.

<html>
<head>
	<title>FIR technique</title>
	<style type="text/css">
		h3{
			text-indent: -9999px;
			background: url(replacement.png) no-repeat center left;
		}
	</style>
</head>
<body>
	<h3>This is the text to be replaced</h3>
</body>
</html>

The background uses the URL attribute to call the image. The no-repeat attribute says all that it does and the center attribute centres the image vertically and the left attribute sets it to the left. If the image were too large for the containing box we would be using paddings to increase its size. Here for example, we are increasing the top and bottom paddings by 10 pixels each:

<html>
<head>
	<title>FIR technique</title>
	<style type="text/css">
		h3{
			text-indent: -9999px;
			background: url(replacement.png) no-repeat center left;
			padding: 10px 0;
		}
	</style>
</head>
<body>
	<h3>This is the text to be replaced</h3>
</body>
</html>

See the final result in action here.

Get started…

You can now get started with FIR. It is a simple but effective technique. You can download the source files here. Keep in mind that this technique does not apply only for H tags but for nearly all the tags that you can use. For example, on this site, the link on the logo actually uses FIR. In the following part, we will see how you can optimise your use of FIR.

Edit & precisions

I would like to stress on the fact that this technique is considered as “fail” by a lot of people because of the advent of font faces. As I stated in the intro to this article, if I had larger portions of text to change I would have used them. Knowing this technique is handy for your web design culture/education as well as if you have to choose between going for Javascript external calls or CSS for very small elements. Please note that the original technique was not accessible or usable because it used flawed visibility techniques. This version corrects this with the use of the text indent attribute.

The secret of strong and em tags.

Some HTML tags often draw confusion because of their similarities with other tags as well as the way in which they display and style content. Examples of these are blockquote, cite, strong, em or i. Each element has features and, though they might accomplish the same goal, they might be altogether really different. Knowing those differences will help improve the markup of some pages. We’ll concentrate on those important tags that are strong, b,em and i.

Conveying structure.

These tags, though small ARE important. They are actually more used than we would like to admit and their first use is to give better sense to the content. Putting a word in bold or in italics cannot mean anything else but that the word is important and that we want to draw the reader’s attention to that word. Well, the W3C has created the strong and em tags so that the markup can convey the same importance given to that word. This is the basic idea of it all. So the first thing you need to know about these tags is that b and i are presentational elements while strong and em are structural. This explains why so many web designers would be telling you to swap the use of b for strong and i for em.

How and why?

Big question now. How and why (and probably when) to use these. The question might sprout especially when considering the fact that the b and i elements are not deprecated. Let’s look at how the W3C defines these tags: em indicates emphasis and strong indicates stronger emphasis. Bingo, the answer has been here all the time. Both of them are a way to convey importance to a word or a text but there are 2 levels of emphasis here. This tells you when and why you should use them in your code though b and i would have the same presentational effects but will only be giving information on the fact that the text is in bold or italics or not.

But wait, there’s more to this. The use of those tags have an impact on the way screen readers and search engine robots see the content.

Accessibility.

In terms of accessibility, a screen reader uses the strong and em tags are emphasis levels. Screen readers will, as the W3C puts it, “change the synthesis parameters, such as volume, pitch and rate accordingly”. This surely nails it. If we were using b and i to have visual representation we can get to a higher level by using strong and em as they will be doing the same visual job while conveying the structure and working towards more acessibility.

Search engine optimisation.

This information should be used regardless of whether you’re using strong, em, b or i tags. These participate in search engine optimisation. How?

Simply by taking advantage of the human element in the search engine robot’s algorithm. Here is the general concept: if a word is set under emphasis, it means that the author wants this particular word to stand out of the rest to catch the reader’s attention. This might therefore be considered as a KEYWORD! This is how the strong and em elements are treated as conveying emphasis, therefore helping SEO.

However, don’t run over and start stuffing keywords in your content and emphasising them with half a dozen strong and em tags around them. You’d be telling the robots you’re spamming them.

One step further

Some extra points here. If you need to have presentational enhancements to your strong or em tags the common practice is to wrap a strong tag around an em tag like this:

<strong><em>This is the emphasised text</em></strong>

The problem here is that you are giving a level 2 emphasis to an already level 1 emphasised text. This would not mean anything in terms of structure though it will in terms of presentation. Let alone in terms of accessibility.

There is a solution to this: Cascading Style Sheets. Let’s imagine you need all texts in bold and in italics but still want to keep your levels of emphasis, you would style your tags like this:

strong {
    font-style: italic;
}
em {
    font-weight: bold;
}

Digging even more into this, you can add classes to those tags which will give you 4 visual presentations of emphasised texts while keeping the 2 levels of emphasis.

strong {
}
em {
}
.bold {
    font-weight: bold;
}
.italic {
    font-style: italic;
}

You would be using them in your code as such.

<em class="bold">This is the emphasised text</em>
<strong class="italic">This is the emphasised text</strong>

A final word.

There you have it then. A full overview of the secret of the strong and the em tags compared to the b and the i tags. Any questions? Drop them in the comments!

Dropping unnecessary tags in your HTML code.

This post might be a sequel to my previous post on speeding up a page’s loading time to get better rankings in Google’s search engine results pages (SERPs). It is however not the case here. Most of us write our code, at least our code’s structure, in one go. This is done preferably after having identified all the building blocks of a page or template. But let’s be honest, even if we optimise our code, our CSS and all the scripting that accompany our everyday job it is not easy to dive back into the code and go for seconds in terms of cleaning up.

The good choice.

I admit it. I have not done it all the time, cleaning the code more than necessary. Like everybody who has made mistakes I could easily come up with a thousand reasons for not having done so. The first would be: “It takes too much time on the schedule allotted to such or such project. As I matured I understood the necessity of doing second passes in code cleaning.

  • It helps you check any error that could have been left.
  • It might be a good occasion to compress some elements to speed up the page.
  • It is a good chance to drop the unnecessary tags in your HTML code.

Now you might be asking yourself what this “unnecessary tag in the HTML code” is. Simple. When doing second checks on my code I found out that I somehow found new and improved solutions to the code already written. The I would change these. Most of the time I found myself dropping some tags from my HTML code and exploit the inherited properties of other tags to achieve the same results. This would be beneficial for maintainance, improve page loading time and less code means more content for search engines.

The basic code.

Below is a basic example of code that we usually find in web design. There is nothing wrong with this code, it works perfectly well and is written to be nicely styled in CSS.

<div id="navigation">
    <ul>
        <li><a href="/">Home</a></li>
        <li><a href="/about.html">About us</a></li>
        <li><a href="/services.html">Our services</a></li>
        <li><a href="/contact.html">Contact us</a></li>
        <li><a href="/register.html">Register here</a></li>
    </ul>
</div>

As you can see in this code, it is a navigation menu that is implemented into its own wrapping DIV tag which can itself be included in header or sidebar parts in a design. After analysing it and improving its CSS, we would estimate that the code is fine. But there’s one more step to push.

Dropping the tag.

In standard HTML, some tags have block displays and others have inline ones. Those missing any of these can get them through the declaration of these properties in the cascading style sheets.

    <ul  id="navigation">
        <li><a href="/">Home</a></li>
        <li><a href="/about.html">About us</a></li>
        <li><a href="/services.html">Our services</a></li>
        <li><a href="/contact.html">Contact us</a></li>
        <li><a href="/register.html">Register here</a></li>
    </ul>

With this in mind, we can bring some tags to become their own container instead of relying on an extra tag. This is the case with our basic code where we can directly make use of the containing UL tag to hold the rest of the elements, thus making the use of the holding DIV unnecessary. One tag won! This can be done on a lot of tags such as FORM or even SPAN (if there is a use to it…).

Let’s talk about this.

To be honest, as time goes by, this solution becomes a habit and a second nature. I now do not necessarily have to go through my code and drop tags all the time. I usually write a piece of code and stop and ponder over it. If there is a change to be made it is done immediately but this is now rarely the case. So why not go through your code and drop some tags? Do you have similar approaches in your coding skills? Try this trick out and see how much you can take off your code.

You should be (over-) using the H (heading) tags.

Heading tags (h1, h2, h3, h4, h5, h6) have always had a bad reputation in web designing. The main reason for this is the beastly appearance these tags when they have their default styling. Many a time web designers have thrown the H1 tag out for the use of a H4 one just because the latter has a smaller font size. The H tags are, however, core elements of page building and SHOULD be used and even overused.

The ugliness can be put aside as all this can be styled (as they have always been) with cascading style sheets (CSS).

Semantic web and standards.

With the advent of standards, web designers have understood that clean semantic code is what must be produced be it for maintainability, load time or cross browser compatiblity. Heading tags are part of this semantic code as they are here to structure a page. Their mark-up has been created to give the maximum structuring possibilities to pages. Some tips on their usage:

  • The top level heading (bearing the title or theme of a page) should always be a H1.
  • There can be only one H1 in the entire page.
  • Use heading tags logically, there cannot be suh-headings (H2/H3/…) before a H1.

Search engine optimisation.

In semantic web, headings bear the “titles” of pages and sections. These are therefore important information that a page is giving out to its visitors. Search engine robots have algorithms that take this into consideration. Heading tags are thus analysed by these robots and keywords included in titles are given more weight (this is not an incentive to go for keyword stuffing in headings). Using headings is therefore a good way of working on a page’s ranking.

Another interesting angle on headings and search engine optimisation is the fact that links are allowed in headings. Using headings and keywords along with links result in good optimised anchor text for any page. This can be taken into consideration when working on onsite deeplinking and SEO strategies. The current trend is to put a site’s logo and link in the H1 tag. This does not bring much in terms of SEO as it would do by optimising a page on its own theme and content.

Heading tags and usability.

Nobody likes to read huge boring text blocks on screen. The boredom is usually accentuated by the monotonous looks of long texts. Adding headings reduces this in the first place. Second, headings will allow a visitor to quickly scan a page and the different themes or points the page holds on a particular subject. This comes as a usability tool in this case.

Let’s talks about this…

Headings have a lot of advantages and are here to help web designers improve their code, its structure, usability as well as SEO. So why are they still not being used as such? Try some of the premium WordPress theme sites and check the code on some of their live demos, the designs are great but the code rarely makes good use of the headings.

Speeding your page load time will improve your Google ranking.

It is now official. Speeding up a site’s page delivery will be beneficial for each page’s ranking in the the Search Engine Results Pages (SERPs). So speed is now a ranking factor at Google. This has been officially announced on the Official Google Webmaster Central Blog.

Speeding up websites is important — not just to site owners, but to all Internet users. Faster sites create happy users and we’ve seen in our internal studies that when a site responds slowly, visitors spend less time there. But faster sites don’t just improve user experience; recent data shows that improving site speed also reduces operating costs. Like us, our users place a lot of value in speed — that’s why we’ve decided to take site speed into account in our search rankings. We use a variety of sources to determine the speed of a site relative to other sites.

Satisfied users.

If you still haven’t grasped the concept: Google has always emphasized that it liked pages made for users and not for search engines. A faster loading page means a satisfied user and as Google has all to win when it concerns satisfied users it is using what satisfies them, fast pages, as a ranking tool. Now, those having never seen the usefulness of Google Webmaster Tools can start running there to open their accounts.

:grin:

How to?

There are some simple ways of improving a site’s speed. First things first, use pingdom tools to evaluate your page’s load time. What I like with this new factor is that web designers will have to go back to the basics, re-use the core of web design coding, i.e. writing standards based code.

Standards.

Great day for standards. Using semantic and clean code will definitely help improve a page’s loading time. Using basic and clean tags will help your pages load in a whizz. Make sure you do not use deprecated tags and keep to your document definition (strict, transitional…etc.). Moreover, when using standards you get yourself a step ahead in optimising your code as the latter is easily maintained and you can just get any other coder to dive into your page to optimise it.

With the use of standards, you are bound to reduce the number of lines of code you would have originally used. Thus, pages are lighter and load time is decreased. All benefits!

External CSS.

Using standards implies the separation of presentation and content. This is done through the use of Cascading Style Sheets (CSS) and, more important, the use of external CSS. This also has an impact on your page load time. Why? Having all CSS in one external file means that the file will load only once (on the first page a site is visited) then, the same file is used by the browser to load all the other pages’ presentation. This means that your site’s pages will load faster as the CSS will be read only once and you will not have duplicate code to maintain all the time in each page if your CSS is written in them.

To get the most out of your CSS in terms of load time you can also improve the CSS file itself. Check out a previous article on how you can make pages load faster by minimising the CSS file.

External behaviour.

Should you be having behaviour on your pages (be they through Java or DOM scripting), the same advice as that for CSS goes. You need to externalise all the code to one external page to avoid constant recalls to all your functions each time a page is loaded. You can also think about progressive enhancement to improve the page loading when scripts are not activated or fail to load. All in all, keeping these simple and short will help improve your page loading capabilities. Other enhancements include the loading of all scripts after the content.

More…

These here are some simple examples on how the code can help pages in improving in terms of load times. It is very important to take these into consideration at the beginning of a project to maximise its ROI. This is a great example on how code and coding strategies can improve SEO, and Google is now making use of it.

You can push further in the ways a page’s load time can be improved for example, the choice of your server or image optimisation strategies.

MBC’s new website: a corporate failure?

A whole lot of talking is going on around the new Mauritius Broadcasting Corporation (MBC) TV/Radio website. It always is a major event when a major Mauritian company sets sails out for a new web venture and people can question and appreciate the job. Here, the great thing is that the tool used is WordPress which has now gone past the “blog” platform and has matured into a full grown Content Management System and even been awarded the Overall Best Open Source CMS award in 2009. That’s one good point but there’s a major “but” when it comes to the way the MBC managing board seems to have directed this project!

Corporate you said?

The said website is a corporate one, at least, it’s what is said on the main page title. I will not be going into an indepth analysis of the design and the website as well as its functionalities. The discussion between the webdesigner and the public is nearing trench warfare more than anything on Yashvin’s Blog with all the contradictions and accusations that go with such situations. I will not be adding to this!

My firm belief is that Mauritian companies need to mature in their use of the Internet and start working on online presence. They have to invest in development and user experience with indepth audits of user demands and conversion rates. This calls for a good deal of methodology, vision and professionalism. So my concern here is how can a huge thing like the MBC get involved in an amateur construction of its website.

Templating and project management.

To build a new website, objectives must be laid out, budgets (if any) calculated, but more important, the whole project must be managed with validation procedures, content improvement, calls to action and lead analysis. But what do we have here? A webdesigner who claims to have done the job for free by buying a template (Hello MBC managing board, don’t you even have some money to even pay for a template?) and modifying it to suit the MBC’s needs. And what does the poor chap get even with investing his own money into the project? Just a poor link to his website! This is pure slavery! The MBC might even be de-localising some of its own work to China.

So what’s the problem here? Having a webdesigner claiming high to having made just a template modification for such a big company means that all the steps required to make a real, good, managing board driving, visionary and high level website have been flushed down the toilet. All this has been boiled down to a template available to anyone and just modified. Do they care for their image? Do they have a communication & advertising department?

Amateurish and cheap.

The MBC is not the structure that bears the shiniest image in Mauritius and it would somehow have been logical that the directory board would have had the idea of making use of this occasion to buff it up but once again, the amateurs have hit home. The MBC is a leading Mauritian body and one would expect a site to its grandeur with a huge input in quality content. The whole system is heavy and loaded with glitches. Just one example, how many of you readers will ever read every word in this “About us” page. This is where the group should have had clear specifications in terms of content, design and wireframing. But none of all these are here.

An example of what “not to do”.

Overall, this whole project is a great example of how a major company should not be leading a web project. Specifications should be minute and written clearly. Each element should be made to maximise conversion and user experience. All this is done through thorough statistical analysis and user interview. Usability tests should be made to test each page, each way of delivering content and of the service and not just impose a template to any web designer. As sad as it might sound, the MBC managing committee has failed to make use of a great tool just to save money or maybe for some really obscure reason… who knows?

Test your web pages in Adobe Browser Lab.

So you’ve spent a lot of time designing your new web pages but are still wondering how they would look like in different browsers. Adobe Browser Lab is the new free tool from Adobe for easier, faster cross browser testing.

Build mega dropdown menus.

Since usability guru Jakob Nielsen recommended the use of mega drop down menus as useful on large scale websites, it has become impossible to ignore the way these menus are built. One of the best tutorials available is that of Soh Tanaka which drives you step by step into the building of mega drop down menus with jQuery.

Web Font Specimen, helping your typography.

Typography is not the easiest part of web design to master. It however is the core of web design. Tim Brown has set up Web Font Specimen which allows web designers to test, via simple files the rendering of the selected fonts on different browsers. A really useful tool!

Put a primer coat to your CSS.

Every web designer had his/her way of writing mark-up. If you usually start out writing your mark-up with all your classes and ids, PrimerCSS is the tool for you. Just drop in your mark-up and it’ll extract a primer stylesheet with all of these to get you up and running in no time.

Speed up your web pages via the CSS file.

As a Web designer, there are some rules that you have been acquainted to. One of the first being: “store all layout and graphics in a separate CSS file”. Nothing bad in this one. Knowing that a CSS file is downloaded once or updated if needed in a browser’s cache, this speeds up pages and adds more semantic through the separation of layout and content. All the good basics of CSS.

It happens that the content of a CSS file can easily grow. On some large websites it’s no surprise to see CSS files running over a thousand or two and even more lines. At the end of the day, a CSS file might in itself reach some 80kB or go over that. In France, the recommended “accessible” page weight limit is 27kB. So with an 80kB CSS file you’re just shifting the data bloating problem to another file. Its still here. So, this is my little trick to reduce CSS file weight. This will have, as a consequence, a positive result on your page loading time.

The Tool

One of my favourite editors is PsPad, lightweight, easy to use and packed with a whole bunch of useful elements. One of these is the ability to reformat the CSS/HTML in structured or inline format. A lot of tools do that too but PsPad is just one of those but allows me to manage whole projects in one go making it really handy.

The Trick

The simple trick is to actually structure the data of the CSS file then throw it to the inline version before uploading it to the server. Structuring the data is useful to clean the file. The CSS parser in PsPad realigns the code and structures it with the relevant tabs as well as drops all empty lines and redundant spaces. This increases readability.

Afterwards just reformat the CSS file content into “inline”. Here the tool will reformat the whole content to have each node on one line only per node. The file loses a bit of readability but gets improved in terms of spacing, hence reducing the filesize. Take a look at the 2 screenshots below. The first shows the weight of the layout.css file with structured content and, the second, the same file with inline content. The file size change is rather surprising:

Structured CSS file in PsPad

In line formatted CSS in PsPad

More ?

This small tutorial is but a mere trick to lighten up your file weight. Other solutions exist, solutions that would allow you to get those precious kB off your visitors’ shoulders with a view of proposing fast pages which would help them choose to convert on your site. On of them would be to use CSS shorthand and don’t forget precious tools like YUI. A good mix of those and techniques like the one presented here would surely help your pages load faster.

The “home page” dilemma.

I was reading an article published in May 2009 on the fundamentals of web designing when I came across this excerpt:

Pay attention to your homepage. That is what the viewers will first see. The home page should be attractive and provide useful information. If it doesn’t satisfy the mentioned criteria then the readers will move on.

This is a great piece of advice. The home page should be attractive. I like to compare it to my version of one of the most futile sayings out there: “Judge the content by its cover…”. You can have different types of users for a website and some types of users judge more on the eye candy than on the information available. This is where your design gets into the game. Give the eye candy to keep “eye-candied driven traffic” and give the content to the more “content-minded traffic”. However, there seems to be a hiccup somewhere around.

“That is what the viewers will first see.” This is what strikes me. With the evolution of search engines, the complexity of algorithms and all the work around SEO and separation of code and content… does the “home page being the first thing viewers see” hold the line? If I look at the traffic generated by the content of this site or any other site I manage, the home page is not the most viewed page or the most important landing page (therefore not the first) on any of the websites. If your content is well built and optimised (content being the core reason of maintaining a website or blog), each page is evaluated and included in search results.

So, is the home page really the first page that a visitor will see? Should it be the most well designed page in a site? The level of design should be the same for any level of a website and the fact that user habits have changed should be taken into consideration to maximise conversion rates through each page of a website.

New version of the HTML 5 draft.

A new version of the HTML 5 draft is currently available. It has been published yesterday (9th of September 2009) and is still in its working note form. It is interesting to read about the conception of this new version of the future web. Most of it is based on the HTML Design Principles that explain how a browser, whatever its age is supposed to behave when set in front of any kind of code.

What looks weird though is that the point of view of HTML through this document is biased. It does not look like it has been written so as to give a basis to browser manufacturers as well as web designers to build good websites on one part and good rendering tools on the other. It still proposes new angles for web designing but it sure looks like someone just went around and asked Web Designers: “People, what would you like to have in your specs?” and that’s all.

True enough that standards were more or less for browser manufacturers at some point but let’s not forget that there is still a big gap between browsers used worldwide. IE 6 is still here and being aggressive and standards are not fully understood by everybody. Today it seems like the new standards are only for Web Designers and I think that it is a huge mistake. I just hop that things will get altered until 2012.

First showcase gallery.

The Web Design Bureau of Mauritius has made it to its first showcase gallery over the web. After the last HTML 5 redesign of the Web Design Bureau, the WordPress theme running this blog has been submitted to the HTML5Gallery, the premier HTML 5 showcase and it has been listed. There’s still a lot to be done to improve the Bureau but the Mauritian reference site is making its place in the sun.

You can view the entry here and vote for it. Make sure you give it the stars you think it deserves. Just to brag a bit about it, even Jeffrey Zeldman himself commended the HTML 5 Gallery.

HTML 5 wins over XHTML 2.

This post actually echoes my first post on the subject (in French). Here we are, another hedge to cross for Mauritian web designers and companies. Too bad, just at the moment when Mauritian companies like E-services have started going towards web standards (repect for that though there’s still a lot to do). So, what is this hedge, the dropping out of XHTML. Yes Sir! XHTML is dead. Well metaphorically.

When?

The W3C has announced last week that it will be dropping XHTML 2 and allow more resources to the HTML 5 workgroup. This means that the expected date of use of HTML 5 is getting nearer. FYI, it was expected in 2022, now just give it 3-5 more years. So, the first question is: why are they dropping XHTML and what to expect from HTML 5?

Why?

There’s one simple thing to take into consideration. How come we all used IE6 at one time (about 90% of the world population having access to the web at that time did) and went completely mad when more reliable and standards bases browsers came out? The answer is: most browsers at that time followed HTML. Standards were vague and HTML, being very permissive did that pages were rendered quite nicely even if there are errors in the code.

XHTML has never catered for errors (at least for critical ones). You mess up a tag, you mess up a site: simple. This is the reason why browsers such as IE 6 had trouble reading such code because they hadn’t been coded to fully understand that code. Going back to HTML will allow web designers to cater for these past generation browsers more easily. No more MSIE_CSS.css and no more hacks then.

What a change! This, however is not over. The change will also occur in the code. How? Semantics. With the rise of web standards we have started to build websites on a semantic basis. We usually use the “document” ID, the “nav” ID, the “header” ID when styling our pages. These selectors have been so much used that they will be given due respect in HTML 5. We will now have new block elements such as< nav >, < header >, < sidebar >, alleviating a lot of our selector declaration burden.

How?

How to cope with this, how to change, what code to use? These questions must be running through some web designers’ minds. Calm down. If you had the good idea of jumping into the standards wagon, you’re in for some change but nothing drastic. The HTML 5 will not be here that soon but you can cater for it by switching back to HTML 4. You can however continue to code in XHTML if you’ve become a code guru. The future browsers will still implement it but you’ll still have to code-hack older browsers.

I hear some who are complaining about the loss of strictness in code. You can actually carry on building on strict code in HTML 4 Strict. It still holds in place and allows you to implement rock-hard robust code.

Conclusion

Few people had expected this sudden change in our everyday job. I mean, some of us have, at some point or another, spent weeks switching to standards and are now a bit astounded to have to go back to that code we tried to go past. This however goes for what the web and web standards stand for. Access to information to everybody in equality disregarding his/her components be they old school browsers. HTML 5 will be giving this back to the web either we like it or not. Anyway, it is a great challenge lying in front of us and it will also be fun to see the changes and work on them. I’m actually really thrilled about this.

“Marmelade” theme release.

The Web Design Bureau of Mauritius is happy to announce the release of its first free WordPress theme: Marmelade (French for “marmalade”). The theme is only in French for the time being but will be translated later. More info is available on the Marmelade theme page.