HTML Standard: <div> tag

<div> tag

Inserts a div tag.

MS Word does not count with a direct equivalent of the HTML div tags. That's why phpdocx treats them as containers to apply styles to their contents. This behavior can be modified with the parseDivs option, that allows to parse divs as paragraphs or tables.

Please refer to the HTML to Word page for more information about the available options of this tag.

Code samples

Example #1

The resulting Word document looks like: