When I troubleshoot, I start with the area that I think the problem is in and
then work my way out of it in a spiral or concentric circles. I also tell myself
gitfs something simple,h which helps me relax and find problems more easily.
Here are my guidelines for troubleshooting HTML code.
1. Check the <tag> name.is it spelled correctly? Youfll know it isnft if you
have one or both of these problems:
Tag contents (ie, the tagname itself) show up as text.
Th e text or section of the document is not aff ected by the tag the way
you intended.
2. Check that the tag has its ending bracket (>). Youfll know itfs missing if:
Th e tag name shows up as text with a < in front of it.
3. Make sure the start tag has a closing tag.for example, <tag>word</tag>.
Youfll know this is the problem if:
text.text from the start tag on has that formatting.
lists.any new lists indent after the initial one.
tables.the new table is nested within the fi rst table.
4. Check the <tag attribute="value"> syntax. Check the spelling of the
tag name, attributes, and values, and make sure the attribute value has
an ending quotation mark. Youfll know this is the problem if:
Contents of the tag donft show up at all.
Contents of the tag donft have any of the formatting.
Contents of the tag have some of the formatting, but not all of it.
5. Check that you have placed the attribute you want in the proper tag. Youfll
know this is the problem if:
Contents of the tag donft have any of the formatting you wanted.
Contents of the tag have some of the formatting, but not all of it.
Th i s may not show up as a probl em.t he browser may render it anyway.
6. Check the order of nested tags. Make sure that tags are
nested properly, like parentheses: ( [{ word }] ). For example,
<a href=http://www.something.com><em>this is a link</em></a>. Youfll
know this is the problem if:
Th e text may not show up.
7. Check that you have placed the tags in the proper place. Youfll know this is
the problem if:
¡ Content is aff ected in a diff erent area than you intended.
If you are really stumped and canft fi nd the errors in your markup, then
validate your page using an HTML validator (see the Resources section for
a complete list).
0 comments:
Post a Comment