Coding in XHTML and CSS is what I do for work, as well as designing web pages and also testing web pages. All of these allow me to express my love of details and accuracy.
Happily, coding in XHTML and CSS is also what I do for fun. I prefer to do my coding by hand.
There are standards for coding in XHTML and they result in improved web pages. Firstly use the correct DOCTYPE declaration. Choose from:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
Next try to use semantic markup for your XHTML and leave the styling to the CSS. Finally you can test that your XHTML meets the standards by using a validator.