SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: html

  1. #1
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    html

    total nurd- just wanted to ask how come i got the 1st 2 lines of html of the Most Basic Web Page in the World on top of the screen when i brought the saved page back from folder?
    following ian lloyds book using windows xp/notepad/IE
    thanks bjp

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Hi bjp, welcome to the forums,

    I don't know exactly what the problem is, but I have found that when someting appears in the wrong place it's often because the mark-up isn't nested correctly. For example
    HTML Code:
    <table>
      <tr>This should be in the table
        <td>some more text</td>
      </tr>
    </table>
    The "This should be in the table" might appear anywhere depending on how the browser "guesses" where to put it.

    I doubt if your problem is like the example, but if you go to the validator http://validator.w3.org/#validate_by_input and paste in the page's code and click check, you may get a helpful error message. If not please post the mark-up here.

  3. #3
    Non-Member
    Join Date
    Jan 2009
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you explain your problem more descriptively? I read your post through 3 times and I can't understand your problem.

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Location
    Amsterdam, NL, and France
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Give us the code or a link to the page. Then we can see the problem

    Mike
    * * * * My site * * * *
    * * * * My paintings * * * *

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,175
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I have the free sample chapters of version 1 of the book, and I don't have the files from the code archive. But the code in the book is
    basic.html
    HTML Code:
    <!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">
    <head>
    <title>The Most Basic Web Page in the World</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body>
    <h1>The Most Basic Web Page in the World</h1>
    <p>This is a very simple web page to get you started.
    Hopefully you will get to see how the markup that drives
    the page relates to the end result that you can see on
    screen.</p>
    <p>This is another paragraph, by the way. Just to show how it
    works.</p>
    </body>
    </html>
    Does the code in your file look like that?
    By
    Quote Originally Posted by bjp
    i got the 1st 2 lines of html ..... on top of the screen
    Do you mean this mark-up is visible in the rendered page?
    Code:
    <!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">
    Make sure the code doesn't have entities for the "angles". i.e.
    &lt;!DOCTYPE or &#38;#60;!DOCTYPE


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •