How to Write HTML in Text Editors

How to Write HTML in Text Editors thumbnail
You don't need a fancy program to write HTML.

HTML is the standard programming language for web pages. The acronym is short for HyperText Markup Language; it's comprised of a series of commands that tell a web browser what to display. There are many HTML editors available to purchase, but they are not required. You can use the text editor already installed on your computer to write HTML. The only difference is that you will have to do more formatting work to keep the code legible for later editing.

Instructions

    • 1

      Launch the text editor that is pre-installed on your computers. If you have a PC, you will use NotePad. If you have a Mac, TextEdit will be used.

    • 2

      Save the blank file by clicking File > Save As. Change the extension from .txt to .html using the dropdown menu located near the bottom of the "Save As" menu.

      The main page of a website is typically named index.html, but you can give your page any name that you want.

    • 3

      Begin typing your HTML. Because text editors do not automatically put tags into another font or color the way HTML editors do, capitalize your tags to make it easy to tell them apart. For example:

      <STRONG>The tag is easy to tell from the text.</STRONG>

    • 4

      Space out your work to keep different sections separate. Web browsers do not register the Enter or Return key, so you can add as much space as you want between sections without affecting the finished web page. For example, the following examples will produce identical web pages, but the first is much easier to read and edit than the second.

      <HTML>

      <HEAD>

      <TITLE>My Page</TITLE>

      </HEAD>

      <BODY>

      This is my web page. It will have lots of text and images.

      </BODY>

      </HTML>

      <HTML><HEAD><TITLE>My Page</TITLE></HEAD><BODY>This is my web page. It will have lots of text and images.</BODY></HTML>

    • 5

      Save the file periodically as you work. You can view your work by opening the file in a web browser. Click File > Open File. Select the page you are working on. Every time you save the file, you can immediately view the changes in the browser.

Related Searches:

References

  • Photo Credit Comstock/Comstock/Getty Images

Comments

Related Ads

Featured