Hello,
If you don't need to use HTML to do this task, you can use addSection.
To accomplish that task with HTML/CSS you need to use HTML Extended, available in Premium licenses: https://www.phpdocx.com/documentation/introduction/html-extended-to-word-PHP
Regards.