Please read our student and staff community guidance on COVID-19
Skip to main content Skip to navigation

Add a HTML block

This guide describes the HTML block that can be added to the right-hand column of a Moodle space or to the centre and right-hand column on the dashboard. Examples are used to illustrate the ways HTML blocks are used at Warwick.

You will need to be able to understand and use simple HTML to make full use of this block.

The HTML block is a versatile block as it is has a content section with the same editing toolbar as most resources. This means that you can use HTML to create custom menus, embed media files as well as Twitter or other social media feeds. Importantly, you can add multiple HTML blocks to a single Moodle space.

Adding a HTML block

Follow the instructions in the Add a block guide to add the HTML block.

Editing a HTML block

  1. Click on the gear icon on the right-hand side of the HTML block.
  2. Select 'Configure (new HTML block) block'.
  3. Give the block a name using the 'Block title' field.
  4. Click on '</>' to switch to the HTML view in order to add HTML code.

Using a HTML block

Any valid HTML code can be added to the HTML block. However, please note:

You can use:

You cannot use:

  • an external CSS file
  • Javascript

Create a resources or links menu

One of the more effective uses for the HTML block is in providing a module/department wide navigation menu, particularly for links to external (SiteBuilder and elsewhere) pages.

As you can use any standard HTML, including Bootstrap, it is possible to create horizontal menus using tabs or pills, with panes, and even collapsible accordions to create more complex versions.

  1. Copy the code from this text file.
  2. Add and configure a new HTML block to your Moodle space (as above).
  3. Click on '</>' to switch to the HTML view in order to add HTML code.
  4. Paste in the code and edit it to add links, amend the FA icons etc.
  5. Click 'Save changes'.

Adding a twitter feed

Display the latest tweets from any Twitter account:

  1. Log in to Twitter
  2. Follow the instructions to create a timeline widget using https://publish.twitter.com/
  3. Add and configure a new HTML block to your Moodle space (as above).
  4. Click on '</>' to switch to the HTML view in order to add HTML code.
  5. Copy and paste the code provided by Twitter into the HTML source.
  6. Click 'Save changes'.

The new block will appear in the right-hand column.

For more information on this, please contact moodle at warwick dot ac dot uk.


More information on HTML Blocks is available in this Moodle Article.

The information on this page relates to Moodle v3.6 and was last updated March 2020.

Contents

Filter by tool, task or content