java program to check if HTML tags are semantically correct