HTML and CSS Reference
In-Depth Information
<div>
This is the main HTML tag that we will use in this topic. We will use it to position <canvas>
on the HTML page.
Example 1-2 uses a <div> tag to position the words “Hello World!” on the screen, as shown
in Figure 1-2 .
Figure 1-2. HTML5 Hello World! with a <div>
Example 1-2. HTML5 Hello World!
<!doctype html>
<html
<html lang= "en" >
<head>
<head>
<meta
<meta charset= "UTF-8" >
<title>
<title> CH1EX2: Hello World HTML Page With A DIV </title>
</title>
</head>
</head>
<body>
<body>
<div
<div style= "position: absolute; top: 50px; left: 50px;" >
Hello World!
Search WWH ::




Custom Search