Using HTML

When, and how, to use HTML in topics.

You can use most HTML tags in topics without a problem. This is useful where you want to add some content that is formatted in a way that is not supported using wiki syntax, for example, you can write <strike>deleted text</strike> to get deleted text.

There are a few usability and technical considerations to keep in mind:
  • On collaboration pages, it's better not to use HTML, but to use wiki syntax instead - this keeps the text uncluttered and easy to edit using the plaintext editor.
  • If you must use HTML, use XHTML 1.0 Transitional syntax.
  • Use <literal>..</literal> tags around blocks of HTML to avoid accidental interpretation of Wiki syntax within the HTML.
ALERT! Script tags may be filtered out, at the discretion of your Wiki administrator.

Recommendations when pasting HTML from other sources (using the plain-text editor):
  • Copy only text between <body> and </body> tags.
  • Remove all empty lines. Foswiki inserts <p /> paragraph tags on empty lines, which causes problems if done between HTML tags that do not allow paragraph tags, like for example between table tags.
  • Remove leading spaces. Foswiki might interpret some text as lists.
  • Do not span a tag over more than one line. Foswiki requires that the opening and closing angle brackets - <...> - of a HTML tag are on the same line, or the tag will be broken.
  • In your HTML editing program, save without hard line breaks on text wrap.

When using a WYSIWYG editor, you can just copy-paste directly into the editor, and the content will be converted to wiki syntax automatically when you save.


Related Topics: TopicMarkupLanguage, UsingHTML, WYSIWYG
Topic revision: r1 - 04 Jul 2015, UnknownUser

  • User Reference
  • BeginnersStartHere
  • EditingShorthand
  • Macros
  • MacrosQuickReference
  • FormattedSearch
  • QuerySearch
  • DocumentGraphics
  • SkinBrowser
  • InstalledPlugins

  • Admin Maintenance
  • Reference Manual
  • AdminToolsCategory
  • InterWikis
  • ManagingWebs
  • SiteTools
  • DefaultPreferences
  • WebPreferences

This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Structural Basis of Medical Practice? Send feedback