7 Tips For Solving HTML Problems

Wednesday, November 21st, 2007

Categories: Troubleshooting

RSS Comment Feed

Trackback

AddThis Social Bookmark Button

There’s no really unique way of introducing this list. But rest assured, if you’ve wrestled with HTML because something isn’t showing up or because layout elements are askew, there’s some tips in here that will likely benefit you.

1 – Lose Your CSS (Stylesheet)
Extra elements will only make troubleshooting harder. Removing extra elements can be key to solving your problem. In your source code, comment out the link to your stylesheet like so:
<link rel=”stylesheet” href=”style.css” type=”text/css” />

2 – Table Problems? Add a Border
If you’re a big table user, which I don’t recommend, adding a border to your table is a surefire way to identify problem areas where cells, columns or rows aren’t appearing. You can add a border to your table like so:
<table cellpadding=”0″ cellspacing=”0″ border=”2″>

3 – Outline Elements in the Web Developer Toolbar
First off, if you don’t know what the Web Developer Toolbar is, get it. It’s an add-on for Firefox. Once you’ve got it installed, click Outline and then click an option that outlines your problem area. In that same menu, you can select Outline Current Element. Using those two tools alone, you can poke around and sometimes find the problem.

4 – Try To Validate It
Try running your site through w3′s Validator. It’s pretty good at pointing out tags that haven’t been closed and illegal HTML.

5 – Remove the HTML You Know (or Think) Works
Relatively solid and common troubleshooting method, isolate your problem.

6 – Go Through the Problem HTML REALLY Slowly
Sometimes it’s just as simple as a

  • Double quote or single quote that wasn’t closed
  • An attribute that you misspelled (font colour?)
  • Unclosed tag: <span <p>Hello World!</p></span>

7 – Color Code It
There are open-source (free) options for color coding your HTML (and other programming language) code. The popular one that I’ve used is called Notepad++. Color coding really helps with simple typos that are going to make up a fair share of the problems you’re experiencing.

That’s all for now, hope that helps. If anyone has any tips or tricks, you’re invited to add a comment. :)

[Partner Message]
Are you a webmaster in need of professional quality hosting? At Intermedia we provide server web hosting and Microsoft Exchange 2007 hosting at a great price. Our email hosting and web hosting services can make a small company look like a large one.

Bookmark this blog using any bookmark manager!
Subscribe to Pat-Burt.com via RSS

Error. Page cannot be displayed. Please contact your service provider for more details. (12)



Related Posts


Subscribe to this Post

Comments are closed.