View Markup Language Source Code

Even in the 80es I hardly liked xedit, but getting this proposed as a source viewer in the third millenium is a stark contrast to opera's neat GUI.

Here now is a little external utlity that displays its result in opera. At the price of not getting indentation of the source right, it goes far beyond source viewers of other browsers, mixing in many attributes of the real layout, making things easily recognizable.

This is a silly bit of HTML with diverse elements. And here is how you will see the source.

Images and hyperlinks alas only work when the document has a base-tag, because opera cannot currently pass on the address of the page being displayed.


html2html[ -p|--newpage][ file]
Transforms file or stdin to html code showing the highlighted html or xml source of file. The result is shown in opera. You can set this command as your external viewer in opera. That in fact makes it an internal viewer. Without the option it creates a new window.

You can change the appearance of highlighting by copying all stylesheet lines out of this script into a file ~/.opera/html2html.css and modifying that. This is recommended even if you don't change it as opera doesn't need to reparse it.

A few tags, such as headlines, text-attrs, lists and rough table row structure are also performed. This is supposed to ease recognition of the result, and to help in getting an overview of the structure. Entities have a hover display of the character.


html2html (5kB)


Simply save the file to someplace in $PATH and make it executable. Enter the word html2html or html2html --newpage in Preferences... / Applications / Source viewer.


Daniel Pfeiffer <>