%@LANGUAGE="VBSCRIPT" %>
<% Response.CacheControl = "no-cache" %>
|
COMMON MISTAKES TO AVOID IN XHTML |
- Putting extra spaces between attributes and their values.
CORRECT: align="center"
INCORRECT: align = "center" -OR- align = " center "
- Closing attributes in closing tags.
CORRECT: <h2 align="center">Name</h2>
INCORRECT: <h2 align="center">Name</h2 align="center">
- Using XHTML code within <pre> tags.
CORRECT: <pre> 1234 Grant Street </pre>
INCORRECT: <pre>1234 Grant Street </pre> -OR - <pre>1234 Grant Street<br /> </pre>
- Missing the semi-colon in the non breaking space code.
CORRECT:
INCORRECT:  
- Adding <b> tags within a <h1> (including h2, h3, etc.).
CORRECT: <h1>Name</h1>
INCORRECT: <h1><b>Name</b></h1>
- Not adding the <title> within the <head>.
- Using an incomplete or wrong doctype tag.
- Placing the doctype tag in the incorrect place.
CORRECT:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title> </title>
</head>
<body>
INCORRECT:
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title> </title>
</head>
<body>
- Not closing the <html> or <body> tags at the end of the document.
- Not closing break tags correctly.
CORRECT: <br />
INCORRECT: <br> -OR- <br/> -OR- </br> -OR- <br></br>
- Not following the directions CAREFULLY.
- Forgetting to close ALL tags.
- Not using <li> tags within <ul> or <ol> tags.
CORRECT:
<ul>
<li> First </li>
<ul>
INCORRECT:
<ul>
First
<ul>
- Closing the <!DOCTYPE> tag at the end of the document.
|
|
| |