HTML not been recognised, help please!!!!!!!!

Discussion in 'Web Design and Development' started by Skeva, Jan 16, 2011.

  1. Skeva macrumors newbie

    Joined:
    Mar 9, 2008
    #1
    Hey folks, I am pretty new to html coding and i am doing some testing on my iMac, but when i open the html file i saved in class in Safari or Firefox it just shows up as text, i got some sample html from a google search that i know works but still didnt work.

    Is there something on my iMac i need to do to fix the issue?

    Thanks:)

    My sample code is

    <html>

    <head>
    <title> favorites / bookmark title goes here </title>
    </head>

    <body bgcolor="white" text="blue">

    <h1> My first page </h1>

    This is my first web page and I can say anything I want in here - I do that by putting text or images in the body section - where I'm typing right now :)

    </body>

    </html>
     
  2. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #2
    I am guessing your saving it at a text file instead of a html file.

    Try renaming your file something.html, its likely you have it as something.txt or something.html.txt
     
  3. Xian Zhu Xuande macrumors 6502a

    Xian Zhu Xuande

    Joined:
    Jul 30, 2008
    #3
    Cabbit probably nailed it.

    Make sure you're using an honest-to-goodness plain text editor. Maybe someone can recommend a good free solution. I use BBEdit, but that's not really a viable option for someone just starting out unless they want to fork over whatever it is they're charging these days...
     
  4. snouter macrumors 6502a

    Joined:
    May 26, 2009
    #4
    Definitely go into the finder and enable the ability to see the file extensions.

    "index.html.txt" is a very likely possibility, but it's hard to tell if all you see is "index"
     
  5. YanniDepp macrumors 6502

    YanniDepp

    Joined:
    Dec 10, 2008
    #5
    As others have said, check your file name doesn't have .txt on the end.

    Also, instead of text="blue", I recommend style="color: blue;"

    the text="" attribute isn't well supported any more.
     
  6. Xian Zhu Xuande macrumors 6502a

    Xian Zhu Xuande

    Joined:
    Jul 30, 2008
    #6
    By what? It is deprecated/excluded in current web standards but I don't recall hearing of any browser actually dropping support for it. The CSS declaration is better, of course, and better still would be studying CSS and using proper stylesheets (inline or external) wherever appropriate.
     
  7. nightwolf macrumors member

    nightwolf

    Joined:
    Oct 4, 2005
    Location:
    Ontario, CANADA
    #7
    if it's on your computer

    and testing... anything name will work as long as u save it as .html As an example, name.html Make sure you are NOT using rich text formal in text edit. It has to be plain text format.

    If you are uploading to a server. Some servers prefer... index.html, some, home, and some default. Try all three. htmk is easy, u will learn it in a week.

    This is the best for beginners. Thats how I learned.
     
  8. YanniDepp macrumors 6502

    YanniDepp

    Joined:
    Dec 10, 2008
    #8
    It was a minor aside, not really relevant to the main issue at hand.

    Of course browsers will support the old tag, and the tag isn't part of HTML 4 (Strict) or HTML 5 or, of course XHTML. But then again, someone creating this simple example probably wants his page to load as HTML and doesn't care for doctypes and standards.
     

Share This Page