Help with REALLY DUMB SIMPLE html code
-
Hi, folks,
I need somebody with a little experience writing HTML code to take a look at this incredibly simple piece of code I’m writing to tell me what’s wrong.
This is exactly the same problem that I encountered the last time I started learning HTML. It was so frustrating that I quit, and didn’t pick it up again for 5 years.
The problem is that when I insert an href to create a link, the first link in the page shows up only as text, like a paragraph, and none of the heading tags above it on the page show up at all. If there’s a second link, it shows up as a link.
Here’s my code WITHOUT the link. It works.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Test Web Page 5</title> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1 /> </head> <body> <h1>The fifth page.</h1> <h3>List of relative links.</h3> </body> </html>
So far, so good. Go ahead, display it. It works.
Now, I add an unordered list of links below my headers. Same code plus the new stuff:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Test Web Page 5</title> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1 /> </head> <body> <h1>The fifth page.</h1> <h3>List of relative links.</h3> <ul> <li><a href="page01.php">First Page</a></li> <li><a href="page02.php">Second Page</a></li> <li><a href="page03.php">Third Page</a></li> </ul> </body> </html>
My headings disappear, and “First Page” shows up as paragraph text.
“Second Page” and “Third Page” show up as links.I even clipped example code from the tutorial I’m following, and displayed that. Same result. As a troubleshooter, I have to conclude that my browser display engine is broken somehow.
Any ideas?
Thanks.
Phil W.
- The topic ‘Help with REALLY DUMB SIMPLE html code’ is closed to new replies.