Skip to main content
The NCI Community Hub will be retiring in May 2024. For more information please visit the NCIHub Retirement Page:https://ncihub.cancer.gov/groups/ncihubshutdown/overview
close

Help: Wiki Html

Version
by (unknown)
Version 2
by (unknown)

Deletions or items before changed

Additions or items after changed

1 -
 
+
he 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 +
To inform the wiki engine that a block of text should be treated as HTML, use the ''html'' processor.
7 +
8 +
This example should explain:
9 +
{{{
10 +
#!html
11 +
<pre>{{{
12 +
#!html
13 +
&lt;h1 style="text-align: right; color: blue"&gt;HTML Test&lt;/h1&gt;
14 +
}}}</pre>
15 +
}}}
16 +
17 +
Results in:
18 +
{{{
19 +
#!html
20 +
<h1 style="text-align: right; color: blue">HTML Test</h1>
21 +
}}}
22 +
23 +
Note that the wiki 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.
24 +
25 +
{{{
26 +
{{{
27 +
#!html
28 +
&lt;div class=warning style="border: 2pt solid; text-align: center"&gt;
29 +
This is the ''only'' way to go.
30 +
&lt;/div&gt;
31 +
}}}
32 +
}}}
33 +
34 +
Results in:
35 +
{{{
36 +
#!html
37 +
<div class=warning style="border: 2pt solid; text-align: center">
38 +
This is the ''only'' way to go.
39 +
</div>
40 +
}}}
41 +
42 +
For spans, you should rather use the Macro call syntax:
43 +
{{{
44 +
Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
45 +
}}}
46 +
47 +
Results in:
48 +
Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
49 +
50 +
51 +
== More Information ==
52 +
53 +
* http://www.w3.org/ -- World Wide Web Consortium
54 +
* http://www.w3.org/MarkUp/ -- HTML Markup Home Page
55 +
56 +
----
57 +
See also: [Help:WikiFormatting Wiki Formatting], [Help:WikiMacros Wiki Macros]