Thursday, 13 April 2017

HTML5 Tags < div > and < convas >

<div>:
            This is main HTML tag that we will use. We will use it to position <convas> on the HTML page.

Syntax:
<div>........
...............
............</div>

For Example: HTML5 Hello World !!!
html5divdoc.html

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Basic html5 document with A DIV</title>
</head>
<body>
<div style="position:absolute; top:50px; left:50px;">
Hello World !!!
</div>
</body>
</html>

The style="position:absolute; top:50px; left:50px;" code is an example of inline CSS in an HTML page. It tells the browser to render the content at the absolute position of 50 pixels from the top of the page and 50 pixels from the left of the page.


<convas>:
                 Work with <convas> will benefit from using the absolute positining method with <div>. We will place our <convas> inside the <div> tag. and it will help us retrieve information, such as the relative position of the mouse pointer when it appears over a convas.



No comments:

Post a Comment