Susie Wyshak on Internet & Business

Susie Wyshak on Internet & Business header image 1

Preformat HTML Code on a Web Page

March 25th, 2009 by susiew

This is as much a note to myself as to the world.

For some reason the <pre> tag doesn’t seem to work these days, perhaps if a page is using a CSS and PRE isn’t “pre”defined in the CSS it won’t work?

In any event I have a great workaround. So if you need to provide sample HTML code on a web page an easy thing to do is fire up your good old Wordpress blog or any other WYSIWYG HTML editor that also allows you to get to HTML code.

1) Compose what you want the end result of the demo HTML code to do in the Visual editor. (e.g. if you are giving someone HTML code to display a logo hosted on another website along with a blurb, do the linking and writing in the Visual editor)

2) Go to HTML mode and copy this code.

3) Paste the HTML code into the visual editor.

Voila - the Visual editor will maintain the HTML code in all its ugliness, and now you can paste it in whatever other Web page or newsletter in which you need to show HTML code.

If this isn’t clear as mud let me know. Or if it is clear as mud let me know too.

Tags: No Comments

Leave A Comment

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.