1

I want to put one line html code inside org table. I wrote following text(see Input below) in org-mode and exported it to html and opened in my browser(see Output below). But the output is not what I expected.

Input(sample.org):

| No | html code           | desc |
|  1 | #+HTML: <p>hoge</p> | hoge |

Output(sample.html):

enter image description here

My expected output is below.

Expected output(sample.html):

enter image description here

Is there any way to do this?

2
  • Do you mean <b>hoge</b>? I don't think that <p>hoge</p> makes any sense in a table.
    – NickD
    Mar 8, 2020 at 1:59
  • @NickD: I assume any tag I can use in html, like <p>, <div>, <img>, <table>, etc. Mar 8, 2020 at 2:46

1 Answer 1

5

I cite from https://orgmode.org/manual/Quoting-HTML-tags.html:

The HTML export back-end transforms < and > to &lt; and &gt;. To include raw HTML code in the Org file so the HTML export back-end can insert that HTML code in the output, use this inline syntax: @@html:...@@. For example:

@@html:<b>@@bold text@@html:</b>@@

In the following example I use <i> instead of <b> to separate the formatting from the formatting of the table heading.

| my | table                                |
|----+--------------------------------------|
|    | @@html:<i>@@italic text@@html:</i>@@ |

Rendered result:

rendered table

1
  • Thanks. This is what I wanted.:) Mar 8, 2020 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.