15 Questions for Code-Authoring in Website Design

ARTICLES

BY JOHN TAN

15 Questions for Code-Authoring in Website Design

 

If you design or develop websites, you’ll find yourself working with HTML, CSS, and JavaScript.

Every language has a range of best practices and guidelines to follow, which is great if you want to standardize your end-product. However, there are a lot of other things to consider besides being standards-compliant.

1. Does the code validate?

While validation isn’t a complete testament to code quality, it does help to make sure that your code follows recommended standards and can show you errors in your markup, CSS, and JavaScript.

2. Have you considered using CSS3 and HTML5?

Though many users still don’t use browsers that have CSS3/HTML5 support, if implemented with progressive enhancement in mind, taking advantage of these future W3C recommended standards gives your products added value and improves the craftsmanship of your web designs.

3. How semantic is the code?

Using the right tag for the job is essential, and search engines love semantic code. Use < p > for paragraphs, < ul > for listed items that have no ranking, < ol > for items that have a sequential relationship, < a > for hyperlinks and < button > for clickable UI components that perform an action/user task.

4. Are you taking advantage of optional files and site add-ons?

Whether in the form of using the Sitemaps XML protocol or including a favicon, these optional files can enhance your website. See five files that can improve your website.

5. Do you need an RSS feed?

If your website is content-heavy and is updated frequently (e.g. a blog or news site), having an RSS feed will be a necessary site feature for keeping your users up-to-date with fresh content. If you don’t use a CMS with this feature built-in, check out SimplePie, a PHP class for building your own RSS feed.

6. Will the code degrade gracefully?

Graceful degradation (also known as fault-tolerance) — the notion that a system (in this case, a website) will still function under sub-optimal situations — is essential for flexible and web accessible site builds. Learn how to pragmatically apply graceful degradation when using CSS3.

7. Have you considered SEO?

While search engine optimization should not dictate your design decisions, it wouldn’t hurt to consider how your website could be more visible in search engine results. Read some SEO tips to remember when building your site and ways to improve the SEO of your web designs.

8. Do you provide a printer-friendly style sheet?

Designing a print CSS file is worth the time investment as many users still do print out web pages.

9. Is any of your code deprecated or non-standard?

Using "dead code" such as the tag that was deprecated in W3C HTML 4 specifications as well as non-standard code such as the tag is frowned upon and won’t allow your work to validate against W3C web standards recommendations. Double-check that you’re not using any by taking advantage of free validation tools such as the W3C Markup Validation Service.

10. Do you need to use conditional comments?

IE6 isn’t going to go away completely, and if your project requires you to support IE and to use browser-specific code, use conditional comments to serve IE-specific stylesheets instead of using hacks.

This does two things: It gives you the ability to get your code to validate under W3C standards, and when you decide to stop using browser-specific code, you only need to remove the conditional comments in your site template.

Leveraging JavaScript techniques for fixing IE6 and projects such as HTML5 Boilerplate to solve deprecated-browser rendering issues could be another option, but you’ll be stuck in scenarios where the user uses an old browser with JavaScript disabled — a scenario that is not as uncommon as you might think.

11. Are structure (HTML), presentation (CSS), and behavior (JavaScript) separated?

This is important not only because it’s best practice, but also leads to more manageable and maintainable code.

12. Is your site navigation laid out in a practical way?

The navigation menu is the most important part of your website. Getting it right is an integral part of an effective site information architecture.

13. Have you checked for unnecessary HTML elements and redundant CSS style rules?

Code bloats easily, so strip away any non-essential and repeated bits of code for more maintainable and leaner (and thus, higher performance) website builds. For HTML/CSS optimizing purposes, check out HTML Tidy and CSSTidy.

14. Is the code organized and maintainable?

Put care and attention into your code. Lay it out so that it’s easy to read, update and manage.

15. Would a framework enhance the site?

These days, open source Ajax/web development frameworks such as jQuery and MooTools can speed up code-authoring and ensure fewer headaches due to cross-browser issues. If you suspect these frameworks might help, why not investigate and learn about them?

Credits: Six Revision


 

Related Articles

These articles might be interesting for you as well:



Contact Us

We'll get back to you within 24 hours.

 +65 8619 6303

john@jnetworksite.com