The Most Common HTML Pitfalls And How To Avoid

Whether you are a newbie web designer or someone who owns a website that is going to some place good but needs that final push in the form of some excellent HTML coding, you should be aware of the common mistakes people make in their HTML coding. Informing yourself of these frequent mistakes can make the difference between becoming proficient at HTML and abandoning it in the early stages because you just don't seem to get it.

• Forgetting to close your tags. This is annoying yet all too frequent mistake that beginners to HTML make. You might have constructed some basic code to make up your first HTML page. Even a basic page will contain many different lines of code. Running the code and finding that all elements are not displayed, or even worse, nothing works is quite frustrating and can lead to a lot of head scratching. Forgetting to close your tags is one of the most common mistakes to make and ingraining it into your mind that several tags require a backslash to close them is a good stepping stone into the HTML world. To give one example, think of a strong tag. To close your strong tag, you need to insert a backslash between the parenthesis. A well constructed strong element looks like this:

< strong > content < /strong >

• Inserting tags incorrectly. There are some tags that won't be displayed because they need to be nested within another HTML tag and they haven't been. This issue is very common art the beginning of a HTML document. A lot of people starting off to HTML and constructing code without referring to a manual or a different example forget the head tag and remember to put the title tag in. The issue with this is that the title tag needs to be nested within a head tag otherwise it doesn't work. This means that the first thing you do after declaring your document type is to make sure that your head tag is inserted into the document. Otherwise the whole thing won't run. It is a simple and effective piece of advice to avoid falling into this pitfall.

• Not indenting code. This is vital in any programming language but since we are focusing on HTML here, we thought it would be a good idea to mention it because as a beginner error it transcends programming languages. One way for an experienced programmer to spot poor programming or newbie programming is the lack of indentation in the code. Indentation is the increasing and or decreasing of space between the left and right margin of a paragraph. Indenting your code gives it the advantage of being easier to read, easier to understand and easier to modify. This saves an extraordinary amount of time when it comes to revising and editing your code, yet most beginners skip over it because its importance has not been communicated to them enough. The fact of the matter is this. Indentation means better coding. Start off your programming career with the aim of indenting every piece of code, no matter how simple it is.

• Using blink tags. Apart from looking downright horrible, the blink tags are also not included in the official HTML line of code. Some people try to insert them to draw attention to an element of their page, but this ends up just looking ridiculous. The blink tag is a non-standard HTML element that causes text to blink slowly in a distracting manner. It looks awful but beginner web designers might be tempted to use it to draw attention to certain areas. There are much better ways of doing this though.