Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Class 1 Lab</title>
- <style>
- h1 {
- color:rgb(20, 219, 37);
- background-color:rgb(37, 19, 139);
- }
- </style>
- </head>
- <body>
- <header>
- <h1>Class 1 Lab</h1>
- </header>
- <main>
- <p style="color:lightseagreen; background-color:saddlebrown">Hello, what's your name?</p>
- <p style="color:rgb(35, 166, 206); background-color:rgb(125, 15, 189)">Thank you __userName__. Where are you from?</p>
- <p style="color:rgb(155, 18, 47); background-color:rgb(255, 145, 0)">What do you do for a living in __userCity__?</p>
- <p style="color:rgb(41, 150, 7); background-color:rgb(46, 21, 156)">Interesting. How many years have you done that?</p>
- </main>
- <footer>
- <p></p>
- </footer>
- <script>
- // get data from user and log to console
- var userName = prompt('Hello, what\'s your name?')
- console.log('user\'s name: ', userName);
- var userCity = prompt('Thank you ' + userName + '. Where are you from?');
- console.log('user\'s location: ' + userCity);
- var occupation = prompt('What do you do for a living in ' + userCity + '?');
- console.log('user\'s occupation: ' + occupation);
- var experience = prompt('Interesting. How many years have you done that? ');
- console.log('years experience: ' + experience);
- // farewell to user listing all variables
- alert('It was nice meeting you ' + userName + ' from ' +
- userCity + ' with ' + experience + ' years experience as a ' + occupation + '.');
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement