Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# ASP.NET MVC Basics Views Using Razor for View Layout

Why put tags around the description, when we are wrapping it with tags in the view? Is it just to show Raw.HTML method?

just curious

1 Answer

James Churchill
STAFF
James Churchill
Treehouse Teacher

Evan,

In this example, the surrounding tags do feel extraneous, but in these kinds of situations, we can't know for sure that the description value will always be formatted within a block level element. So, adding the "extra" surrounding <div> element is also a way to ensure that the description will always be rendered within a block level element.

Thanks ~James