any alternative of <xmp> tag to renders html to as plain text [duplicate]
问题 This question already has answers here : Display HTML code in HTML (24 answers) Closed 4 months ago . I want to show HTML code as plain text. for example <div style="width:250px;"> <xmp> <a href="#"> new element dummy text new element dummy text new element dummy text new element dummy text new element dummy text</a> </xmp> <div> The problem is while using <xmp> tag its ignore the div width that contain text. How can I fix it out. Any other solution instead of <xmp> tag? 回答1: Simply using