SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Starter needs basic help to display html page / to alter html documents

    Hi there,

    I just started to build websites.

    My problem is, that if I create a html document on my mac with textedit, only the source code is displayed if I open it with a browser. ( I have checked the code for any mistakes already)

    The other way around, if I open a lecture html file with textedit, the source code is not displayed to alter it.

    How can I alter source codes from existing html files with textedit?
    How can I display the the html document properly in a browser?

    Thanks for your help!

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    If you are seeing the source code instead of the web page (when opened in the browser) then the file is not getting saved with the *.html or *.htm extension.

    I don't have a Mac but I do remember some people say there is a TextEdit mode more specially suited to writing markup.

    Quote Originally Posted by Build Your Own Web Site The Right Way Using HTML & CSS (page 5)
    However, we want to work with TextEdit as a plain text editor, so you'll need to adjust some of TextEdit's preferences. Start TextEdit, then select TextEdit > Preferences from the menu to bring up the Preferences screen. Select Plain text within New Document Attributes, then close the Preferences screen.
    I suspect you'll have to alter the setting to something similar as described.

  3. #3
    SitePoint Enthusiast PixelStyles's Avatar
    Join Date
    Feb 2005
    Location
    Pennsylvania
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like the file extension is incorrect as xhtmlcoder is saying. In OSX go to Finder, preferences and there should be an option to shown known file extensions I think it is. (at work on horrid XP so I can't check for you). You probably have a scenario where is making "filename.html.txt" and its using the txt extension.


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
  •