Raw HTML Module Best Practices
  • 04 Nov 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Raw HTML Module Best Practices

  • Dark
    Light
  • PDF

Article summary

Here are the standard practices that need to be followed while saving any content in Raw HTML module:

  1. If there are relative references to Font files which do not point to any valid link on the website, it will give error.
    Eg:
    url(fonts/slick.svg#slick)
    url(fonts/slick.eot)
    url(fonts/slick.woff) and many more
    When these are loaded on server they lead to 404 links on website.
    There should not be any relative URLs in the RAW HTML content.

  2. The background-image and other URL attributes should have values enclosed in proper quotes (single or double).
    In above CSS all the URLs are added like:
    bg1{background-image:url(https://snagfilms-a.akamaihd.net/e92e55d5-a8e5-4267-bcf0-667e2b630d81/images/c5/01/e5788d634dba9de23ddae16f75dc/1586964817429_desktop1images-tab.jpg)}
    But ideally it should be like:
    bg1{background-image:url("https://snagfilms-a.akamaihd.net/e92e55d5-a8e5-4267-bcf0-667e2b630d81/images/c5/01/e5788d634dba9de23ddae16f75dc/1586964817429_desktop1images-tab.jpg")}

Additional example:

<div class="img" style="background-image:url(https://snagfilms-a.akamaihd.net/6f8b306f-ed73-463d-bc4e-b2e72abfdc9e/images/2020/11/3/1604417011915_2002928sxinternational_video_pass_sxvp_21_header_graphic20201200x400images-tab.jpg)"></div>
The URL should be enclosed in single quotes too, like
<div class="img" style="background-image:url('https://snagfilms-a.akamaihd.net/6f8b306f-ed73-463d-bc4e-b2e72abfdc9e/images/2020/11/3/1604417011915_2002928sxinternational_video_pass_sxvp_21_header_graphic20201200x400images-tab.jpg')"></div>
  1. The Image src url or href values in HTML should be enclosed in proper quotes (single or double).

Was this article helpful?