• Home
  • Basketball
  • Football
  • WWE
  • esports
  • Golf
  • MMA
  • Tennis
Friday, May 9, 2025
  • Login
  • Home
  • Basketball
  • Football
  • WWE
  • esports
  • Golf
  • MMA
  • Tennis
No Result
View All Result
  • Home
  • Basketball
  • Football
  • WWE
  • esports
  • Golf
  • MMA
  • Tennis
No Result
View All Result
James Sports
No Result
View All Result
Home esports

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

admin@cpwss2d by admin@cpwss2d
03/23/2025
in esports
0 0
0
Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)
Share on FacebookShare on Twitter

Okay, so today I decided to mess around with building a little quiz app. I’m calling it “yingzhu quiz” for now, just because. It’s nothing fancy, but I wanted to see if I could put something together quickly.

First, I started by sketching out what I wanted. Just a basic question, a few answer choices, and a way to tell if you got it right or wrong. I kept it super simple in my notebook – no need for anything complicated at this stage.

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

Then, I fired up my code editor. I figured I’d use plain HTML, CSS, and JavaScript. It’s the easiest way to get something like this up and running without too much fuss.

I started with the HTML. I created a to hold the question, and then a few more s for the answer choices. I also added a button to submit the answer. I even added an empty underneath where I could show if the answer was correct or not.

Here is the HTML code I ended up with:

Question:

What does HTML stand for?

Answer Choices:

A) Hyper Text Markup Language
B) High Tech Modern Language
Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)
C) Hyperlink and Text Markup Language
D) Home Tool Markup Language

Submit Answer:

Result:

Next up, a little bit of CSS to make it look… well, not terrible. I didn't spend too much time on this, just added some basic styling to make the choices look like buttons and give everything a bit of space.

Here is my simple CSS:

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

css

#quiz {

width: 500px;

margin: 50px auto;

border: 1px solid #ccc;

padding: 20px;

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

.choice {

border: 1px solid #ddd;

padding: 10px;

margin: 5px 0;

cursor: pointer;

.choice:hover {

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

background-color: #eee;

#result {

font-weight: bold;

margin-top: 10px;

Now for the fun part – the JavaScript! I wrote a little function that checks the selected answer against the correct answer. If it's right, it'll display "Correct!", otherwise, it'll show "Wrong!". I also made the choices clickable, so they highlight when you select one.

javascript

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

const choices = *('.choice');

const submitButton = *('submit');

const resultDisplay = *('result');

const correctAnswer = 'a'; // Hyper Text Markup Language

let selectedChoice = null;

// Highlight the selected choice

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

*(choice => {

*('click', () => {

// Remove highlight from previous selection

if (selectedChoice) {

* = '';

// Highlight current selection

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

selectedChoice = choice;

* = '#aaf';

// Check the answer when the button is clicked

*('click', () => {

if (selectedChoice) {

if (* === correctAnswer) {

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

* = 'Correct!';

* = 'green';

} else {

* = 'Wrong!';

* = 'red';

} else {

Yingzhu Quiz: Test Your Knowledge! (Easy & Fun Questions Inside)

* = 'Please select an answer.';

* = 'black';

I hooked up event listeners to the answer choice s and the submit button. That way, when you click an answer, it gets stored, and when you click submit, the checkAnswer function runs.

And that's pretty much it! It's a super basic quiz, but it works. I learned a few things along the way, especially about how to handle user input and update the display. It's not going to win any awards, but it was a fun little project to tackle.

admin@cpwss2d

admin@cpwss2d

Next Post
Redmane Freya Quest Guide: Find All Locations Quickly.

Redmane Freya Quest Guide: Find All Locations Quickly.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Connect with us

  • 23.9k Followers
  • Trending
  • Comments
  • Latest
Digging deep into Hafid Alicea:  What you should know.

Digging deep into Hafid Alicea: What you should know.

12/12/2024
hannah goldy leaked photos and videos get them before theyre gone.

hannah goldy leaked photos and videos get them before theyre gone.

12/24/2024
Best Divergent Universe Teams: Top Picks for Every Fan!

Best Divergent Universe Teams: Top Picks for Every Fan!

01/06/2025
Are the Harbaugh Brothers Twins? Facts About Jim and John Harbaugh

Are the Harbaugh Brothers Twins? Facts About Jim and John Harbaugh

11/05/2024
世界,您好!

世界,您好!

1
Who is Lexie Spiranac? A Look into the Life of Paige Spiranac’s Sister

Who is Lexie Spiranac? A Look into the Life of Paige Spiranac’s Sister

0
Sean Stricklands Girlfriend Revealed: Everything We Know About Their Relationship

Sean Stricklands Girlfriend Revealed: Everything We Know About Their Relationship

0
Why Was the Tank vs Martin Fight Cancelled? All You Need to Know

Why Was the Tank vs Martin Fight Cancelled? All You Need to Know

0
What is inside the emilie kit? Find out exactly what you get with this must have collection.

What is inside the emilie kit? Find out exactly what you get with this must have collection.

03/31/2025
Finding the new neighbors gray zone warfare locations made easy? (Use this quick map to find them all)

Finding the new neighbors gray zone warfare locations made easy? (Use this quick map to find them all)

03/31/2025
Improve your game with the incisive pass: See how it works!

Improve your game with the incisive pass: See how it works!

03/31/2025
OP FC 24 cards under 10k: hidden gems revealed here now!

OP FC 24 cards under 10k: hidden gems revealed here now!

03/31/2025

Recommended

What is inside the emilie kit? Find out exactly what you get with this must have collection.

What is inside the emilie kit? Find out exactly what you get with this must have collection.

03/31/2025
Finding the new neighbors gray zone warfare locations made easy? (Use this quick map to find them all)

Finding the new neighbors gray zone warfare locations made easy? (Use this quick map to find them all)

03/31/2025
Improve your game with the incisive pass: See how it works!

Improve your game with the incisive pass: See how it works!

03/31/2025
OP FC 24 cards under 10k: hidden gems revealed here now!

OP FC 24 cards under 10k: hidden gems revealed here now!

03/31/2025

About Us

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Read more

Categories

  • baseball
  • Basketball
  • Bonus di benvenuto
  • esports
  • Football
  • Golf
  • MMA
  • Tennis
  • WWE

Recent News

What is inside the emilie kit? Find out exactly what you get with this must have collection.

What is inside the emilie kit? Find out exactly what you get with this must have collection.

03/31/2025
Finding the new neighbors gray zone warfare locations made easy? (Use this quick map to find them all)

Finding the new neighbors gray zone warfare locations made easy? (Use this quick map to find them all)

03/31/2025

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Basketball
  • Football
  • WWE
  • esports
  • Golf
  • MMA
  • Tennis

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In