Author Archive

HTML5 syntax guidelines

Compared to XHTML, HTML5 (just like HTML 4) is a lot more forgiving of the syntax you use. Like I mentioned in HTML 5 syntax, it allows you to mix tag and attribute case as you wish, leave some attribute values unquoted, and leave out closing (and in some cases opening) tags for some elements.

In my opinion this can easily make markup more time-consuming for humans to read and understand. It can also lead to a wider difference in syntax depending on the personal preference of the person creating the markup. I think both of these are bad for maintainability. Fortunately HTML5 doesn’t prevent you from creating markup that is as clear, unambiguous and easy to maintain as XHTML.

Read full post

Posted in , .



Removing title attributes from WordPress links

One of the things that annoyed me when I started customising WordPress is that it likes put a title attribute on just about every link it generates. There are several reasons I don’t like that:

  • In most cases there is no option to disable the unwanted title attributes.
  • Many of the title attributes simply repeat the link text, which is meaningless – see Don’t duplicate link text in the title attribute for more info on why.
  • Unless used with care, title attributes can be annoying or confusing to screen reader users. When screen readers encounter a link with a title attribute, they may read the title attribute instead of the link text, before the link text, after the link text, or not at all. It depends on which screen reader it is, how it is configured, and the content of the title text. Adding title attributes to every link does not improve accessibility – it can have a negative impact. On top of that, title text is unavailable to some users – see Don’t use the title attribute for essential information for more info on that.

Read full post

Posted in , .



How to make IE9 beta work with Parallels Desktop

Here’s a quick tip for other Mac users who use Parallels Desktop for their Internet Explorer testing needs: To make IE9 (in beta at the time of this writing) work in Parallels you may need to disable GPU rendering.

If you’re having problems with IE 9 crashing, not redrawing the viewport, showing nothing but a black background or otherwise behaving strangely when running in a virtual machine under Parallels Desktop, this may help:

Read full post

Posted in .



How to make WordPress URLs root relative

For several reasons, including portability, reducing download size, and general code neatness, I like to make all links within a website root relative.

WordPress, on the other hand, seems to like absolute URLs for some reason. To clean this up a bit I have the following simple function in my functions.php file to strip the protocol and domain name from URL strings:

function make_href_root_relative($input) {
    return preg_replace('!http(s)?://' . $_SERVER['SERVER_NAME'] . '/!', '/', $input);
}

Read full post

Posted in , .



Style visited and unvisited links differently (most of the time)

On some websites visited links look exactly the same as unvisited links. This doesn’t always cause problems, but sometimes it can slow you down. As an example I’ll compare two sites that have lots of outgoing links: Delicious and Twitter.

Let’s say you’re looking for interesting reading about a particular subject like… HTML5. There will be plenty of links tagged with HTML5 on both Delicious and Twitter:

Read full post

Posted in , , .



  •   
  • Copyright © 1996-2010 BlogmyQuery - BMQ. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress