Vantage21st
How to use Notepad on Windows to find and replace HTML code.
If you are converting a file from HTML to CSS you will want to remove all html <FONT></FONT> tags from the document first. Then you can reformat your text using CSS styles.

It is easy to find and replace HTML code or text in any html document using Notepad on Windows. If you are a Mac user use SimpleText to do this or download a Mac text editor that supports find and replace from the Mac shareware sites.

The example below shows how to remove the opening and closing html <FONT></FONT> tags.

Before performing a find and replace procedure always make a backup of your original file or website. NEVER do a complex find and replace procedure on an original that is not backed up. To back up your file just make a copy of it and save it to the same location as the file you will work on.

Assume your file has multiple occurrences of this opening font tag. <font size=3 face=times> and you will want to remove all instances of the opening font tag and the closing font tag. Keep in mind that the closing font tag is the same for all font tags.

  1. Make a backup copy of your root web directory.
  2. In your working root directory open your html files in Notepad on Windows.
  3. Look at the source code for <FONT></FONT> tags you wish to remove.
  4. In this example let's assume we found the opening font tag <font size="3" face="times">. Copy this line of code to the clipboard.
  5. On the Notepad menu bar select Edit > Replace. You will see a dialogue box like the one below.


  6. Enter the line of code you wish to remove in the Find what: field and Do not enter anything in the Replace with: field as shown below.


  7. Click on the Replace All button. This will replace the line of code with nothing or empty space removing the code from the page.
  8. Repeat this process for other opening font tags that are different like <font size="5" face="times"> where the size is larger.
  9. After removing all opening font tags repeat the process and replace all the closing font tags </font> at the same time.
  10. Run the find and replace routine to remove all OTHER opening and closing font tags in your document.
  11. Save your work and run an Edit > Find procedure to verify that all the code has been removed. Paste the line of code you removed into the Find What: field and click on the Find Next button to verify that the code or text has been completely purged from the document.

You can also find and replace, text, phrases or whole paragraphs. To replace text follow the same procedure for code outlined above and enter the text to be found in the Find what: field and enter the replacement text in the Replace with: field.

Updated January 2005
Copyright 2005 John Sedgwick all rights reserved