u2i interview question

Writing a function to process html syntax