It would be good if we could wrap conditional markup with an if statement. See line 13 in the attached screenshot, `@if (Html.Exists("img")) {` Something like this. 