My HTML file is only showing HTML code.

After working hard to develop HTML elements in your HTML code you head over to the browser to open the file and the only thing that you see is even more HTML code.  This can be extremely frustrating.  Luckily, this is an easy fix.

One of the first instructions when you opened the exercise files to begin working was to select File > Save As and to rename the file to a new filename.html

Did you remember to change the options in the Save As Type in the box just below the new file name?

If you are seeing the HTML code, you have likely renamed the original .txt file to include your new file name but without changing the options in the Save As Type box just below the file name field; as a result, your file name is filename.html.txt instead of filename.html.

  1. Open your HTML editor and select File > Save As. 
  2. Rename the file. 
  3. From the Save As Type box just below the new file name, select Hypertext Markup Language HTML.
  4. Click on the save button.
  5. Open the file in your web browser and enjoy the look and layout of your web page that you just created.

Article Details

Article ID:
3
Category:
Rating :

Related articles