Hello, I attached a new patch that also avoid printing attributes without a value (value is nil in the DOM). I also refreshed the list of HTML boolean attributes from the current standard, and put checking for a boolean attribute in a separate inline function for clarity. The patch also slightly improve the code by computing the indentation column outside of loop and delegating indentation to `indent-line-to'. Here is a change log: 2025-02-05 David Ponce Fix DOM printing when an attribute value is not a string, which is often the case in SVG DOM. Don't print attributes without a value. Refresh the list of HTML boolean attributes. * dom.el (dom--html-boolean-attribute-p): New function. (dom-print): Use it. Convert attribute value to string before to call `url-insert-entities-in-string'. Don't print attribute without a value. Compute indentation column outside of loop and call `indent-line-to' to indent line. This new version passes the `dom-tests-print'. Thanks!