HTML isn't really used for this anymore, it's done via CSS (Cascading Style Sheets). On the web currently, HTML pretty much just describes what to be displayed, CSS describes how it's to be displayed and JavaScript is used to provide function to a web page.
In HTML, you could use: align="center" as an attribute of the img tag to center it. Now it's preferable to use text-align: center CSS for the object containing the image (a div or p).
Positioning things on top of each other brings in z-axis and position CSS. Check out the CSS tutorial at http://www.w3schools.com . It's free.
Answer:
The code is witten in Java and given in the explanation section.
Using a Scanner object we receive a the user's input and with the System.out.println we output the variable
Explanation:
import java.util.Scanner;
public class VariableOutput{
public static void main (String [] args){
Scanner input = new Scanner(System.in);
System.out.println("Enter an Integer 15 or 40");
int numObjects = input.nextInt();
System.out.println("You entered the number "+numObjects);
}
}