-1
I’m about to create a Q and A site someone has an idea how to start, I already have html, css and js domain
-1
I’m about to create a Q and A site someone has an idea how to start, I already have html, css and js domain
0
As the question is a little comprehensive, I will try to help in the best way possible... Index make a database of questions in a file . js, using object.
Example:
const pergunta 1: {
'pergunta': 'Qual a torre mais famosa de Paris?',
'respostas': ['a': 'Pisa', 'b': 'De rádio', 'c': 'Eiffel', 'd': 'Mont Blanc'],
respostaCerta: 'c',
}
Then you can do a function with a repetition structure, taking the questions from the bank at random. In this you can use imagination and create help functions such as: jump or eliminate some response options.
Then you will need to attach this logic to HTML, using element1.innerHTML instead.
I did something similar a few years ago in Python, follow the project link, if it helps: https://github.com/Felipecard/Jogo_Show_do_Milhao-
Browser other questions tagged javascript html css
You are not signed in. Login or sign up in order to post.
You can start by taking a look at the code of an existing one: https://github.com/codidact/qpixel :-)
– hkotsubo
Please edit the question to limit it to a specific problem with sufficient detail to identify an appropriate answer.
–
Start with the logical and functional part of the site, where you will store the questions and answers, look for existing codes to be based on. And only then worry about styling with CSS.
– Gabriel Branger