Lesson 1 - Learning construction - Step 4 - Times table

by nathanesa

HTML

<div id="left"></div>
<div id="right"></div>
<div id="top"></div>
<div id="bottom"></div>

<h3>TIMES TABLES</h3>

<p>

CSS

body {
  text-align: center;
  background-color: darkslategray;
  color: white;
  font-size: 40px;
}

#top, #bottom, #left, #right {
  background-color: #C19A6B;
  position: fixed;
}

#left, #right {
  top: 0;
  bottom: 0;
  width: 50px;
}

#left {
  left: 0;
}

#right {
  right: 0;
}

#top, #bottom {
  left: 0;
  right: 0;
  height: 50px;
}

#top {
  top: 0;
}

#bottom {
  bottom: 0;
}

JavaScript

let multiple = prompt('Enter a number from 0 -12');

for (number = 0; number < 13; number ++) {
  document.write(multiple + ' x ' + number + ' = ' + multiple * number + "<br>");
}