• Resolved pweingart

    (@pweingart)


    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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You’re just missing a quotation mark.

    This:

    <meta http-equiv=”Content-Type” content=”text/html; charset=iso8859-1 />

    Should be:

    <meta http-equiv=”Content-Type” content=”text/html; charset=iso8859-1″ />

    I have an even more basic problem that maybe you can help me with. I’m trying to edit the file that contains my Title, Meta tags, and Keywords. The problem is I have no idea what the file is and where it is. I thought it would be the index.php file in my ftp site directory, but it’s not. When I view the source on my page the first section is this:

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml&#8221; dir=”ltr”>

    <head profile=”http://gmpg.org/xfn/11″&gt;
    <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />

    <title>Black Belt Politics </title>

    <meta name=”generator” content=”WordPress 2.3.1″ /> <!– leave this for stats –>

    Where is this and can I edit it locally so I can ftp it back with the added title info, meta, etc.?

    Thanks.

    Everything is always in your theme’s template files.
    The head section… you will be surprized: it is located in header.php 🙂

    I wish it was that easy! That was the 1st place I looked. It’s just a bunch of code that seems to pull it’s info from somewhere else??? I know why pweingart gave up (above post). If you go to unscriptednews.com/your2cents, view, source, there it is!

    <title>Black Belt Politics </title>

    etc, etc…..

    I can build you a computer in an hour but I’m freakin’ lost! Man this is frustrating.

    it is that easy, youre just not seeing that the “code” you speak of is what is generating what you see when view source.

    And u mixed < li > and < ul >.

    It should be (without the spaces, somehow these backticks don’t work for me

    < 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 >

    ' 
    
    But the quotation mark was ur problem.
    
    So this would be ur code:

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml&#8221; 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>
    `
    PLZ close the post as resolved.

    Thread Starter pweingart

    (@pweingart)

    I am appropriately embarrassed, but yes, sometimes it does take a fresh pair of eyes.

    Thank you. I appreciate the help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Help with REALLY DUMB SIMPLE html code’ is closed to new replies.