Name card generator

Name Card Generator (adsbygoogle = window.adsbygoogle || []).push({});

Your Name

Job Title

Email: example@email.com

CSS (styles.css):body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .card { border: 1px solid #ccc; padding: 20px; text-align: center; max-width: 300px; }JavaScript (script.js):document.addEventListener("DOMContentLoaded", function() { // Prompt the user for input var name = prompt("Enter your name:"); var jobTitle = prompt("Enter your job title:"); var email = prompt("Enter your email:"); // Update the card content with user input document.getElementById("name").innerText = name || "Your Name"; document.getElementById("jobTitle").innerText = jobTitle || "Job Title"; document.getElementById("email").innerText = "Email: " + (email || "example@email.com"); });This is a basic example, and you can enhance and customize it further based on your specific requirements. The JavaScript part prompts the user for input and updates the content of the HTML elements accordingly.

Comments

Popular posts from this blog

Sort Text Lines

Adsence revenue calculator