Yes, you can do it easily:
· If you're generating the document from scratch use the WordFragment class or the embedHTML.
· If you're using a template with the replaceVariableByWordFragment method or even replaceVariableByHTML.
Or you can mix both is approaches if needed.
Please check the API methods and included examples on http://www.phpdocx.com/documentation/api-documentation