Text Editors for HTML Programming

Word Processor, Text Editor, or IDE

Learners new to programming sometimes try to use word processors to develop source code. Word processors often save files in a manner that includes special formatting instructions for the word processor. These formatting instructions will not compile in compiled programs or run in interpreted ones and may generate syntax errors.

Although a program developed using a word processor may run, the best approach for a learner is to use a text editor, which saves files as plain text with no formatting; an Integrated Development Environment (IDE) is without a doubt the best environment for software development. An IDE saves the source code in the format specific to the type of development language used but an IDE is often priced out of the range of a learner's budget.

Adobe Dreamweaver is an excellent IDE for developing Web applications and Microsoft Visual Studio provides an environment for developing in the .net environment. This hub concentrates on text editors, which should fall within anyone's budget. Three example text editors are Microsoft Notepad, Notepad++, and TextPad.

This hub provides an illustration of html code as displayed in Microsoft Notepad and Notepad++. The author opened the source code from the hub Create a HTML Table in each of the text editors to show the differences between them.

Click the Image to view the actual size of the source code
Click the Image to view the actual size of the source code

Notepad

Microsoft Notepad is a text editor included with most of the Microsoft Windows Operating System releases. However, there are a couple of disadvantages to using Notepad. First of all, Notepad does not display line-numbers, which is an invaluable feature for troubleshooting source code. Second, Notepad is not syntax aware. This means that Notepad does not change the display of the text according to the syntax of the language used. Notepad will permit word-wrap, which splits long lines of text into multiple lines and provides basic find/replace capability. Beyond that, however, Notepad provides limited functionality.

Click on the image to view full size
Click on the image to view full size

Notepad++

Notepad++ is a down loadable text editor available online. Notepad++ provides some added functionality that is invaluable when writing source code. First, Notepad++ changes the font color of displayed elements to coincide with the syntax of the programming language used. The example to the right is a sample of HTML code displayed in Notepad++. The editor renders the color of the text in the lines to match the syntax of the language and you can change which colors coincide with which elements.

The Language tab at the top of the Notepad++ window permits the user to select the programming language. Some of the languages that Notepad++ understands include the various versions of C, HTML, Java, JavaScript and a number of scripting languages, such as ASP, Pearl, and PHP.

Notepad++ also permits closing blocks of code. This functionality is visible in the sample code as the "-" sign next to opening tags in the HTML document. Clicking on the "-" sign will hide that block of code from the display to make troubleshooting the flow of the blocks easier. Once a block of code has been hidden, the user may redisplay the block by clicking on the "+" sign.

Did I forget to mention the line numbers? OK, Notepad++ displays line numbers to the left of each line of code. This may be of little concern when a file is only four or five lines ling. However, line numbers are invaluable when trying to debug a long block of code as the alternative is to count through the display to locate a particular line.

TextPad

TextPad is available online for evaluation under a share-ware license, which means that the user must pay to register the application to continue use after the evaluation period ends. The disadvantage of using TextPad is that the editor is not aware of the syntax of as many programming languages as Notepad++. TextPad is not aware of JavaScript, for example. However, TextPad offers the option to display line numbers; this functionality is not turned on by default.

What do you think?

The author appreciates all comments.


More by this Author


Comments 1 comment

felicitylovespari profile image

felicitylovespari 5 years ago

Very good information about the text editors. I am a fan of notepad personally. Useful.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working