Tags and CSS

Functionality can be used with the HTML object.


Format #

  • Directly as attribute:
  • Via style attribute:
  • Via CSS section. It can accept just single-level CSS construction to apply the style: tag or class.



    Since HTML Worker 2.0 it's possible to use complex CSS selectors.

Default CSS #

  • display - Specifies the element display option. Currently supports "none" to hide elements, "block" and "inline-block" for images. Since HTML Worker 2.0 support.

    • Style attribute:
    • CSS section:
  • font-family - specifies the text font.

    • Style attribute:
    • CSS section:


    Font must be uploaded at E2Pdf -> Settings -> Fonts. Read More ››

    It must be used the bold font name as value from E2Pdf -> Settings -> Fonts.
  • font-size - specifies the text font size.

    • Style attribute:
    • CSS section:
  • font-weight - specifies the text font weight.

    • Style attribute:
    • CSS section:
  • color - specifies the text font color.
    • Attribute:
    • Style attribute:
    • CSS section:
  • font-style - specifies the text style.
    • Style attribute:
    • CSS section:
  • line-height - specifies the text line height.
    • Style attribute:
    • CSS section:
  • text-decoration - specifies the text decoration.
    • Style attribute:
    • CSS section:
  • page-break-before - specifies moving the content to the next page.
    • Style attribute:
    • CSS section:

    Can be used in context with Parent / Child Blocks or Multipage option.

Supported HTML Tags and specified CSS #

  • <table> - is a table HTML element.
    • width - specifies the width of the table. Can be set only in percentages. By default 100%. Since HTML Worker 2.0 width can be set in px.

      • Attribute:
      • Style attribute:
      • CSS section:

    • align, float - places table on the left, center, or right side of the parent HTML container in case it's used not 100% width.

      • Attribute:
      • Style attribute:
      • CSS section:

    • cellpadding - specifies the space between the cell content and its borders.

      • Attribute:
      • Style attribute:
      • CSS section:

    • padding, padding-left, padding-right, padding-top, padding-bottom - specifies the padding of cell content.

      • Attribute:
      • Style attribute:
      • CSS section:

    • border - specifies the border width of the cell.

      border-left, border-right, border-top, border-bottom - specifies the border of the cell. Since HTML Worker 2.0.

      • Attribute:
      • Style attribute:
      • CSS section:
      • CSS section since HTML Worker 2.0:
    • border-width, border-left-width, border-right-width, border-top-width, border-bottom-width, - specifies the border width of the cell. Since HTML Worker 2.0.

      • Attribute:
      • Style attribute:
      • CSS section:

    • bordercolor - specifies the border color of the cell.

      border-left-color, border-right-color, border-top-color, border-bottom-color, - specifies the border color of the cell. Since HTML Worker 2.0.

      • Attribute:
      • Style attribute:
      • CSS section:

    • bgcolor - specifies the table background color.

      • Attribute:
      • Style attribute:
      • CSS section:

    • text-align - specifies the global horizontal content alignment of the table cell's content.

      • Style attribute:
      • CSS section:

    • vertical-align - specifies the global vertical content alignment of the table cell's content.

      • Style attribute:
      • CSS section:

    • split-rows - specifies to split the rows in case of the content inside the row is overflowed and will not fit on the page.

      • Attribute:
      • Style attribute:
      • CSS section:

      Can be used in context with Parent / Child Blocks or Multipage option.

    • keep-together - specifies to keep the whole table unbreakable between pages in case true.

      • Attribute:
      • Style attribute:
      • CSS section:

      Can be used in context with Parent / Child Blocks or Multipage option.

    • header-rows - define the rows to be duplicated in the new block in case the table splitting.

      • Attribute:
      • Style attribute:
      • CSS section:

      Can be used in context with Parent / Child Blocks or Multipage option.

    <tr>
    <td>

    • width - specifies the width of the cell. Can be set only in percentages. By default, the width of the width of the cells will equal each other. Since HTML Worker 2.0 width can be set in px.

      • Attribute:
      • Style attribute:
      • CSS section:

    • height - specifies the height of the cell. Can be set only in px.

      • Attribute:
      • Style attribute:
      • CSS section:

    • colspan - defines the number of columns a cell should span.

      • Attribute:
        Text1
        Text2Text3

    • rowspan - specifies the number of rows a cell should span.

      • Attribute:
        Text1Text3
        Text2

    • text-align - specifies the text alignment.

      • Style attribute:
      • CSS section:

    • background - specifies the background of the cell.

      • Style attribute:
      • CSS section:

    • border, border-left, border-right, border-top, border-bottom - specifies the border of the cell. Since HTML Worker 2.0.

      • Attribute:
      • Style attribute:
      • CSS section:
      • CSS section since HTML Worker 2.0:

    • padding, padding-left, padding-right, padding-top, padding-bottom - specifies the padding of cell content.

      • Attribute:
      • Style attribute:
      • CSS section:
  • <ul>, <ol>

    • padding-left - specifies the list left padding.

      • Style attribute:
      • CSS section:

    • list-style-type - specifies the list style type. Only "none" is supported.

      • Style attribute:
      • CSS section:

    • list-style-image - specifies the list style type image.

      • CSS section:
        • list-style-image-size - specifies the list style type image size.
        • list-style-image-size-width - specifies the list style type image width.
        • list-style-image-height - specifies the list style type image height.

    <li>

    • padding-left - specifies the list item left padding.

      • Style attribute:
      • CSS section:
  • <img>

    • width - specifies the width of the image. Can be set to "auto" to keep the dimensional size. If the "width" is not set - it will be used original image width.

      • Attribute:
      • Style attribute:
      • CSS section:

    • height - specifies the height of the image. Can be set to "auto" to keep the dimensional size. If the "height" is not set - it will be used original image height.

      • Attribute:
      • Style attribute:
      • CSS section:

    • align, float - specifies the alignment of the image. Doesn't yet support multiple elements alignment. Since HTML Worker 2.0 support.

      • Attribute:
      • Style attribute:
      • CSS section:

    • nowrap - prevents text wrap over the image in case "inline-block". Since HTML Worker 2.0 support.

      • Attribute:
      • Style attribute:
      • CSS section:

    • display - specifies the image display. Since HTML Worker 2.0 support.

      • block - display image as the block separately.
      • inline-block - display image inline with text.

        • Attribute:
        • Style attribute:
        • CSS section:

    • margin, margin-left, margin-right, margin-top, margin-bottom - sets the image margin. Since HTML Worker 2.0 support.

      • Attribute:
      • Style attribute:
      • CSS section:
  • <p> - specifies the HTML paragraph element.

    • margin, margin-top, margin-left, margin-right, margin-bottom - specifies the margin space.

      • Style attribute:
      • CSS section:

  • <div> - specifies the HTML block element.
    • margin, margin-top, margin-left, margin-right, margin-bottom - specifies the margin space.

      • Style attribute:
      • CSS section:
  • <span> - specifies the inline HTML element.
  • <b> - defines bold text.
  • <s> - defines strikethrough text.
  • <u> - defines underline text.
  • <sub> - defines subscript text.
  • <sup> - defines superscript text.