Hello,
A Word style only applies to an specific tag. In your code, 'myStyle' only applies to 'h1', and you can't apply a custom paragraph style to a table as you are doing, you need to set specific styles.
If you want to apply a Word style to a table, you need to create a table style. Other important point about your code, as you can read on the API page of the method (https://www.phpdocx.com/api-documentation/word-content/embed-html-Word-document-with-PHP):
strictWordStyles : If true ignores all CSS styles and uses the styles set via the wordStyles option (see next)
If this option is true, all CSS are ignored.
We recommend you to use two approaches:
· Generate a template using MS Word with all styles you want to use and then import them to the DOCX to be able to be used (https://www.phpdocx.com/api-documentation/layout-and-general/import-styles-from-a-Word-document-with-PHP).
· Use CSS to set global properties:
body {
...
}
p {
...
}
Regards.