Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to place HTML table code in confluence page?

I am having issue in displaying HTML table in confluence. Table works fine in browser but not in confluence. is there any specific plugin/macro which needs to enabled? please help me with this. 

1 answer

1 accepted

1 vote
Answer accepted
DPK J Community Leader Aug 22, 2019

You need to do this inside HTML macro, in newer version of confluence this macro needs to be enabled from Admin screen.


Thank you for your kind response.

I have code inside HTML macro. Version of confluence is  6.13.4.  Table is displaying in browser but not in confluence. Please help me with the solution..

DPK J Community Leader Aug 22, 2019

Have you sanitized markup for table?

Can you share small snippet of editor from confluence where you are adding table html code.

Capture.PNGOkay, i have this HTML code for table which i directly written in HTML macro of confluence. In browser it's showing proper colored,bordered table but in confluence it's not showing any table, 

DPK J Community Leader Aug 22, 2019

@Kirti sabade

There are few points here,

  • HTML macro is not meant for creating new html page inside existing HTML page of confluence.
  • If want to style table differently, start with <table> tag, and use inline styling for its elements.
  • If you still want to create full <html> then try wrapping it in <iframe>.

Like this for inline styling,


<tr><th style="color: #FF0000;">Head</th></tr>

<tr><tr style="color: #00FF00;">Row</tr></tr>



And like this for <iframe> wrapping


<!DOCTYPE html>




table th {

color: #FF0000;


table tr {

color: #00FF00;





<table style="width:100%">

<tr> <th>Head</th> </tr>

<tr> <td>Row</td> </tr>





Okay, I have this 400 line table code. Now please tell me where should i place this entire code if i want this to appear in confluence, exact same as way as it appears in my web browser. 

And thank you so much for bearing with me. much appreciated sir :) 

DPK J Community Leader Aug 22, 2019

I would suggest use inline styling, and start content directly from <table> tag.


When i paste your sample code in <iframe> this what i get.

DPK J Community Leader Aug 22, 2019

Better use inline styling. Try that also.

Iframe uses changes in confluence from version to version.


SO in inline style, should i paste entire html code or just from <table> tag? if only <table> then where will i paste <html> and <iframe>? what will be in the URL section?



DPK J Community Leader Aug 23, 2019

No, you need to use HTML macro only.

And put html code like this in it.


<tr style="border: 2px solid #333; backgroud-color: #efefef; color: #999;" ></tr>



style="border: 2px solid #333; backgroud-color: #efefef; color: #999;"

is inline style for table's tr element.

Like Kirti sabade likes this

Its looking like this,


Table should rather look like this,tt.PNG

Whats the ideal way to implement this,

DPK J Community Leader Aug 23, 2019

So I have tried is my self, I have added this code to HTML macro

Screenshot 2019-08-23 at 1.43.53 PM.png


Which produces this output

Screenshot 2019-08-23 at 1.44.06 PM.png

Like Kirti sabade likes this

How come it's not working with me.. is it because i need to place images and text strings inside the table rows and columns?


okay here is my mail-id please send hi, i will share the code snippet with you. here i could't able to share large code. would you be fine with that? otherwise also its fine.

Here is how my code looks. there are tiny images on every row and column.


Never mind, Guess what?? It worked!! Thank you so much sir! I owe you so much..


Thank you so much for your patience and help! great day ahead!

Like Deepanshu Natani likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

402 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you