How to Write HTML to a Text File

How to Write HTML to a Text File thumbnail
HTML is text.

Hyper text markup language, or HTML, is a system of text-based commands used for writing web pages. If you know the language, HTML can be written in any text-editing software such as Notepad on a PC or TextEdit on a Mac. HTML files can also be viewed as text in these programs and then saved as text (.txt) files.

Things You'll Need

  • Text-editing software
Show More

Instructions

  1. Write HTML Directly Into a Text File

    • 1

      Open a blank file in your text-editing software, such as Notepad or TextEdit.

    • 2

      Type the lines of HTML code directly into the new document.

    • 3

      Save the file by selecting "File" and then "Save As" in the drop down menu. Save the file as a text file with the extension .txt. (Note: Once your HTML document is complete, you can save the document as an HTML file and view it in a web browser.)

    Save HTML Code From an HTML File as Text

    • 4

      Locate the HTML file you wish to save as text in your computer directory.

    • 5

      Right-click the file (or control-click for Mac) and select "Open With" in the drop-down menu. Select a text editor from the list of programs on your computer. The file will open and you will see the HTML code.

    • 6

      Click "File" in the text-editor and select "Save As" in the drop down menu. Save the file as a text file with the .txt extension.

Tips & Warnings

  • Avoid word processing software such as Microsoft Word when writing or editing HTML. Coding and formatting are built automatically into documents created by word processing software and may be picked up as errors in the HTML code.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured