Support

Support Options

Submit a Support Ticket

 

Help: Wiki HTML

Version 1
by Shawn Rice
Version 2
by Lynn Zentner

Deletions or items before changed

Additions or items after changed

1 The wiki supports inserting HTML into any wiki context.
2
3 HTML support is built-in, and does not require installing any additional packages.
4
5 == How to Use HTML ==
6 -
 
+
7 To inform the wiki engine that a block of text should be treated as HTML, use the ''html'' processor.
8
9 -
This example should explain:
+
This example should explain:
10
11 -
{{{
+
{{{
12 -
#!html
+
{{{#!html
13 -
<pre>{{{
+
<h1 style="text-align: right; color: blue">HTML Test</h1>
14 -
#!html
+
}}}
15 -
&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt;
+
16 -
}}}</pre>
+
17 }}}
18
19 -
Results in:
+
Results in:
20
21 -
{{{
+
{{{#!html
22 -
#!html
+
23

HTML Test

24 }}}
25
26 Note that Trac sanitizes your HTML code before displaying it. That means that if you try to use potentially dangerous constructs such as Javascript event handlers, those will be removed from the output.
27
28 {{{
29 {{{
30 #!html
31 -
&lt;div class=warning style="border: 2pt solid; text-align: center"&gt;
+
<div class=warning style="border: 2pt solid; text-align: center">
32 This is the ''only'' way to go in Trac 0.11
33 -
&lt;/div&gt;
+
</div>
34 }}}
35 }}}
36
37 -
Results in:
+
Results in:
38
39 {{{
40 -
#!html
+
#!html
41
42 This is the ''only'' way to go in Trac 0.11
43 -
</div>
+
</div>
44 }}}
45
46 -
For spans, you should rather use the Macro call syntax:
+
For spans, you should rather use the Macro call syntax:
47
48 {{{
49 Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
50 }}}
51
52 -
Results in:
+
Results in:
53
54 Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
55
56
57 == More Information ==
58
59 * http://www.w3.org/ -- World Wide Web Consortium
60 * http://www.w3.org/MarkUp/ -- HTML Markup Home Page
61
62 ----
63 See also: [Help:WikiFormatting Wiki Formatting], [Help:WikiMacros Wiki Macros]

nanoHUB.org, a resource for nanoscience and nanotechnology, is supported by the National Science Foundation and other funding agencies. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.