Why does Windows default to MS Word to edit .html files?

6

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?

yoozer8

Posted 2011-10-26T03:04:34.047

Reputation: 442

Answers

7

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

kine

Posted 2011-10-26T03:04:34.047

Reputation: 1 669

5+1 I would suggest Notepad++ over Notepad for editing html files. – Ganesh R. – 2011-10-26T06:10:26.100

1@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 – 2013-02-05T18:44:46.717

5

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.

Philihp Busby

Posted 2011-10-26T03:04:34.047

Reputation: 151

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 – 2015-07-15T08:56:45.343

@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 – 2015-07-15T13:47:13.630

1@ADTC - Sure. Original comment deleted to avoid being pinged again in 2 years. – Ramhound – 2015-07-15T13:58:15.620

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 – 2016-04-25T13:48:02.300