CSCIE-3_Week1_Assign1

Fork Fiddle

by Rick Harraghy

HTML

<h2>Hello!</h2>
<div id="helloworld"></div>
<h3>Lets test your Monty Python knowledge !!</h3>
<h4>What is the air-speed velocity of a swallow?</h4>
<div id="Swallow"></div>

CSS

#helloworld {
    color: red;
}
#Swallow {
    color: blue;
}

JavaScript

var name = prompt("What is your name?");  
  document.getElementById("helloworld").innerHTML="Welcome to CSCI E-3, "+name;
  var answer = prompt("Lets test your Monty Python knowledge - What is the air-speed velocity of a swallow?");
document.getElementById("Swallow").innerHTML="And your answer is:   "+answer;