question for people more knowledgeable about coding, i want to make a fun facts section on my neocities that rotates through facts somehow. like, you click a button or refresh the page or something and it changes which fun fact is displayed. is there a relatively easy way to do this? I have. practically no knowledge of coding aside from the basic css and html ive used to cobble together a website, and even less of an idea where I would go to learn more
There are two easy ways to do this: client-side or server-side.
Client-side means that the code to choose which fact to display happens within a visitor's browser, and server-side means that the code happens on the server that's hosting the website. Personally, when I set up something like this on my own website, I chose to do it server-side. This was for two reasons: one, so that visitors would still be able to see a new quote each time even if they had javascript disabled, and two, so that people wouldn't be able to "cheat" and see a list of all the quotes by looking at the page's source code.
However, server-side also means that you need the ability to execute code on the server that's hosting your website. A cursory internet search implies that neocities probably allows this, in which case I'd be happy to show you the PHP file I used (side note: PHP is a bad language that should not be used for serious applications, but simple server-side website functionality like this was what the language was designed for and the only legitimate use for it).
If you'd rather do this client-side, though, it's even easier. All you need to do is write some JavaScript in the page that contains a list of facts and randomly chooses one to display each time the page is loaded. Anyone who looks at the source code would be able to see all the facts, but that's not really a problem per se.
