The border around "div" elements is be taken into account.
a elements
The whole text for "a" elements is taken into account, even if the link contains several portions of text (for example with "span" elements as children).
However, if the "a" element contains at least one "img" element, no hyperlink will be included in the resulting document, but the first found image will be added instead.
See also
DOCX generation: This article explains how to generate a Word file rather than an HTML site
Hand-written html articles: A raw html article is not using the docGenerator syntax, but is a hand-written html file