html not behaving in browser

Discussion in 'Computer Information' started by John Dolan, Dec 18, 2004.

  1. John Dolan

    John Dolan Guest

    Greetings

    Many moons ago I successfully wrote my home pages with html, and now, after
    not bothering for a long time, I am attempting to setr up a simple business
    home page using html. I have attempted to write code in Word, Notepad and
    Wordpad, saving as plain text in each case. However, when trying to view the
    result in my browser (Mozilla) all I get is the html. I have double, treble
    and quadruple checked code (so far I have kept it extremely simple - title
    and body text only). Are modern browsers incompatible with html? or is there
    something obvious I have not done?

    Typical simple code below:

    <html>
    <head>
    <title>Hello</title>
    </head>
    <body>
    This isnt working
    </body>
    </html>

    TIA

    ZD
     
    John Dolan, Dec 18, 2004
    #1
    1. Advertisements

  2. John Dolan

    RS Guest


    are you ending your file in index.html or index.txt ?

    You may find that your file, though you type in index.html, may infact be
    saved as index.html.txt, which isn't recognized as a valid html file in any
    internet browser. I wouldn't use word or wordpad. Stick with notepad and
    make sure that it is filename.html and when you double click it, that it
    opens in your internet browser instead of editor (notepad)

    -RS
     
    RS, Dec 18, 2004
    #2
    1. Advertisements

  3. John Dolan

    Jim Berwick Guest

    Two possible reasons:

    1. Your files are named index.txt or index.html.txt or similar, and as such
    are not recognized as valid HTML because of the webserver sending content
    type: text/plain instead of text/html.

    2. Your webserver is horrible misconfigured and is not sending text/html
    for .htm/.html files. If this is the case, you want to immediately switch
    web hosts, as your current hosts are retarded.
     
    Jim Berwick, Dec 19, 2004
    #3
  4. John Dolan

    John Dolan Guest

    (hanging head in embarrassment)

    Had forgotten need to save as index.html. I saved as 'test.html'

    Thanks for the advice. Works fine now!

    ZD
     
    John Dolan, Dec 19, 2004
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.