Академический Документы
Профессиональный Документы
Культура Документы
Examples
VISOKA TEHNIKA KOLA STRUKOVNIH STUDIJA U SUBOTICI | SZABADKAI MSZAKI SZAKFISKOLA | SUBOTICA TECH
24000 SUBOTICA, MARKA OREKOVIDA 16
http://www.vts.su.ac.rs/
HTML5 examples
A simple HTML5 document
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Simple HTML document</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
HTML5 Audio
Embedding audio in HTML documents
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The HTML5 audio Element</title>
5
</head>
<body>
<audio controls="controls" src="birds.mp3">
Your browser does not support the HTML5 audio element.
</audio>
</body>
</html>
HTML5 Video
Embedding video in HTML documents
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The HTML5 video element</title>
</head>
<body>
<video controls="controls" src="big_buck_bunny.mp4">
Your browser does not support the HTML5 Video element.
</video>
</body>
</html>
HTML5 Canvas
Drawing a line onto the canvas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Drawing a Line on Canvas</title>
<style type="text/css">
canvas{
border: 1px solid #000;
}
</style>
<script type="text/javascript">
window.onload = function(){
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
context.moveTo(10, 150);
context.lineTo(250, 50);
context.stroke();
};
</script>
</head>
<body>
<canvas id="myCanvas" width="300" height="200"></canvas>
</body>
</html>
10
HTML5 SVG
Embedding SVG into HTML documents
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Embedding SVG Into HTML Pages</title>
</head>
<body>
<svg width="300" height="200">
<text x="10" y="20" style="font-size:14px;">
Your browser support SVG.
</text>
Sorry, your browser does not support SVG.
</svg>
</body>
</html>
11
Fig 13. Creating a line, rectangle, circle and text using SVG
12
HTML5 YouTube
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Youtube video implementation</title>
</head>
<body>
<h1>Youtube video implementation</h1>
<iframe width="420" height="345"
src="http://www.youtube.com/embed/8NAaRQUTp9g">
</iframe>
</body>
</html>
13