Yes, Kentico CMS produces valid XHTML code. Also the built-in WYSIWYG editor automatically cleans up the code so that it's XHTML compliant. You also have full control over the HTML (XHTML) code of the page layouts and document transformations, so you can always adjust the code so that it's XHTML compliant.