Coder Social home page Coder Social logo

trivia's Introduction

trivia

Webpage to answer trivia questions. CS50 Problem Set 8.

Demo

Trivia

Implementation Details

Design a webpage using HTML, CSS, and JavaScript to let users answer trivia questions.

  • In index.html, add beneath “Part 1” a multiple-choice trivia question of your choosing with HTML.
    • You should use an h3 heading for the text of your question.
    • You should have one button for each of the possible answer choices. There should be at least three answer choices, of which exactly one should be correct.
  • Using JavaScript, add logic so that the buttons change colors when a user clicks on them.
    • If a user clicks on a button with an incorrect answer, the button should turn red and text should appear beneath the question that says “Incorrect”.
    • If a user clicks on a button with the correct answer, the button should turn green and text should appear beneath the question that says “Correct!”.
  • In index.html, add beneath “Part 2” a text-based free response question of your choosing with HTML.
    • You should use an h3 heading for the text of your question.
    • You should use an input field to let the user type a response.
    • You should use a button to let the user confirm their answer.
  • Using JavaScript, add logic so that the text field changes color when a user confirms their answer.
  • If the user types an incorrect answer and presses the confirmation button, the text field should turn red and text should appear beneath the question that says “Incorrect”.
  • If the user types the correct answer and presses the confirmation button, the input field should turn green and text should appear beneath the question that says “Correct!”.

Optionally, you may also:

  • Edit styles.css to change the CSS of your webpage!
  • Add additional trivia questions to your trivia quiz if you would like!

trivia's People

Contributors

cmartinezal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.