Create a Pill Box in Canvas
The Pill Box is an aesthetically inclined way of presenting bite-sized information on a page. Typically, it is used to display the Estimated Reading Time of a page or piece of content to course participants, as shown below.
![](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwNTQyNDI3MDcsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.UQIQEI3v9ZlhtZ-_FibZZ3TbUZk1psMkwkRvloeL40Y)
This small step might be useful for students to help with time management when participating in an online course, or to manage their attention level. You can use the ReadTime website to quickly help estimate how long it may take for participants to read the text on a page, and use that estimate in your Pill Box. Additionally, this guide requires some minor editing of the HTML view in Canvas. While the steps below attempt to simplify the process, we recommend you review the basics of understanding HTML code in Canvas. Understanding the basics of the HTML editor will lead to greater customization opportunities for your course material, allowing you to add buttons, and flair, and fix odd formatting issues.
In-Depth Walkthrough
Step 1
Log in to Canvas, from Cardinal Apps, and open any page to find the Rich Content Editor (RCE). Select the HTML </> button within the window.
![](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwNTQyMzk2ODgsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.gI5KevxK1sB0D7ZjR_DhPycW8hfA6gfzhPKcw8tHGbo)
Step 2
The HTML editor will open in the same window. Find the location within the editor where you want to insert your Pill Box and follow the steps below:
- Highlight the code block from "<ul" to "</ul>", then right-click and select Copy:
- <ul class="pill">
<li>FIRST ITEM</li>
<li>SECOND ITEM</li>
</ul>
Paste the code into the HTML editor in Canvas. It's recommended to paste the information on line 1.
Verify the code with FIRST ITEM and SECOND ITEM successfully inserted. Do not worry about spacing, as long as four rows are used.
![](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwNTQyNzkyNjQsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.fMcLHvVeVVU6ZJPT1VOF9R0f9Keufk5xDz7QkAWaPLI)
Step 3
Now that we have inserted the code into our editor, we are ready to edit our "Pill Box" to display what we want it to display. Select the HTML </> button once more to switch back to the Rich Content Editor view.
![](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwNTQyNDMzMjYsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.6HhZovPcRfA_48xBUOLFHm3BbHOp3L3sSc7fUTWnGMk)
Step 4
Note: The Pill Box will show as a bulleted list in the editor view. That is normal. The Pill Box display will not appear until the page is saved and viewed normally.
Within the editor, locate the bulleted list that displays FIRST ITEM and SECOND ITEM, matching the code we just added. Edit these lines of text to match what you want to display in your "Pill Box". In the example below, the text is replaced with the following values:
- FIRST ITEM becomes "Estimated Time to Read"
- SECOND ITEM becomes "30min"
![](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwNTQyNzk3MDMsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.ST13GLttbI6pFhczxMkj3DN5ka9NA0kt-Fqkn6gTA_o)
Step 5
When you're finished and ready to see how it looks, Save your page to find the "Pill Box" in all its glory when viewing the page normally.
![](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwNTQyODAyMDQsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.7e0MtfM6gYCTyRGt_U_lRmlNzp1f5yoZQVomliXWh5I)
FAQ
What if I want more than two spaces in my Pill Box?
You can add more spaces to your Pill Box by adding more lines to the bulleted list. This can be done within the HTML editor or the normal editor view.
![](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwNTQyODA2NTgsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.arm3KCgrJ1vUz1SFZkAwZ2y1E6VcITS_WyxymyRuHg4)
![Decorative footer: UIW logo and contact information, call (210) 829-2721 or email helpdesk@uiwtx.edu](https://attachment.freshservice.com/inline/attachment?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTcwMjI1NzM1NjQsImRvbWFpbiI6InVpdy5mcmVzaHNlcnZpY2UuY29tIiwidHlwZSI6MX0.6J86mEoTPIkGYC_v4JNFHy2te-1DRneoiboubCRqjck)