Cert++
Close

iscomment versus HTML comments in templates

Key Takeaway

Content inside <iscomment> is removed before the page reaches the browser. An HTML comment (<!-- ... -->) is sent to the browser, and anyone can read it in the page source.

ISML templates can hold developer notes in two ways: the ISML <iscomment> tag or a standard HTML comment. The difference is who can see the note. B2C Commerce strips <iscomment> content out before the page reaches the shopper. An HTML comment is sent to the browser, where anyone can read it. The choice matters most when a note holds something shoppers shouldn't see.

What iscomment does

<iscomment> ... </iscomment> is the ISML tag for documenting a template. Use it for notes such as reminders or instructions for yourself and other developers. Like every B2C Commerce tag, its name starts with the prefix "is". You can place an <iscomment> block anywhere in the template.

The template processor does not parse anything inside an <iscomment> block. The block's content does not appear in the generated storefront page. B2C Commerce never sends the comment to the browser, so the comment isn't visible in the page source.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Given a development task, code ISML templates that use functionality, such as local include, remote include, components, and other ISML tags

0/14

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers.