Textedit as an html editor

Discussion in 'Mac Basics and Help' started by klink3r, Mar 2, 2011.

  1. klink3r macrumors newbie

    Mar 2, 2011
    I'm doing a basic html project for a class in college and one of the requirements is to embed images into the document (we are not publishing them online or anything like that.)

    I'm using textedit to do the html work.

    The only problem I've had is, when using the <img src> command, the pictures (whether I use a file on my desktop or a url) will show up in my own browser(s), but when the site is loaded on a different computer, the pictures disappear.

    Any suggestions? I'm not sure whether my professor will be just grading the HTML (because it would look right even if it isn't working) or the actual site, uploaded onto her own computer (where my pictures would undoubtedly not appear)...I'm preparing for the latter.
  2. ergdegdeg Moderator emeritus


    Oct 13, 2007
    When you move the HTML file, are you also moving the pictures to the other computer?
  3. miles01110 macrumors Core


    Jul 24, 2006
    The Ivory Tower (I'm not coming down)
    Is the file being saved as plain text? Try Textwrangler instead. It's free.
  4. klink3r, Mar 2, 2011
    Last edited by a moderator: Mar 5, 2011

    klink3r thread starter macrumors newbie

    Mar 2, 2011
    No, i figured that was the problem initially, so I started using the URL instead of the file on my computer.

    i saved it as .txt, but then changed it to .html.

    I've heard textwrangler is better...maybe i'll give it a shot and see what happens. thanks!
  5. iDisk, Mar 2, 2011
    Last edited: Mar 2, 2011

    iDisk macrumors 6502a


    Jan 2, 2010
    Menlo Park, CA
    First off you can do anything in textedit.

    I've done css and javascript in it.

    Secondly you need to make sure that your in a plain text file format (screenshot 1). Then all your docs need to be saved as .html or .css or .js .

    In regards to your <img src>, you should make sure a your files are linked with the <a> element.

    <img src="water.png or gif or jpeg"> (your code should look like this)

    to link

    do <a href="../images/image.png">pic</a>

    Only use / for the root folders or use .. to let the server know how far up it has to go to get to the root folder. Screen shot 2 shows you that you can do things in variety of html and xhtml formats along with embedded or inline css. Just look in the system preferences of Text editor.

    Text wrangler is no different then text edit....all text wrangler does is color your syntax but if your spacing and writing your code clean color syntax isn't needed.

    Attached Files:

Share This Page