Sei sulla pagina 1di 13

HTML 5

<!DOCTYPE html>

<html>
<head>
<meta charset = "utf-8">
<title>...</title>
</head>

<body>
<header>...</header>
<nav>...</nav>

<article>
<section>
...
</section>
</article>
<aside>...</aside>

<footer>...</footer>
</body>
</html>
<!DOCTYPE html>

<html>
<head>
<meta charset = "utf-8">
<title>...</title>
</head>

<body>
<header role = "banner">
<h1>Rahitech solution</h1>
<p>This page should be tried in safari, chrome or Mozila.</p>
</header>
<nav>
<ul>
<li><a href = “abc.html">abc</a></li>
<li><a href = “xyz.html">xyz</a></li>
<li><a href = “mny.html">mny</a></li>
</ul>
</nav>
<article>
<section>
<p>Once article can have multiple sections</p>
</section>
</article>
<aside>
<p>This is aside part of the web page</p>
</aside>
<img src=“”></img>
<footer>
<p>Created by <a href = “rahitech solution</a></p>
• Table
!DOCTYPE html>
<html>
<head>
<title>Example of HTML table column groups</title>
</head>
<body>
<table border="1" cellpadding="10">
<colgroup>
<col style="background: #bed65a;">
<col style="background: #f8d97f;">
</colgroup>
<tr><th>Name</th><th>Address </th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr></table></body></html>
Definition List

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example of HTML Definition List</title>
</head>
<body>
<h1>HTML Definition List</h1>
<dl>
<dt>Bread</dt>
<dd>A baked food made of flour.</dd>
<dt>Coffee</dt>
<dd>A drink made from roasted coffee beans.</dd>
</dl>
</body>
</html>
<form action = “rahitech.com" method = "post">
<p>
<label for = "firstname">first name: </label>
<input type = "text" id = "firstname"><br />

<label for = "lastname">last name: </label>


<input type = "text" id = "lastname"><br />

<label for = "email">email: </label>


<input type = "text" id = "email"><br>
<label>
Select Color: <input type="color" name="mycolor">
</label>
<label>
Select Time: <input type="time" name="mytime">
</label>
<label>
Select Date: <input type="date" name="mydate">
</label>
<input type = "radio" name = "sex" value = "male"> Male<br>
<input type = "radio" name = "sex" value = "female"> Female<br>
<input type = "submit" value = "send"> <input type = "reset">
</p>
</form>
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Embedded JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
document.write(“welcome to rahitech!");
</script>
</body>
</html>
<!DOCTYPE HTML>

<html>
<head>
<script type = "text/javascript">

function showResult() {
x = document.forms["myform"]["newinput"].value;
document.forms["myform"]["result"].value = x;
}
</script>
</head>

<body>

<form action = "/cgi-bin/html5.cgi" method = "get" name = "myform">


Enter a value : <input type = "text" name = "newinput" />
<input type = "button" value = "Result" onclick = "showResult();" />
<output name = "result"></output>
</form>

</body>
</html
<!DOCTYPE html>
<html>
<head>
<script>document.createElement("myContent")</script>
<style>
myContent{
display: block;
background-color: #dddddd;
padding: 50px;
font-size: 30px;
}
</style>
</head>
<body>

<h1>A Heading</h1>
< myContent >My content Element</ myContent >
</body>
</html>
<!DOCTYPE html>
<html >
<head>
<title>Example of jump link</title>
</head>
<body>
<p style="margin-bottom: 1200px;"><a href="#notes">Jump
Link</a></p>
<p id="notes">Rahitech solution, Office 66, Patil Arcade,
Opp.Sharada Center, Near Nal-stop Pune, Maharashtra 411004, (I)
.</p>
</body>
</html>
Audio
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>The HTML5 audio Element</title>
</head>
<body>
<audio controls="controls" src="/examples/audio/birds.mp3">
Your browser does not support the HTML5 audio element.
</audio>
</body>
</html>
video
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The HTML5 video element</title>
</head>
<body>
<video controls="controls" src="/examples/video/MOV02767.mp4">
Your browser does not support the HTML5 Video element.
</video>
</body>
</html>

Potrebbero piacerti anche