Validation and diff markup for HTML and general techniques