(no commit message)
[openafs-wiki.git] / TWiki / UsingHTML.mdwn
1 ## <a name="Using HTML"></a> Using HTML
2
3 You can use most HTML tags in TWiki 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 [[TWiki shorthand|Main/WebHome#TWikiShorthand]], for example, you can write `<strike>deleted text</strike>` to get <strike>deleted text</strike>.
4
5 There are a few usability and technical considerations to keep in mind:
6
7 - On collaboration pages, it's better **not** to use HTML, but to use [[TWiki shorthand|Main/WebHome#TWikiShorthand]] instead - this keeps the text uncluttered and easy to edit using the plaintext editor.
8 - If you _must_ use HTML, use [XHTML 1.0 Transitional](http://www.w3.org/TR/xhtml1/) syntax.
9 - Use `<literal>..</literal>` tags around blocks of HTML to avoid accidental interpretation of [[TWiki shorthand|Main/WebHome#TWikiShorthand]] within the HTML.
10 - %X% Script tags may be filtered out, at the discretion of your TWiki administrator.
11
12 Recommendations when pasting HTML from other sources (using the plain-text editor):
13
14 - Copy only text between `<body>` and `</body>` tags.
15 - Remove all empty lines. TWiki 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.
16 - Remove leading spaces. TWiki might interpret some text as lists.
17 - Do not span a tag over more than one line. TWiki requires that the opening and closing angle brackets - <code>**&lt;...&gt;**</code> - of a HTML tag are on the same line, or the tag will be broken.
18 - In your HTML editing program, save without hard line breaks on text wrap.
19
20 When using a WYSIWYG editor, you can just copy-paste directly into the editor, and the content will be converted to [[TWiki shorthand|Main/WebHome#TWikiShorthand]] automatically when you save.