Reveal.js Speaker Notes: Setup and Usage Guide
In this article
Reveal.js speaker notes are a built-in feature that allows presenters to view private notes and a timer on a separate screen while the audience sees only the presentation slides. These notes are implemented using a specific HTML element, <aside class="notes">, which remains hidden from the main slide view but becomes visible when the Speaker View window is activated.
How to Implement Speaker Notes in HTML
To add speaker notes to a Reveal.js presentation, you must place the notes inside an <aside> element with the class notes. This element must be a direct child of a slide section (the <section> tag). Because Reveal.js treats each <section> as a slide, the notes associated with that specific section will automatically sync with the slide during the presentation.
For example, a basic slide structure with notes looks like this:
<section>: The main container for the slide.<h2>Slide Title</h2>: The visible heading for the audience.<p>Slide Content</p>: The visible body text.<aside class="notes">Remember to mention the quarterly growth figures here.</aside>: The private note visible only to the speaker.
It is important to note that the <aside> tag is the standard way to handle this, but the class="notes" attribute is what tells the Reveal.js engine to strip this content from the public view and send it to the speaker window. If you forget the class, the notes will appear on the slide as regular text, which can be embarrassing during a live presentation.
Activating and Using the Speaker View
The Speaker View is not enabled by default on the main screen; it is designed to be opened in a separate browser window or tab. Once your presentation is running in a browser, you can trigger the Speaker View in two primary ways:
- Keyboard Shortcut: Press the
's'key while the presentation is active. This will open a new window containing the Speaker View. - URL Parameter: You can append
?speakerto the end of your presentation URL to launch the view directly.
The Speaker View window provides a comprehensive dashboard for the presenter. It typically includes a large area for the current slide's notes, a preview of the current slide, a preview of the next slide (allowing the speaker to transition smoothly), and a timer that tracks the duration of the presentation. This setup requires a dual-monitor configuration or a laptop connected to a projector. The laptop screen displays the Speaker View, while the projector displays the main presentation window.
Advanced Configuration and Customization
While the default speaker notes are functional, Reveal.js allows for deeper customization through its initialization settings. In the Reveal.initialize() function in your JavaScript file, you can control how the speaker view behaves. For instance, you can configure the speakerView options to adjust the layout or behavior of the notes window.
One common requirement is the ability to format the notes themselves. Since the notes are contained within an HTML element, you can use basic HTML tags inside the <aside> block to make your notes more readable. Using <br> for line breaks or <strong> for emphasis helps the speaker quickly scan the text while speaking. However, avoid using complex CSS or heavy JavaScript inside the notes section, as this can sometimes interfere with the synchronization between the main window and the speaker window.
Another useful tip is managing the timer. The Speaker View timer starts as soon as the presentation begins. If you need to pause or reset the timer, you can do so via the controls in the Speaker View window. This is particularly useful for presentations that include Q&A sessions where the official timing should be paused.
Common Problems and Troubleshooting
One of the most frequent issues users encounter is the Speaker View window not appearing or failing to sync with the main presentation. This is often caused by browser security settings or popup blockers. Because the 's' key triggers a window.open() command, many browsers will block the window as an unwanted popup. To fix this, ensure that popups are allowed for the domain where the presentation is hosted.
Another common problem is the "Blank Notes" issue. If the speaker notes are not appearing in the Speaker View despite being in the HTML, check the following:
- Class Name: Ensure the class is exactly
notes(lowercase). A typo likenoteorNoteswill prevent the engine from recognizing the element. - Nesting: Verify that the
<aside>tag is inside the<section>tag. If it is placed outside the slide boundaries, it will not be associated with any specific slide. - CSS Overrides: Check if any custom CSS is setting
display: noneon allasideelements globally, which might occasionally conflict with how the Speaker View renders the content.
Syncing issues can also occur if the presentation is being served over a slow network or if there are heavy scripts running in the background. Since the two windows communicate via the localStorage API or a similar browser mechanism, ensuring both windows are in the same browser session is critical.
Comparing Reveal.js Notes to Traditional Software
When compared to software like Microsoft PowerPoint or Google Slides, Reveal.js speaker notes offer a different set of advantages and challenges. In traditional software, the "Presenter View" is a proprietary feature integrated into the application. In Reveal.js, it is a web-based implementation. This means it is platform-independent; as long as you have a modern web browser, your notes will work on Windows, macOS, or Linux without needing to install specific software.
The primary advantage of the Reveal.js approach is version control. Because the notes are stored directly in the HTML file, they can be tracked using Git. This allows teams to collaborate on the narrative of a presentation and track changes to the speaker notes just as they would with code. In contrast, traditional slide decks often require manual versioning (e.g., "Presentation_v2_final.pptx").
However, the trade-off is the setup process. While PowerPoint handles the "Swap Displays" function automatically, Reveal.js requires the user to manually move the Speaker View window to the correct monitor and ensure the browser is configured to allow popups. For those comfortable with a small amount of technical setup, the flexibility and portability of the HTML-based system are generally superior.
Frequently Asked Questions
Can the audience see my speaker notes if I forget to open the Speaker View?
No, the audience will not see the notes. The .notes class is styled by default in the Reveal.js CSS to be hidden from the main presentation view. Even if you do not open the separate Speaker View window, the notes remain invisible on the primary slide screen.
How do I add multiple paragraphs to a single slide's notes?
Since the notes are inside an HTML element, you can use <p> tags or <br> tags to create paragraphs and line breaks. Simply placing text on a new line in your code editor will not create a new line in the Speaker View because HTML collapses whitespace by default.
Does the Speaker View work on mobile devices?
Technically, yes, but it is impractical. The Speaker View requires two separate windows to be open simultaneously. While some tablets support split-screen or multiple windows, the experience is designed for a dual-monitor desktop setup. Using a mobile device as a remote for notes is possible but requires a more complex setup involving external controllers.
Can I use Markdown for my speaker notes?
If you are using the Reveal.js Markdown plugin, you can write your slides in Markdown. However, the speaker notes must still be wrapped in the <aside class="notes"> HTML tags within your Markdown file. The plugin will process the Markdown content inside the notes section, allowing you to use bold or italic text for your cues.
Is there a way to change the font size of the notes?
Yes, you can change the font size by adding custom CSS to your presentation's stylesheet. You will need to target the specific classes used in the Speaker View window. Since the Speaker View is a separate window, you may need to ensure your CSS is loaded globally or specifically targeted toward the speaker view elements.