You can define div tag and apply style in it. In the @Html.Raw tag , no need of @{} to render the tag.