Wiki source code of HTML Macro

Version 1.1 by Normann P. Nielsen on 2026/11/15 15:43

Hide last authors
Normann P. Nielsen 1.1 1 {{error}}The HTML Macro is disabled after a clean install due to security reasons, refer to [[https://confluence.atlassian.com/display/DOC/HTML+Macro]]{{/error}}
2
3 The HTML Macro is very flexible for entering style directly at a page, typically because it is the only place it will be used, otherwise create a [[Macro>>Main.atlassian.atlassian-confluence.styling-confluence.macro-s]]
4
5 This is a sample hiding the Menu bar:
6
7
8 {{code}}
9 <style>
10 .ajs-menu-bar
11 {
12 display:none;
13 }
14 </style>
15 {{/code}}
16
17 The HTML Macro can also contain JavaScript:
18
19
20 {{code}}
21 <script>
22 alert('Welcome to my Page');
23 </script>
24 {{/code}}
25
26 or to create objects around alot of other (Confluence Objects) - this sample creates a DIV around an Image, and another macro can then manipulate the DIV:
27
28 [[image:HTMLSample1.jpg||width="500"||height="265"||alt="HTMLSample1.jpg"]]