Add Custom CSS or JavaScript Code to a Course

Add Custom CSS or JavaScript Code to a Course#

Tags: educator how-to

  1. In Studio, from the Settings menu, select Advanced Settings.

  2. Locate the policy keys for Course-wide custom css and Course-wide custom js. The default values will be an empty list [].

  3. You can add URLs to any CSS or JavaScript files in their respective fields. You can use absolute or relative URLs, as you can see in the following example:

    [
       "https://some.cdn.com/library.js",
       "/asset-v1:OpenedX+DemoX+DemoCourse+type@asset+block@some-script.js"
    ]
    
  4. You can upload scripts and CSS files to a course though the Files page accessible under the Content menu in Studio.

Note

Custom CSS or JavaScript added to a course in this manner will only be available in the course content and will not apply to the rest of the site’s UI.

See also

Add Course Files (how-to)

Maintenance chart

Review Date

Working Group Reviewer

Release

Test situation

2025-05-13

@sarina

Teak

Pass