CxD Archive
Code: Trivia App
Code: Trivia App
  • About
  • Prerequisite Knowledge
  • Code Template
    • Template Build Tutorial
      • 1. Screens as Containers
      • 2. Welcome Screen
      • 3. Question Screen
      • 4. Thank You Screen
      • 5. Core JS Functions
      • 6. Load Questions and Go
      • 7. Respond to Answer Clicks
      • 8. Finishing the Game
      • 9. Visual Enhancement
    • Managing the Question DB
  • More
    • Code Mod Examples
      • Style Changes with CSS
      • Support True/False Questions
      • Add "Next Question" Button
      • Add a Category Selection Screen
      • Add Sound Effects on Answer Clicks
      • Add Basic Scoring
      • Add a Question Timer
      • Add a Question Timer with Pause Button
      • Custom Feedback Text for Individual Questions
      • Use Images with Questions
      • Display the Total Question Count at Welcome
      • Add Background Animation
    • Trivia JS Library Reference
    • P5.js
    • ★ Trivia Project Guidebook
Powered by GitBook
On this page
  • CSS
  • Google Sheet Table of Questions
Export as PDF
  1. More
  2. Code Mod Examples

Support True/False Questions

CSS

In order to display basic True/False questions, simply add the following CSS to your stylesheet. :empty identifies answer buttons that have no content and hides the element using display: none

.answer-btn:empty {
   display: none;
} 

Google Sheet Table of Questions

In your Google sheet table simply put the correct answer (whether "True" or "False") in the correct answer column and the incorrect (whether "False" or "True") in the first incorrect column. Leave the remaining two answers blank.

Likewise, you could have questions that offer only 3 multiple choice answers.

PreviousStyle Changes with CSSNextAdd "Next Question" Button

Last updated 6 years ago