Skip to content

Tags Supported

Olivier Nizet edited this page Sep 24, 2024 · 2 revisions

This is the complete list of tags supported by Html to OpenXml.

Please refer to this w3schools site for any questions about a markup.

a

  • href except if it starts with javascript: or is an anchor. The only one anchor accepted is: #_top that generates a bookmark in Word.
  • Image link are supported too. aimg //a

abbr

acronym

article

aside

b

blockquote

body

br

caption

  • align
  • style:
    • text-align

cite

del

div

  • align
  • border

dd

dt

em

font

  • size
  • face
  • border

h1 to h6

hr

figcaption

i

img

  • src: absolute or relative url.
  • alt
  • width
  • height
  • border
  • style:
    • border-style
    • border-width
    • border-color

ins

li

ol

p

  • align
  • margin-top/margin-bottom

pre

  • border

span

  • border

s

strike

strong

sub

sup

svg

table

  • align
  • border
  • padding
  • margin
  • width (px, pt, %)

tbody

td

  • colspan
  • rowspan
  • width (px, pt, %)
  • style:
    • writing-mode = tb-lr or tb-rl (for vertical text)
    • padding

tfoot

th

thead

tr

  • height (px, pt, %)

u

ul

+Common:+

body div dt font p pre span

  • lang
  • color
  • style:
    • page-break-after = always, page-break-before = always
    • text-align (not for font)
    • color
    • background-color
    • text-decoration = underline | line-through
    • font-style = italic | oblique
    • font-weight = bold | bolder

tr td table thead tbody tfoot

  • bgcolor
  • valign
  • align
  • style:
    • background-color
    • vertical-align
    • text-align
    • width (px, pt, %)

Ignored Tags

button head input script select style textarea xml