Skip to content

Cheeseman757/Starswebsite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the World of Stars

Fun Facts about Stars

Stars are fascinating celestial objects that have captured human imagination for centuries. Here are some fun facts about them:

  • Stars are giant balls of glowing gas, primarily hydrogen and helium.
  • Our Sun is a star, and it provides us with heat and light.
  • Stars vary in size, temperature, and brightness.
  • The color of a star depends on its temperature, with cooler stars appearing red and hotter stars appearing blue.
  • Stars go through various stages of life, including formation, main sequence, and eventually, they can explode as supernovas.

Explore the wonders of the night sky and learn more about the mysteries of the universe.

  1. Link to more stars info!

Dynamic Components

Enter Your Name: Submit
<script> // JavaScript code for dynamic components // (You can place this in an external script.js file) const userInputForm = document.getElementById("userInputForm"); const dateAndTime = document.getElementById("dateAndTime"); const quoteOfTheDay = document.getElementById("quoteOfTheDay");
    // Form submission handler
    userInputForm.addEventListener("submit", function (e) {
        e.preventDefault();
        const userName = document.getElementById("userName").value;
        alert(`Hello, ${userName}!`);
    });

    // Update date and time
    function updateDateTime() {
        const now = new Date();
        dateAndTime.innerText = now.toLocaleString();
    }
    setInterval(updateDateTime, 1000); // Update every second

    // Change the quote of the day (sample quotes)
    const quotes = [
        "The universe is full of stars waiting to be discovered.",
        "Look up at the stars and not down at your feet.",
        "Stars can't shine without darkness.",
    ];
    function updateQuoteOfTheDay() {
        const randomIndex = Math.floor(Math.random() * quotes.length);
        quoteOfTheDay.innerText = `"${quotes[randomIndex]}"`;
    }
    updateQuoteOfTheDay(); // Initial quote
    setInterval(updateQuoteOfTheDay, 10000); // Change every 10 seconds
</script>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors