Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When trying to edit .html files on Windows XP, they open up in MS Word. Is there any reason that this is the default rather than something that is more lightweight and only deals with plain text and doesn't insert any sort of formatting/complex objects (such as Notepad)? Does Word really provide any extra benefit to editing .html files?

On a related note - how can this setting be changed to use something like Notepad, Wordpad, Notepad++, etc?

share|improve this question
up vote 7 down vote accepted

Windows itself doesn't set that association, Office does when it's installed. The reason, I suppose, is that Microsoft intended to make it so that editing HTML files was easier for 'regular people', and Word can (sort of) achieve that.

To change the 'Edit' association, you'll need to go into Windows's file types settings:

  1. Open any folder in Explorer (My Computer, for example)
  2. Go to Tools > Folder Options
  3. Go to the File Types tab
  4. Scroll to and then highlight HTM and/or HTML (you can just tap H on the keyboard probably)
  5. Click the Advanced button
  6. In the Edit File Type window, you will see 'Edit' listed under actions; make sure this is highlighted, and then click the Edit button

    (added). If 'edit' is not listed, then add it via the new button. 'edit', no caps.

  7. In the action editing window, first untick 'Use DDE'
  8. Then, in the 'Application used to perform action' field, change the application path to the application you want to use. Leave the %1 at the end alone. So, for example, to change it to Notepad, you can do: "C:\Windows\notepad.exe" %1
  9. Click OK, OK, OK
share|improve this answer
+1 I would suggest Notepad++ over Notepad for editing html files. – Ganesh R. Oct 26 '11 at 6:10
@GaneshR. I would too, but Notepad is at least installed on any Windows default installation, and works as an HTML editor. I'm sure lots of people have their own preferred text file editor, though. – Ben Richards Feb 5 '13 at 18:44

This doesn't work in Windows 7 because there is no longer a File Types tab in the Folder Options. You can change the default program through the control panel, but not any of the other context menu options, unless you edit registry keys.

The Microsoft Approved way to do this is (and should also be in Windows XP):

  1. Open Internet Explorer
  2. Type Alt+T, and select Internet Options from the menu.
  3. Select the Programs tab
  4. Select from the dropdown "HTML editing", change this from Microsoft Word to another editor.
share|improve this answer
Thankx for providing information for windows 7. – Ratna Feb 15 '14 at 11:22
Thank you so much! That was very quick and simple. And yeah, though the original question is for Windows XP, this question is the top hit for the problem on Google - even if you are on Windows 7. So, this is answer is very welcome and has to be a full-fledged editable answer not a tiny locked comment @Ramhound – ADTC Jul 15 '15 at 8:56
@Ramhound As you say. In any case, this answer is also valid for Windows XP. In fact it's valid for any Windows version that has "Internet Options" dialog in Control Panel. The answer is good in that regard. I'd argue better than the XP-only answer. – ADTC Jul 15 '15 at 13:47
@ADTC - Sure. Original comment deleted to avoid being pinged again in 2 years. – Ramhound Jul 15 '15 at 13:58
Jesus, the "Microsoft Approved" way is such a bad way ot setting it... You can't add your own programs, only choose from the ones offered, none of which I like! – jurchiks Apr 25 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .