<div id="contact-description">
@Html.DisplayFor(model => model.Description)
</div>
This is the output this code gives, while the output should only be "Test". How to hide the Span tag?
@Html.DisplayFor(model => model.Description) This is the output this code gives, while the output should only be" /> @Html.DisplayFor(model => model.Description) This is the output this code gives, while the output should only be" /> @Html.DisplayFor(model => model.Description) This is the output this code gives, while the output should only be"/>
<div id="contact-description">
@Html.DisplayFor(model => model.Description)
</div>
This is the output this code gives, while the output should only be "Test". How to hide the Span tag?

Presuming your Description property value contains HTML tags (the
<span>):You want
@Html.Raw(Model.Description).@Html.DisplayForwill automatically delimit HTML to prevent HTML injection. If your expecting HMTL output useRaw()