Using HTML in Global Commerce
There are some areas in Global Commerce where you can use HTML to format or define the appearance of text and other elements. This topic provides some guidelines for using HTML in Global Commerce.
Tip: If you are not familiar with HTML, we recommend you visit the HTML page on the World Wide Web Consortium (W3C) Website.
You can use any type of HTML tag. However, your HTML must be valid and syntactically correct. The following list provides additional guidelines you should follow when using HTML in Global Commerce. For a sample list of supported tags, see Supported HTML Code.
-
Digital River uses the XHTML 1 Transitional DTD for the display of its commerce store pages. For the most seamless and consistent look to your site across browsers, make sure that your HTML markup is consistent with this standard. The following DOCTYPE declaration tag appears at the top of every page that Digital River serves:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>">
- Use HTML 5.01/XHTML 1.0 with all your custom pages to ensure that they look and behave as expected.
- Because XHTML is the preferred format, use a closing slash with single tags. For example, use <br /> instead of <br> and <img src="filename.gif" /> instead of <img src="filename.gif">.
- Use all lowercase letters for all tags.
- Do not use the <meta> tag in Storefront Settings.
- When using the <img> tag, you should include the "alt" attribute. If needed, you can include the "name" attribute.
- You do not need to use a class on your <ul>, <li>, or <ol> tags.
- Use the <strong> tag to bold text (instead of the <b> tag) and the <em> tag to italicize text (instead of the <i> tag).
-
Use HTML codes to add symbols. The table below contains some HTML codes for your reference.
Symbol HTML Code © © ® ® † † ™ ™ —
(long dash)— ‘ ‘ ’ ’ “ “ ” ”
You can use HTML in the following places.
Using HTML in Offer Display Content
When you create an offer, you can use HTML in the offer Display Content.
Using HTML in Storefront Settings
When you create a product, you can use HTML when you enter descriptions and email text in the Storefront Details area to format the look of the text.
Example: You can use HTML to make some description text bold or to create a bulleted list of features for your product in the Short Description or Long Description on the Product Details Page tab.
Note: Do not use the <meta> tag in Storefront Settings.
Using HTML in Styles
You can also use HTML in styles to set the look or feel of some elements.
Example: The Head Contents and Body Contents on the HTML tab.
Using HTML in Custom Pages
You can use HTML in the Custom Pages you create or upload for your site. When you create custom pages (using either the Store Builder tool or another tool outside Global Commerce), you should make sure that the HTML or XHTML you use is valid and error-free. There are technically no limits on the code you can use. However, you should only use static content in custom pages.
Note: You do not have to include the actual <body> tags because the files you create or upload will be loaded inside the body content for the page.
Example: You can use HTML in the HTML Content field on the Edit HTML Content pane.
Using HTML in custom product attributes
If the site or company uses custom product attributes (also called domain attributes), any text inputs or text fields for those attributes can accept HTML code. See Common attribute families and Custom attribute families for more information on product attributes.
There are several places in Global Commerce where you can use HTML to format text. We cannot provide an extensive HTML reference here, but we have included a summary of the HTML code you can use in Storefront Settings, custom pages, offer display content, custom product attributes, and styles.
- <p> </p>
- <h1> <h2> <h3> <h4> <h5> <h6>
- <strong> </strong>
- <em> </em>
- <ul> <li> </li> </ul>
- <a> </a>
- <img src... />
- <br />
- <html> </html>
- <head> </head>
- <link>
- <meta> (do not use this tag in Store Details)
- <title> </title>
- <script> </script>
- <form> </form>
- <input>
- <select>
- <textarea>