document(bits rendering fortunatelymore or less the same algorithm as in code fragment can be used to match the tags in an html document in code fragments and we give java program for matching tags in an html document read from standard input for simplicitywe assume that all tags are the simple opening or closing tags defined above and that no tags are formed incorrectly code fragment complete java program for testing if an html document has fully matching tags (continues in code fragment