![]() |
Tutorials
| Workshop
| Troubleshooting
|
DOs and DONTs
Avoid Overlapping Tags
Consider this example of HTML: <B>This is an example of <I>overlapping</B> HTML tags.</I> The word overlapping is contained within both the <B> and <I> tags. A browser might be confused by this coding and might not display it the way you intend. The only way to know is to check each popular browser (which is time-consuming and impractical). In general, avoid overlapping tags. Look at your tags and try pairing them up. Tags (with the obvious exceptions of elements whose end tags may be omitted, such as paragraphs) should be paired without an intervening tag in between. Look again at the example above. You cannot pair the bold tags without another tag in the middle (the first definition tag). Try matching your coding up like this to see if you have any problem areas that should be fixed before you release your files to a server. |
||||||||||
|