I have to put main heading in <h2> tag. I have written following line of code

  • it reads label of RecipeDetail_Ingredient from resource Component for brand_xxx . However I can see <h2> tags are appearing but they are being treated as sting rather than html tag and browser in showing them on the site. Anyone is having idea what wrong is here? below is snippet how it appears on site..

enter image description here

  • Is h2 actually part of the content in the resource component field? – Nuno Linhares Jan 20 '14 at 11:10
  • No. It's hard coded in dwt and also I used &lt; and &gt; . Here stackexchange make it <h2> . – Chakresh Singh Jan 20 '14 at 11:13
  • are there any other TBB's being executed in your Component Template or Page Template after the Dreamweaver TBB? – Puntero Jan 20 '14 at 11:16
  • That's a good point @Puntero - try running it in Template Builder and check the result after the DWT (click on the DWT TBB and check the Output variable), then check again after the other TBBs. – Nuno Linhares Jan 20 '14 at 11:18
  • My guess would be that other TBB is modifying the output variable and pushing it back with the wrong ContentType – Puntero Jan 20 '14 at 11:19

For outputting HTML in a DWT Template, you need to normally write the tags, so just use:


When you start using &lt; and &gt;, it will remain that way and then instead of an <h2> tag, you will see the tag written out on the website.

| improve this answer | |
  • Thanks Bart. It worked as per your suggestion. I shouldn't be more cautious for html handling. – Chakresh Singh Jan 20 '14 at 11:43

I remember that I come across similar problem. I followed below steps:

  • On the DWT, place proper HTML
  • Make sure, page template output is UTF-8
  • Make sure, if any C# fragments are executing after DWT that are converting to &lt;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.