Excelsior Bootstrap is an extended version of the Bootstrap framework, known for its open-source nature and its facilitation of responsive and mobile-first web page development. Bootstrap offers a variety of pre-designed components such as columns, callouts, and accordions, along with a responsive grid system. This approach involves leveraging Bootstrap classes to achieve typography, layout, and aesthetic elements wherever possible. For unique design elements beyond Bootstrap’s capabilities, additional custom classes are introduced to complement Bootstrap’s features. This strategy ensures that code remains clean while maximizing Bootstrap’s benefits. While this approach may result in a higher number of classes in the HTML, it allows for fine-tuning of design elements, a fundamental feature of Bootstrap.
Layout
Layout in web design refers to how elements are arranged on a web page. It involves organizing content, such as text, images, and multimedia, in a structured and visually appealing way. Layouts can vary widely depending on the design goals, but they often include elements like headers, navigation menus, content areas, and footers. Effective layout design helps users navigate the website easily, find information quickly, and understand the hierarchy of content.
Page Container
All HTML pages that use Excelsior Bootstrap must start with an unique page container. For Excelsior Bootstrap to take effect, all elements and components must be nested inside a div element with an id of excelsior-bootstrap and another div element with a class of page-container.
<div id="excelsior-bootstrap">
<div class="page-container">
<p>Page content goes in here...</p>
</div>
</div>
The Canvas LMS already adds the role="main" landmark, so it is not required.
However, when using the Excelsior Bootstrap outside of the Canvas LMS or another place that does not specify the main landmark, adding role="main" to any one of the outer div elements will let screen reader know the significance of the content in the page when compared to the other elements on the webpage.
role="main" is an ARIA Landmark. It is recommended to have only one main landmark per HTML page.
Two button styles are available for use. One for internal navigation, and the other one is for resource links.
<a class="btn btn-internal" href="#">Link for internal navigation</a>
<a class="btn btn-resource" href="#">Link to resource</a>
To use a button, create an a element with the following classes: btn and btn-internal (for internal navigation) or btn-btn-resource (for resources).
Cards
Cards are containers for content that can include a variety of elements like text, images, links, and buttons, all organized in a neat, rectangular block. Think of a card as a physical card that contains information and images neatly organized in a small space. Cards enhance user experience by providing consistency and clarity, ensuring content is easy to digest.

Title 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Title 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Title 3
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">
<div class="col">
<div class="card h-100">
<img class="card-img-top" src="..." alt="" />
<div class="card-body">
<p class="h5 card-title">...</p>
<p class="card-text">...</p>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img class="card-img-top" src="..." alt="" />
<div class="card-body">
<p class="h5 card-title">...</p>
<p class="card-text">...</p>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img class="card-img-top" src="..." alt="" />
<div class="card-body">
<p class="h5 card-title">...</p>
<p class="card-text">...</p>
</div>
</div>
</div>
</div>
To create a group of cards with equal height, follow these steps:
- Start by creating a
divelement with the following classes:row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3. Thisdivelement is the container to hold a “deck of cards”, and its classes instruct the container to display the cards in a mobile responsive grid. - In the grid container, each card is wrapped in a
divelement with a class ofcol. Thediv.colelement signifies that each card should be its own column. - A card starts with a
divelement with a class name ofcard. To make the card to have equal heights with other cards in a row, add theh-100class. - Inside the
div.cardelement:- Create a
divelement with a class ofcard-header. Thisdiv.card-headeris optional and should only contains a heading tag. - Create a
imgelement with a class ofcard-img-top. Thisimg.card-img-topis optional. - Create a
divelement with a class ofcard-body. Thisdiv.card-bodyelement contains the card title and body texts. - Create a
divelement with a class ofcard-footer. Thisdiv.card-footerelement is optional, and anything content inside of it will always be pushed to the bottom.
- Create a
To use heading tags effectively, it’s important to follow a logical hierarchy, starting with h1 for the main heading (which is not applicable if working within Canvas LMS) and using subsequent tags (h2, h3, etc.) for subheadings in descending order. To change the font size of the heading, use the appropriate classes that correspond to heading tags. For example, h2 is needed but prefer the font size of a h4 tag. To achieve that aesthetic, add the class of h4 to the h2 tag: <h2 class="h4">...</h2>.
Callouts
A callout is a component used to display important messages or information to users. It is typically styled as a colored box that stands out from the rest of the content on the page. Excelsior Bootstrap provides several predefined styles for callouts.
Title
Illa videamus, quae a te de amicitia dicta sunt. Polemoni et iam ante Aristoteli ea prima visa sunt, quae paulo ante dixi. Negat enim summo bono afferre incrementum diem. Videamus animi partes, quarum est conspectus illustrior; Quid ergo hoc loco intellegit honestum?
Title
Illa videamus, quae a te de amicitia dicta sunt. Polemoni et iam ante Aristoteli ea prima visa sunt, quae paulo ante dixi. Negat enim summo bono afferre incrementum diem. Videamus animi partes, quarum est conspectus illustrior; Quid ergo hoc loco intellegit honestum?
Title
Illa videamus, quae a te de amicitia dicta sunt. Polemoni et iam ante Aristoteli ea prima visa sunt, quae paulo ante dixi. Negat enim summo bono afferre incrementum diem. Videamus animi partes, quarum est conspectus illustrior; Quid ergo hoc loco intellegit honestum?
<div class="callout callout-guide" role="complementary">
<h3 class="h5">...</h3>
<p>...</p>
</div>
<div class="callout callout-quote" role="complementary">
<h3 class="h5">...</h3>
<p>...</p>
</div>
<div class="callout callout-skills" role="complementary">
<h3 class="h5">...</h3>
<p>...</p>
</div>
To create a callout, create a div element with the classes of callout and callout-[prompt], where [prompt] can be guide (purple), quote (blue), and skills (green). For accessibility, make sure to include role="complementary" attribute.
Tip Boxes
A tip box is a component used to display tips, reminders, and notes to users. Like a callout, it is styled as a colored box that stands out from the rest of the content on the page. Excelsior Bootstrap provides three tip box styles: tip, reminder, and note.
Tip: Use the Tip box to provide helpful hints or resources for navigating tools or completing activities in the course.
Reminder: Use the Reminder box to call out reminders to students – this could be to mention timelines, assignment requirements, or other alerts that directly impact successful completion of a course element.
Note: Use the Note box to call out specific learning materials or lesson details that are key things to consider or be aware of related to the course.
<div class="tip" role="alert">
<p><i class="bi bi-info-circle"></i><strong> Tip:</strong> Use the Tip box to provide helpful hints or resources for navigating tools or completing activities in the course.</p>
</div>
<div class="tip tip-reminder" role="alert">
<p><i class="bi bi-exclamation-triangle"></i><strong> Reminder:</strong> Use the Reminder box to call out reminders to students – this could be to mention timelines, assignment requirements, or other alerts that directly impact successful completion of a course element.</p>
</div>
<div class="tip tip-note" role="alert">
<p><i class="bi bi-pencil-square"></i><strong> Note:</strong> Use the Note box to call out specific learning materials or lesson details that are key things to consider or be aware of related to the course.</p>
</div>
To create a tip box, create a div element with the class of tip. To change the tip box to a reminder or note box, append the respective class: tip-reminder or tip-note.
Horizontal Rules (hr)
The hr element, or horizontal rule, is used in HTML documents as a thematic break to visually and semantically separate different sections of content. It usually appears as a horizontal line, aiding in the logical organization and readability of web pages. For screen reader users, the hr is announced as a “separator”, which helps indicate a shift in content or theme, enhancing accessibility. It is crucial that the hr element is used appropriately to reflect actual content divisions rather than merely for decorative purposes, to avoid confusion, especially for those relying on assistive technologies. Its use should align with its semantic purpose: to denote a meaningful break in the content.
Excelsior Bootstrap offers an alternative to the hr element. The horizontal line is thicker and has an icon badge that is aligned in the middle. If the hr element is used for decorative purposes, remember to add the role="presentation" attribute.
<hr class="decorative large bi bi-house-door-fill" role="presentation" />
A horizontal rule is created in HTML using the hr element, which is self-closing. This means the correct way to write it is <hr />, although just <hr> is also widely accepted. However, using <hr> ... </hr> is incorrect because the
element does not contain any content and therefore does not need a closing tag.
To use Excelsior Bootstrap’s horizontal rule appearance, add the decorative class to the hr element. For the icon, add the appropriate icon classes, which is available under the Icons section. To adjust the icon size: add the small or large class.
Images
Images enhance HTML pages by adding visual appeal, supporting content, and improving user engagement. They make text-heavy pages more approachable and illustrate complex ideas. Additionally, when used with appropriate alt text, images improve accessibility for visually impaired users.
Responsiveness
To make image mobile responsive, add the img-fluid class to the img tag. Image will automatically scale the image to size of the container width. Note: responsive image will never scale bigger than its original size dimension.
Alignments
Aligning image to the left or right is achieved with the use of helper float classes.

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Totam quod quia hic architecto ipsam ea eius corporis cupiditate. Esse facere accusamus error delectus ratione nam harum quidem quis assumenda eius. Est laborum voluptatibus sunt, repellendus modi saepe nulla, culpa rerum, asperiores corrupti velit accusamus mollitia unde tempora omnis alias voluptatem deserunt? Dolorum assumenda aliquam, dignissimos pariatur quis quisquam recusandae deserunt! Vel ipsam ex cum officia numquam nemo nobis tempora, eius itaque quia. Numquam, excepturi quaerat, deserunt vitae eligendi quibusdam dolores sint repellat laborum a necessitatibus accusantium! Facilis ducimus voluptatum excepturi! Sunt corporis nobis veniam fugit harum vero velit dolorum perferendis dolor nisi, distinctio nemo laboriosam eum ipsam qui dolores debitis cumque numquam soluta ut autem quas repellat pariatur?

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Totam quod quia hic architecto ipsam ea eius corporis cupiditate. Esse facere accusamus error delectus ratione nam harum quidem quis assumenda eius. Est laborum voluptatibus sunt, repellendus modi saepe nulla, culpa rerum, asperiores corrupti velit accusamus mollitia unde tempora omnis alias voluptatem deserunt? Dolorum assumenda aliquam, dignissimos pariatur quis quisquam recusandae deserunt! Vel ipsam ex cum officia numquam nemo nobis tempora, eius itaque quia. Numquam, excepturi quaerat, deserunt vitae eligendi quibusdam dolores sint repellat laborum a necessitatibus accusantium! Facilis ducimus voluptatum excepturi! Sunt corporis nobis veniam fugit harum vero velit dolorum perferendis dolor nisi, distinctio nemo laboriosam eum ipsam qui dolores debitis cumque numquam soluta ut autem quas repellat pariatur?
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Totam quod quia hic architecto ipsam ea eius corporis cupiditate. Esse facere accusamus error delectus ratione nam harum quidem quis assumenda eius. Est laborum voluptatibus sunt, repellendus modi saepe nulla, culpa rerum, asperiores corrupti velit accusamus mollitia unde tempora omnis alias voluptatem deserunt? Dolorum assumenda aliquam, dignissimos pariatur quis quisquam recusandae deserunt!

Vel ipsam ex cum officia numquam nemo nobis tempora, eius itaque quia. Numquam, excepturi quaerat, deserunt vitae eligendi quibusdam dolores sint repellat laborum a necessitatibus accusantium! Facilis ducimus voluptatum excepturi! Sunt corporis nobis veniam fugit harum vero velit dolorum perferendis dolor nisi, distinctio nemo laboriosam eum ipsam qui dolores debitis cumque numquam soluta ut autem quas repellat pariatur?
Center-aligned image is a block-level element. It is not feasible to have an image center-aligned on a page while also having text wrap around it. Text wrapping around an image typically requires the image to be floated either to the left or right.
<img class="float-start me-3" src="..." alt="" />
<img class="float-end ms-3" src="..." alt="" />
<img class="d-block mx-auto mb-3" src="..." alt="" />
- To left-aligned image, add the
float-startandme-3classes to theimgtag. Theme-3(or margin end) class adds spacing to the right side of the image, so that text is not displayed against it. - To right-aligned image, add the
float-endandms-3classes to theimgtag. Thems-3(or margin start) class adds spacing to the left side of the image, so that text is not displayed against it. - To center-aligned an image, add the
d-blockandmx-autoclasses to theimgtag. Themx-auto(or margin left and right) class adds equal spacing to the left and right side of the image. Center-aligned image is a block level element. If the image is followed by texts, add themb-3class to theimgtag to create a spacing between the image and text.
Caption
Displaying related images and text by using the figure element.

<figure class="figure">
<img src="..." class="figure-img" alt="...">
<figcaption class="figure-caption">...</figcaption>
</figure>
To add a caption to an image, create a figure tag with the class of figure. Inside the figure tag, create an img tag with the class of figure-img. Right after it, create a figcaption tag with the class of figure-caption.
Figure element is a block-level element, but it can be left- or right-aligned as well. Rather than adding the floating helper classes to the img tag, they are added to the figure tag instead.
Tables
Table is particularly useful for presenting data that is best understood in a comparative manner, such as financial reports, timetables, and statistical data. It should be used for displaying tabular data rather than for layout purposes. Using tables for controlling webpage layout is outdated and discouraged, as it leads to more complex and less accessible code, especially for screen readers and other assistive technologies.
| Year | Title | Rating |
|---|---|---|
| 1997 | The Philosopher’s Stone | 4.45 / 5 |
| 1998 | The Chamber of Secrets | 4.39 / 5 |
| 1999 | The Prisoner of Azkaban | 4.54 / 5 |
| 2000 | The Goblet of Fire | 4.54 / 5 |
| 2003 | The Order of the Phoenix | 4.47 / 5 |
| 2005 | The Half-Blood Prince | 4.55 / 5 |
| 2007 | The Deathly Hallows | 4.62 / 5 |
<table class="table">
<thead>
<tr>
<th scope="col">Year</th>
<th scope="col">Title</th>
<th scope="col">Rating</th>
</tr>
</thead>
<tbody>
<tr>
<td>1997</td>
<td>The Philosopher's Stone</td>
<td>4.45 / 5</td>
</tr>
<tr>
<td>1998</td>
<td>The Chamber of Secrets</td>
<td>4.39 / 5</td>
</tr>
</tbody>
</table>
Creating the HTML structure for a table involves several key elements and steps.
- Begin by declaring a
tableelement with a class oftable. This serves as the container for all your tabular data. Thetableelement wraps all the other elements that make up the table, including rows, headers, and cells. - Inside the
table, start with thetheadelement if there are column headers. This section is specifically for headers to define the columns of the table. Within thetheadelement, add atr(table row) element that will contain each header. Then, insertth(table header) elements within thetr. Eachthrepresents a column header and can include attributes to specify scope and other properties to improve accessibility and styling. - After defining the headers, use the
tbodyelement to encapsulate the main body of the table. This section contains all the data rows. Insidetbody, addtrelements for each row of data in the table. Each row represents a single set of related data items. - Within each
trelement in thetbody, includetd(table data) elements. Eachtdcorresponds to a cell in the table and should contain individual data items that align with the headers defined inthelements. The number oftdelements in each row should match the number ofthelements in the headers to maintain a consistent structure. - Optionally, add a
tfootsection if the table requires a footer for summarizing data or providing additional information at the bottom. Likethead, thetfootcontainstrandthortdelements depending on the design.
To make a table accessible, particularly for screen readers, ensure proper use of the scope attribute in the th elements to specify whether they are headers for rows, columns, or groups of rows or columns. To enhance accessibility further, also consider using the aria roles and properties. To learn more about accessible tables, visit Creating Accessible Tables by webaim.org. To see an example of a tabular table that uses caption element and scopes attributes, visit <caption> : The Table Caption element.
A table is not for laying out HTML page structures; it is for tabular data. However, if circumstances ask for it, be sure to add role="presentation" to the table, which helps a screen reader to not interpret it as a table.
Striped Rows
| Year | Title | Rating |
|---|---|---|
| 1997 | The Philosopher’s Stone | 4.45 / 5 |
| 1998 | The Chamber of Secrets | 4.39 / 5 |
| 1999 | The Prisoner of Azkaban | 4.54 / 5 |
| 2000 | The Goblet of Fire | 4.54 / 5 |
| 2003 | The Order of the Phoenix | 4.47 / 5 |
| 2005 | The Half-Blood Prince | 4.55 / 5 |
| 2007 | The Deathly Hallows | 4.62 / 5 |
<table class="table">
<thead>
<tr>
<th scope="col">Year</th>
<th scope="col">Title</th>
<th scope="col">Rating</th>
</tr>
</thead>
<tbody>
<tr>
<td>1997</td>
<td>The Philosopher's Stone</td>
<td>4.45 / 5</td>
</tr>
<tr>
<td>1998</td>
<td>The Chamber of Secrets</td>
<td>4.39 / 5</td>
</tr>
</tbody>
</table>
Compact
To make a table more compact (or with less cell paddings), add the table-sm class to the table element.
Borders
- To add borders to a table and its cells, add the
tabled-borderedclass to thetabletag. - To remove all borders from a table and its cells, add the
table-borderlessclass to thetabletag. - To add a thicker border to any table groups (
thead,tbody, andtfoot), add thetable-group-dividerclass respectively.
Sizes
To change the width of a table, add one of the following classes to the table tag: w-25, w-50, and w-75. The w stands for width, and the number is the percentage of the width relative to the parent (or the outer element where the table is nested).
Table is a block-level element by default. After a table’s width has been adjusted to a smaller size, it can be aligned left or right by using the floating helper classes.
Columns
Columns are used to create responsive grid layouts. It is useful in scenarios where content needs to be organized in a scalable and adaptable way, such as in image galleries, product listings, or any content that benefits from a clean, organized presentation that adjusts nicely across different device screens.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi consectetur, eveniet inventore autem cupiditate aliquam. Tempora debitis minima porro, odit error odio accusamus voluptatem laudantium eos, quia officia quo doloremque.
A molestias autem hic error. Cupiditate, neque nisi nobis debitis perferendis laborum quos exercitationem in deserunt ducimus harum explicabo aperiam est illum distinctio! Earum soluta ullam voluptas debitis laborum dolorem!
Architecto perspiciatis dignissimos, placeat maxime, aspernatur saepe dolores natus, maiores earum odio eaque repudiandae?
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">
<div class="col">
...
</div>
</div>
To use columns, create a div tag with the following classes row, row-cols-1, row-cols-sm-2, row-cols-md-3, and g-3. These classes play specific roles in structuring these layouts.
- The
rowclass is fundamental, establishing a horizontal group of columns. - The
row-cols-1class dictates that by default, there should be one column per row. - The
row-cols-sm-2class adjusts the layout to two columns per row on small devices (like tablets). - The
row-cols-md-3class changes it to three columns per row on medium devices (like desktops). - The
g-3class adds spacing (gutters) of 3 units (max total of 5 units) between columns and rows, ensuring the content within the grid is visually separated and easier to read.
Together, these classes providing a fluid experience as screen sizes vary. The maximum number of columns that a row can have is 12. A column element is simply a div tag with the class of col. To make all columns in a row to have the same equal height, add the h-100 to the all of the div.col elements.
Code
Display inline code or code block text with syntax highlighting by using the code element and the language-[name] class, where [name] is the name of the coding language in all lowercases. The current supported languages are Markup (HTML and XML), C, C+, C##, CSS, JavaScript, Java, Python, and R.
const whoAmI = (isWizard) ? 'A Wizard!' : 'I am a what?';
<code class="language-javascript">const whoAmI = (isWizard) ? 'A Wizard!' : 'I am a what?';</code>
To display a block of code, use the pre (preformatted) element with the class of language-[name]. Inside the pre element, create a code element. All code should be inside of this code element.
Line numbers can be turned on by appending the line-numbers class to the pre element.
const harry = new Character();
harry.hasScar = true;
harry.role = ( isWizard( harry ) ) ? 'A Wizard!' : 'I am a what?';
function isWizard( character ) {
return ( character.hasScar ) ? true : false;
}
<pre class="language-javascript line-numbers">
<code>
const harry = new Character();
harry.hasScar = true;
harry.role = ( isWizard( harry ) ) ? 'A Wizard!' : 'I am a what?';
function isWizard( character ) {
return ( character.hasScar ) ? true : false;
}
</code>
</pre>
To show the HTML code, make sure to escape the < and > symbols. That is, change < to < and > to >.
Task Group
The task group element is a list group. As its name suggested, it lists a group of tasks.
- Review: Lesson | Title
By Wednesday at 11:59 PM ET - Discuss: Title
By Saturday at 11:59 PM ET - Complete: Assignment | Title
By Sunday at 11:59 PM ET - Complete: Knowledge Check | Title
By Sunday at 11:59 PM ET - Engage: Live Session | Title
By Sunday at 11:59 PM ET
<ul class="list-group list-group-flush">
<li class="list-group-item"><i class="bi bi-search"></i> <strong>Review:</strong> Lesson | Title<br />By Wednesday at 11:59 PM ET</li>
<li class="list-group-item"><i class="bi bi-chat-square-dots"></i> <strong>Discuss:</strong> Title<br />By Saturday at 11:59 PM ET</li>
<li class="list-group-item"><i class="bi bi-pencil"></i> <strong>Complete: </strong>Assignment | Title<br />By Sunday at 11:59 PM ET</li>
<li class="list-group-item"><i class="bi bi-clipboard-check"></i> <strong>Complete: </strong>Knowledge Check | Title<br />By Sunday at 11:59 PM ET</li>
<li class="list-group-item"><i class="bi bi-people"></i> <strong>Engage: </strong>Live Session | Title<br />By Sunday at 11:59 PM ET</li>
</ul>
To create a task group, create an ul element with the classes of list-group and list-group-flush. Each task item is a list (li) element with the class of list-group-item. Inside the li element, it starts with an icon and follow by the respective task content and due date.
JavaScript Components
Components rely on JavaScript to provide dynamic functionality and interactive features. These components use JavaScript for behaviors like toggling, collapsing, and transitioning, which can’t be achieved with HTML and CSS alone. They are designed to be both functional and aesthetically pleasing right out of the box.
Accordion
An accordion is a user interface (UI) component used to manage content in a collapsible and expandable manner. It typically consists of a list of items, where each item can be expanded to reveal more content or collapsed to hide it. Accordions are useful for displaying a large amount of information in a limited space, allowing users to focus on the content they are interested in while keeping the rest hidden.
<div class="accordion">
<div class="accordion-item">
<h2 class="accordion-header">
<a class="accordion-button" role="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">Title 1</a>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show">
<div class="accordion-body">
<p>Accordion item body content...</p>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header">
<a class="accordion-button collapsed" role="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">Title 2</a>
</h2>
<div id="collapseTwo" class="accordion-collapse collapse">
<div class="accordion-body">
<p>Accordion item body content...</p>
</div>
</div>
</div>
</div>
To use an accordion, create a div element with the class accordion to contain all your accordion items. Each accordion item consists of a header (an anchor or a tag with the class accordion-button) and a body (a div with the class accordion-collapse).
Bootstrap uses a button element instead of a element inside the accordion header. However, Canvas’s editor forbids the use of form elements, including button. Therefore, the anchor (a) element is used instead to achieve the similar effect and functionality.
Each accordion item’s children elements must have the proper attributes and values defined in order for the accordion as a whole to function. For example, each a.accordion-button element must have the following attributes and values:
role="button"– telling the screen reader that this element functions like button.data-bs-toggle="collapse"– telling Bootstrap that this element is in charge of collapsing the targeted element.data-bs-target="#[collapse_content_id]"– the targeted element that is collapsible. Replace[collapse_content_id]with the targeted element’s ID.aria-expanded="[true/false]"– telling screen reader the current state of the targeted element:trueif it is opened, andfalseif it is closed.aria-controls="[collapse_content_id]"– telling the screen reader which element that is being targeted. Replace[collapse_content_id]with the targeted element’s ID, without the#symbol.
For the accordion body (div.accordion-collapse) element, it must have an unique ID value. To keep an accordion item open on initial page load, add the class show to the div.accordion-collapse element of the item AND add the class collapsed to the corresponding a.accordion-button element.
Tabs
Tabs are a user interface (UI) component used to organize content in a compact and structured way, allowing users to navigate between different views or sections of content within the same page. They are essentially a group of clickable tabs that toggle the display of associated content panels. Each tab acts as a navigational header for the content it displays, and only one tab can be active at a time, showing its corresponding content panel.
Title 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quod cum dixissent, ille contra. Etenim semper illud extra est, quod arte comprehenditur. At iam decimum annum in spelunca iacet. Duo Reges: constructio interrete. In qua si nihil est praeter rationem, sit in una virtute finis bonorum; Eadem nunc mea adversum te oratio est.
- Septem autem illi non suo, sed populorum suffragio omnium nominati sunt.
- Hic, qui utrumque probat, ambobus debuit uti, sicut facit re, neque tamen dividit verbis.
- Nunc dicam de voluptate, nihil scilicet novi, ea tamen, quae te ipsum probaturum esse confidam.
- Modo etiam paulum ad dexteram de via declinavi, ut ad Pericli sepulcrum accederem.
Title 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quod cum dixissent, ille contra. Etenim semper illud extra est, quod arte comprehenditur. At iam decimum annum in spelunca iacet. Duo Reges: constructio interrete. In qua si nihil est praeter rationem, sit in una virtute finis bonorum; Eadem nunc mea adversum te oratio est.
<div class="excelsior-tabs">
<ul class="nav nav-tabs">
<li class="nav-item"><a id="one-tab" class="nav-link active" role="tab" href="#" data-bs-toggle="tab" data-bs-target="#one-pane" aria-controls="one-pane" aria-selected="true"><i class="bi bi-bullseye"></i> Title 1</a></li>
<li class="nav-item"><a id="two-tab" class="nav-link" role="tab" href="#" data-bs-toggle="tab" data-bs-target="#two-pane" aria-controls="two-pane" aria-selected="false"><i class="bi bi-check-circle"></i> Title 2</a></li>
</ul>
<div class="tab-content">
<div id="one-pane" class="tab-pane fade show active" role="tabpanel" aria-labelledby="one-tab">
<h2 class="h4">...</h2>
<p>...</p>
</div>
<div id="two-pane" class="tab-pane fade" role="tabpanel" aria-labelledby="two-tab">
<h2 class="h4">...</h2>
<p>...</p>
</div>
</div>
</div>
To create a set of tabs, follow these steps:
- Start by creating a
divelement with a class ofexcelsior-tabsor replace the class toexcelsior-lg-tabsfor the large tab appearance. This will serve as the container for the tabs. - Inside the
div.excelsior-tabsordiv.excelsior-lg-tabs, create aulelement with classesnavandnav-tabs. This will create the tab navigation. - Within the
ulelement, createlielements with a class ofnav-itemand aroleattribute set topresentation. Inside eachli, create anaelement with a class ofnav-link. This will be each tab’s link.- Add an
idattribute to eachaelement to uniquely identify it. - Add a
data-bs-toggleattribute set totaband adata-bs-targetattribute set to the corresponding tab’sidto enable tab switching. - Include an
aria-controlsattribute set to the corresponding tab’s id and anaria-selectedattribute set totruefor the active tab andfalsefor the inactive tabs. - Append the class
activeto anaelement to set the tab to active. - Inside each
aelement, you can add the tab’s name and an optional icon.
- Add an
- After the
ulelement, create adivelement with a class oftab-content. This will contain the tab panes. - Inside the
div.tab-content, create adivelement for each tab pane with classes oftab-paneandfade.- Append
showandactiveclasses if the current tab pane is to remain open and active. - Add an
idattribute to each tab pane to uniquely identify it. - Add a
roleattribute set totabpaneland anaria-labelledbyattribute set to the corresponding tab’sidto associate the tab with its content.
- Append
Each tab pane content must start with a heading! To use heading tags effectively, it’s important to follow a logical hierarchy, starting with h1 for the main heading (which is not applicable if working with Canvas LMS) and using subsequent tags (h2, h3, etc.) for subheadings in descending order. To change the font size of the heading, use the appropriate classes that correspond to heading tags. For example, h2 is needed but prefer the font size of a h4 tag. To achieve that aesthetic, add the class of h4 to the h2 tag: <h2 class="h4">...</h2>.
Every tab content needs to start with a heading. HTML heading tags are not only important for visual organization but also play a critical role in making content accessible to screen readers. Screen readers rely on heading tags to navigate through the content and provide users with a clear understanding of the structure of the page. When heading tags are used properly, screen readers can convey the hierarchy of the content, allowing users to easily jump to different sections of the page.
Page navigation is located at the top of a page and contains anchored links to various sections of a page content.
<div id="page-content-nav">
<a id="page-content-mobile-nav-btn" role="button" href="#page-content-links" data-bs-toggle="collapse" aria-expanded="false" aria-controls="page-content-links"><i class="bi bi-list"></i> On this page</a>
<div id="page-content-links" class="collapse">
<nav>
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#exampleHeading1">First heading</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#exampleHeading2">Second heading</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#exampleHeading2">Third heading</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#exampleHeading2">Fourth heading</a>
</li>
</ul>
</nav>
</div>
</div>
Several steps are needed to build this sticky navigation.
- Create a
divelement with the IDpage-content-navto serve as the main container for the navigation links. Apply the classsticky-topto ensure the navigation sticks to the top of the parent container as the user scrolls down the page. - Inside the container, add an
atag with the IDpage-content-mobile-nav-btn. This will act as a toggle button to toggle the visiblity of the navigation links when the screen is small.- Set the
roleattribute to “button” to make it accessible. - Use
href="#page-content-links"to link the button to the collapsible content, which is containing the navigation links. - Include
data-bs-toggle="collapse"to activate the collapsing behavior on click. - Add
aria-expanded="false"andaria-controls="page-content-links"for accessibility, indicating that the linked collapsible container is initially closed. - Inside the anchor, add an
itag with classesbiandbi-listto represent the button with an icon. Add a text label like “On this page” for clarity.
- Set the
- Below the button, create another
divwith the IDpage-content-linksand the classcollapseto make it collapsible. - Inside this
div, insert anavelement to contain the navigation links.- Create a
ulwith the classnavto start the list. - Add
lielements with the classnav-itemfor each navigation item inside theul.navelement. - Inside each
li, place anawith the classnav-link. Set thehrefattribute to target the IDs of the content sections (e.g., #exampleHeading1). - Mark the first link as active with the
activeclass.
- Create a
- Below the
div#page-content-navcontainer, create content sections using using appropriate heading tags with corresponding IDs (e.g., id=”exampleHeading1″ for the first section). - Add
ptags or any other necessary HTML to fill in the content for each section.
Carousel
Carousel, or slider, is a component for cycling through elements—generally images or slides of text—like a slideshow.
<div id="carouselExample" class="carousel slide">
<div class="carousel-indicators">
<a href="#carouselExample" role="button" data-bs-target="#carouselExample" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></a>
<a href="#carouselExample" role="button" data-bs-target="#carouselExample" data-bs-slide-to="1" aria-label="Slide 2"></a>
<a href="#carouselExample" role="button" data-bs-target="#carouselExample" data-bs-slide-to="2" aria-label="Slide 3"></a>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="..." class="d-block w-100" alt="...">
<div class="carousel-caption">
<h5>First slide label</h5>
<p>Some representative placeholder content for the first slide.</p>
</div>
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="...">
<div class="carousel-caption">
<h5>Second slide label</h5>
<p>Some representative placeholder content for the second slide.</p>
</div>
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="...">
<div class="carousel-caption">
<h5>Third slide label</h5>
<p>Some representative placeholder content for the third slide.</p>
</div>
</div>
</div>
<a href="#carouselExample" class="carousel-control-prev" role="button" data-bs-target="#carouselExample" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"> </span>
<span class="visually-hidden">Previous</span>
</a>
<a href="#carouselExample" class="carousel-control-next" role="button" data-bs-target="#carouselExample" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"> </span>
<span class="visually-hidden">Next</span>
</a>
</div>
Creating a carousel involves several steps.
Step 1: Create the Carousel Container
Start with a div element to serve as the main container for the carousel. Assign it a unique ID and add the class names carousel and slide to enable carousel functionality and animations.
Step 2: Set Up Carousel Indicators
- Inside the carousel container, add a
divwith the classcarousel-indicators. This will contain navigation indicators for each slide. - For each slide in the carousel, add an
aelement inside the indicators container. These elements should have:hrefpointing to the unique ID of the carousel container.- The
roleattribute set to “button“. - Data attributes
data-bs-targetto link to the carousel’s unique ID anddata-bs-slide-toto indicate the slide index (starting from 0). - The
aria-labelfor accessibility, describing each slide. - The first indicator should have the class
activeandaria-current="true"to denote it as the currently active slide.
Step 3: Create the Carousel Inner
- Add another
divinside the carousel container with the classcarousel-inner. This serves as the wrapper for the slides. - Within the
div.carousel-inner, create multipledivelements with the classcarousel-item. The firstdiv.carousel-itemshould also have the classactiveto show it first when the carousel loads. - Inside each
div.carousel-item, include animgtag with classesd-blockandw-100to make the image responsive and scale properly. Set thesrcattribute to the path of your image and provide an appropriate alt text.
Step 4: Add Carousel Captions (Optional)
- Within each
div.carousel-item, you can optionally add adivwith the classcarousel-captionto display text overlaying the image. - Inside the
div.carousel-caption, use appropriate heading tag for the title andptag for additional text or description.
Step 5: Include Navigation Controls
To allow users to navigate through the slides, add two a elements within the carousel container:
- One with the class
carousel-control-prevfor navigating to the previous slide, and another withcarousel-control-nextfor navigating to the next slide. - Each control should have a
hrefattribute pointing to the carousel’s unique ID, aroleattribute set as “button“, and a data attributedata-bs-targetlinking back to the carousel’s unique ID, anddata-bs-slideset to either “prev” or “next“. - Include
spanelements within each control for visual elements (like arrows) and accessibility features. Use classes such ascarousel-control-prev-iconandcarousel-control-next-icon, and anotherspanelement withvisually-hiddenclass to provide a text description like “Previous” or “Next.”
Verify that all links (hrefs) and IDs match so that the controls, indicators, and carousel container are correctly associated.
Back to Top
Back to top is a component for scrolling a page back to the top of the page. To add the back to top button, simply add the back-to-top class to the div.page-container element.
<div id="excelsior-bootstrap">
<div class="page-container back-to-top">
<p>Page content goes in here...</p>
</div>
</div>
Helpers
Helpers are a set of utility classes designed to provide quick and easy ways to customize the appearance and behavior of elements.
Floating
float-start– align element to the left side fo the page.float-end– align element to the right side fo the page.
Clearfix
Clear floats by adding clearfix to the parent element.
<div class="clearfix">
<div class="float-start">Float left on all viewport sizes</div>
<div class="float-end">Float right on all viewport sizes</div>
</div>
Icons
Icons that are approved for use in Excelsior University courses. To use an icon, create an i element with the following classes bi and bi-[icon-name], where [icon-name] is the name of the icon.
<i class="bi bi-book"> </i>
bi-book | bi-bookmark-check | bi-bookmark-check-fill | bi-bookmark-star | bi-bookmark-star-fill |
bi-box | bi-bullseye | bi-calendar-check | bi-calendar-week | bi-chat-square-dots |
bi-chat-square-dots-fill | bi-check-circle | bi-clipboard-check | bi-clipboard-check-fill | bi-compass |
bi-door-open-fill | bi-easel | bi-exclamation-triangle | bi-gear | bi-file-earmark-arrow-up |
bi-house-door-fill | bi-info-circle | bi-journal-bookmark | bi-journal-text | bi-list-check |
bi-list-task | bi-play-btn | bi-pencil | bi-pencil-fill | bi-pencil-square |
bi-people | bi-people-fill | bi-person-excalamation | bi-person-fill | bi-person-workspace |
bi-puzzle-fill | bi-question-circle-fill | bi-replay-all | bi-search | bi-tags-fill |
bi-universal-access-circle | bi-x-diamond-fill |