Is there a generic way to differentiate formatting tags like B, BR, P etc. from text containing tags like DIV, SPAN etc. using Javascript. The method should work even if the formatting tags have content in them (for example B or P tags will have content in them.