Moodle Markdown editing – hidden treasure Part 9
Part 9 of our using Markdown in Moodle series, this time we look at line breaks and horizontal rules.
Previous posts in this series
- Introduction to Markdown – https://wp.me/p8KJp1-No
- Editor preferences – https://wp.me/p8KJp1-Nx
- Text formatting with Markdown – https://wp.me/p8KJp1-NJ
- Creating headings with Markdown – https://wp.me/p8KJp1-NQ
- Markdown to create lists – https://wp.me/p8KJp1-O4
- Quoted paragraphs – https://wp.me/p8KJp1-O8
- Adding links with Markdown – https://wp.me/p8KJp1-Oc
- Markdown for images – https://wp.me/p8KJp1-Of
Line breaks
In some texts, for instance in poetry and verse, it is often necessary to insert line breaks. Trying to do so with the return key will not give the intended effect as by default the lines will be run together to create a paragraph.
Little baby Oh so small One day you will be big and tall I watch you while you laugh and play My love for you grows everyday ...
The above input, using the enter key to insert line breaks will give the following output because breaks are ignored:
Little baby Oh so small One day you will be big and tall I watch you while you laugh and play My love for you grows everyday ...
But by ending each line with two spaces you can force line breaks as follows:
Little baby Oh so small One day you will be big and tall I watch you while you laugh and play My love for you grows everyday ...
Horizontal rules
Horizontal rules are a standard HTML method of creating a visual divider on the page. It’s not used so much these days, but can still be useful.
Horizontal rules can be created by placing three or more asterisks (*), hyphens (-) or underscores (_) on a line by themselves.
The following will work:
***
However, you can add spaces or further characters to make it more obvious it’s a section break – remember, one aim of Markdown is to make the text and it’s formatting easy to read by humans. All the following will give a horizontal rule.
* * * * *
-------------------------
_ _ _ _ _
Now you can control the layout of your Markdown more easily with line breaks and horizontal rules 🙂
More cool Markdown next post!
- H5P periodic table – 8th September 2023
- Moodle 4.0 – 15th May 2022
- Moodle 4.0 other highlights – 14th May 2022