This Season
 

How to Write HTML Code With Macintosh TextEdit

HTML editors flourish on the web. With the right search you can find pages of listings: freeware, shareware, code editors that support HTML and simple editors with preview capabilities. If you want to learn HTML, however, the best way to start is with a simple text editor. TextEdit, which ships free with the Macintosh OS, will do just fine.

Related Searches:
    Difficulty:
    Easy

    Instructions

      • 1

        Open your document in TextEdit. Choose a monospaced typeface such as Courier. This will make your code easier to read.

      • 2

        Type your head and body tags to start the document ("", "" and "", ""). These tags are essential to make your page readable in the browser. You don't need to add anything between the "," tags (these are reserved for page features such as the page title and meta data).

      • 3

        Add your content (page titles, paragraphs, etc) between the "" tags. Use carriage returns between paragraphs to see where you want to add formatting code. This will allow you to concentrate on your content and code in separate stages.

      • 4

        Insert the formatting code. Place the cursor at the beginning of each paragraph. Type the code to format that block of text (e.g., "

        ", "

        "). Place the cursor at the end of each paragraph and type the code to end the formatting (e.g., "

        ", "

        ").

      • 5

        Use carriage returns and spaces to layout your HTML code. Don't use tabs. Two spaces will be fine for each tab if you're using a monospaced font. Browsers don't read carriage returns or spaces between HTML headings which make them ideal for breaking up complicated code like table cells and rows.

      • 6

        Save the file in HTML format. Choose "Save As" from the File menu and change the extension to .htm, not .txt.

      • 7

        Drag the HTML file onto your browser icon to preview the document. If your formatting doesn't look right, make the proper changes in your HTML file.

    Related Searches

    Read Next:

    Comments

    You May Also Like

    Follow eHow

    Related Ads