HTML in WikiText
HTML tags and comments
HTML tags and comments can be used directly in WikiText. For example:
<article class="hello"> This is my nice and simple block of text. HelloThere <!-- This comment will not appear in the wikified output --> </article>
New in: 5.2.0 Comments can now be freely intermixed with pragmas as well as within the main body of a block of wikitext.
<!-- NEW: Comment that describes the macro --> \define test() some text <!-- inline comment --> \end <<test>>
Block mode versus Inline mode
Self closing elements
The following tags are treated as 'void'. This means that
<tag> is treated as if it were
<tag/>, and that no terminating
</tag> is needed (if one is provided it will be ignored and treated as plain text).
If you do not close any other tag then it will behave as if the missing closing tag were at the end of the tiddler.
In an extension of conventional HTML syntax, attributes of elements and widgets can be specified in several different ways:
- a literal string
- a transclusion of a textReference
- a transclusion of a macro/variable
- as the result of a filter expression
- New in: 5.3.0 as the result of performing filter and variable substitutions on the given string
In an extension to HTML, TiddlyWiki also supports accessing individual CSS styles as independent attributes. For example:
The advantage of this syntax is that it simplifies assigning computed values to CSS styles. For example: