Internet explorer and HTML prob

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mutant Merv
    New Member
    • May 2007
    • 8

    Internet explorer and HTML prob

    Hi,

    As I mentioned in the Introduction Forum I am full of enthusiasm but very low on Knowledge.

    Using Sams HTML & XHTML book I am slowly reading and understanding the use of HTML but already I have a slight problem.

    I have made up a sample HTML document just to check that what I have read I have understood...pl ease see belowe:

    <html>
    <head><title>Th e first web page</title></head>
    <body>
    In the beggining it was simple with an abacus
    </body>
    </html>

    I wrote this on notepad, saved to a seperate file in my documents and made sure to save it as a text document.

    I then tried to test it by opening up internet explorer, going to file..open and then selecting the document.
    When opened it appeared just as it was on the notepad....is this correct as what i am reading shows it being opened up as if it was set up on the web..

    I hope this is not a stupid question...if so apologies

    Merv
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    When you saved the file, you need to save it with the .html extension. It's probably saved as .txt. So, in notepad, go under file->save as and you'll be given the "all files" option. Enter your file name with the .html (or .htm) instead of .txt.

    So now you are 'off to the races'! You should look at the articles mentioned in the sticky at the top of this board. In particular, we want to get you started on the right foot.

    First, modern pages need a proper doctype to function properly. Internet Explorer, specifically, goes into a bad mode called "quirks" if you don't use one.

    Second, download and install Firefox and do all your testing in that browser. It, along with Opera, are the most modern, standards compliant browsers on the net while IE is nine years behind web standards. It will screw you up more than anything.

    Third, do not concern yourself with Xhtml. It doesn't work in old, buggy non-standard IE anyway. Learn html well.

    Fourth, after you know html, learn CSS. HTML creates the structure and content of your page. CSS creates its presentation. Modern sites never use HTML for presentation. Depending on the age of your book, it may throw such attributes at you such as "align=righ t" or "center" which are all deprecated now. Yes, they'll work but 'deprecated' means they are frowned upon and will one day be phased out.

    Fifth, learn how to use the validators, both html and css, and use them often.

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      Merv,

      I code in notepad too, and I have noticed this as well. The problem is that when you save as a text document, notepad adds a second file extension to the end of the file name. For example if you type in
      Code:
      myFirstTest.html
      and save as a plain text document, notepad saves it as
      Code:
      myFirstTest.html.txt
      The trick to prevent this is to put the file name in quotes when you save it:
      Code:
      "myFirstTest.html"
      This makes notepad prompt you for a confirmation, but I stopped reading what it asks a long time ago. You just say yes and it works correctly.

      Let me know if this helps.

      Jared

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        Originally posted by drhowarddrfine
        When you saved the file, you need to save it with the .html extension. It's probably saved as .txt. So, in notepad, go under file->save as and you'll be given the "all files" option. Enter your file name with the .html (or .htm) instead of .txt.

        (more in a moment)
        Jinx! (up to 20 characters)

        Jared

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          Originally posted by jhardman
          Jinx! (up to 20 characters)

          Jared
          Yes, I am a god. 123

          Comment

          • Mutant Merv
            New Member
            • May 2007
            • 8

            #6
            This is great guys...I am off and running again...most probably only for a short while but heh....lol

            Really appreciate the time you put into my novice question

            The only thing I expect I can help you with is Building questions as I am a builder which explains my lack of understanding in the PC world.

            Thanks
            Merv

            Comment

            Working...