Note: You are currently viewing documentation for Moodle 3.9. Up-to-date documentation for the latest stable version of Moodle may be available here: HTML block.

HTML block: Difference between revisions

From MoodleDocs
m (added link to spanish translation of document)
m (updated screenshot)
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Blocks}}
{{Blocks}}
A '''HTML block''' is a standard block used to add text or images on a site or course page.  The title bar can be left blank.
An '''HTML block''' is a standard block used to add text, multimedia, widgets etc to a site front page or course page.  The title bar may be left blank if desired.  


[[File:Htmlblockexample.png]]
{{MediaPlayer | url = https://youtu.be/TuvmtRQZJkI| desc = Overview of HTML block}}


The block is flexible and can incorporate a variety of functions and uses in the content area. It has the standard Moodle [[Text editor]] for formatting text, adding images or creating links,  switching to code view and allows any valid HTML markup to be used. This enables [[Multimedia plugins|embedding video]], [[Audio in Moodle|sounds]], [[Flash]], and other files which can add unique elements to a course or site page.
 
[[File:HTML_blockexamples2.png|center|Two HTML blocks from [[Learn Moodle|https://learn.moodle.net]] ]]
 
The block is flexible and can incorporate a variety of functions and uses in the content area. It has the standard Moodle [[Text editor]] for formatting text, adding images or creating links,  switching to code view and allows any valid HTML mark-up to be used. This enables [[Multimedia plugins|embedding video]], [[Audio in Moodle|sounds]] and other files which can add unique elements to a course or site page.


===Site administration settings===
===Site administration settings===


To aid with theming an administrator can, from ''Administration>Site administration>Plugins>Blocks>HTML'', toggle the ability to allow additional CSS classes to be set in individual block instances. If it is enabled, a field appears at the bottom of HTML block instance's configuration forms:
To aid with styling the block, an administrator can, from ''Administration > Site administration > Plugins > Blocks > HTML'', toggle the ability to allow additional CSS classes to be set in individual block instances. If it is enabled, a field appears at the bottom of HTML block instance's configuration forms:


[[File:additionalcssclasses.png]]
[[File:additionalcssclasses.png|300px]]


Please note that if additional CSS classes have been added and the administration setting is then disabled, the form settings are saved in the database and will reappear if this is re-enabled.
Please note that if additional CSS classes have been added and the administration setting is then disabled, the form settings are saved in the database and will reappear if this is re-enabled.


==See also==
==Adding an analog clock block==
 
[[File:Analog_clock_HTML_block.png|200px]]
* [http://www.schoolanywhere.co.uk/blog/adding-a-twitter-feed-to-moodle/ Adding a Twitter feed to Moodle] blog post by Wesley Ellis explaining how to use the HTML block to display tweets
* See [https://moodle.org/mod/forum/discuss.php?d=275259 this forum thread] for the instructions.


[[fr:Bloc HTML]]
[[fr:Bloc HTML]]
[[de:Textblock]]
[[de:Textblock]]
[{es:Bloque HTML]]
[[es:Bloque HTML]]

Latest revision as of 11:51, 2 September 2020

An HTML block is a standard block used to add text, multimedia, widgets etc to a site front page or course page. The title bar may be left blank if desired.

Overview of HTML block


Two HTML blocks from https://learn.moodle.net

The block is flexible and can incorporate a variety of functions and uses in the content area. It has the standard Moodle Text editor for formatting text, adding images or creating links, switching to code view and allows any valid HTML mark-up to be used. This enables embedding video, sounds and other files which can add unique elements to a course or site page.

Site administration settings

To aid with styling the block, an administrator can, from Administration > Site administration > Plugins > Blocks > HTML, toggle the ability to allow additional CSS classes to be set in individual block instances. If it is enabled, a field appears at the bottom of HTML block instance's configuration forms:

additionalcssclasses.png

Please note that if additional CSS classes have been added and the administration setting is then disabled, the form settings are saved in the database and will reappear if this is re-enabled.

Adding an analog clock block

Analog clock HTML block.png