For openSUSE Tumbleweed run the following as root:
zypper addrepo https://download.opensuse.org/repositories/Publishing/openSUSE_Tumbleweed/Publishing.repo
zypper refresh
zypper install w3c-markup-validator
For openSUSE Factory run the following as root:
zypper addrepo https://download.opensuse.org/repositories/Publishing/openSUSE_Factory/Publishing.repo
zypper refresh
zypper install w3c-markup-validator
For 15.6 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/Publishing/15.6/Publishing.repo
zypper refresh
zypper install w3c-markup-validator