Thread
:
help me to validate a html file..to check for tag matching nd nesting..
View Single Post
Salem
Ambitious contributor
24Jan2008,00:49
Code:
<head> </head> <body> <td> <tr> </tr> </td> </body>
Use a stack.
Opening tag pushed onto the stack
Closing tag pops the stack and compares (they should be the same).