Search Helium

Home > Computers & Technology > Internet > Web Design

Web design tips: HTML best practices

by David Hockenbroch

Created on: December 22, 2008

Adhering to some consistent practices can make designing even the most complex websites much easier, as well as provide a professional touch to your website. We'll start by talking about a few practices that can be used throughout the website, then cover a few more specific methods working from the top of the page down.

You should always view your website in multiple browsers. They all work slightly differently, and this must be taken into consideration. If you view your website in Internet Explorer, you've checked it in the most common browser, but a fair number also use Firefox, Opera, and Safari, as well as a few other browsers. Also, if your website is meant to be viewed on mobile devices, make sure you check it on those devices. Use your own page on each. If you see something that needs fixed on any of them, be sure to address that issue.

In HTML, almost all elements include one opening tag and one closing tag.Although some elements may display correctly without the closing tag, the closing tag should always be present. The latest standards require all tags to be written entirely in lowercase letters. If more than one tag is open, the tags should always be closed in the opposite order they were opened. In other words, this is good:

<p><b><u>Some text.</u></b></p>

This is bad:

<p><b><u>Some text.</b></p></u>

There are also a handful of tags that require no closing tag, such as line break (<br>) tags. You should include a / at the end of these tags. For example, instead of <br>, you should use <br />.

Using white space properly can also be helpful. One good practice is to include a tab at the beginning of each line for each element that has been left open. This makes it easier to identify which closing tag is paired with which opening tag. For example, if you are typing the HTML for a table, you may type the opening table tag, start a new line, tab in once, type the opening table row tag, start a new line, tab in twice (there are two open tags now, <table> and <tr>) and include a <td> tag, the contents of the table cell, and the </td> tag. Then, on the next line, tab in once an include the </tr> tag, and on the next line, with no tabs, include the </table> tag. The end result is an HTML document in which the left side of each opening tag lines up with the left side of its own closing tag.

Comments can also be very helpful. To include a comment,

Helium Debate

Cast your vote!

Creating Facebook page or Facebook group: Which is better?

Click for your side.

239125

Featured Partner

American Skating Association

Promoting the health and well-being of Americans through programs and activities.more


CONNECT WITH US

Read
our blog
Helum for writers

Write and get published
Share with other writers
Polish your freelancing skills

Join our active writing community
Helium Content Source for Publishers

Quality articles from proven freelancers
Exclusive rights, fast turnaround
Brand engagement, business blogging -- our writers do it all

Get custom content today!

INFORMATION


Helium, Inc.
200 Brickstone Square Andover, MA 01810 USA
#