video element of HTML5.

The video element is one of the more anticipated features of HTML5. With this
tag, developers will be able to embed videos into a Web page without requiring
a plugin like Flash.

<video src = “bigBuck.ogv” controls>
Your browser does not support embedded video
through HTML5.
</video>


The <video> tag itself is pretty simple to understand, but the actual implementation
is somewhat complex. HTML5 indicates a video tag, but it doesn’t specify
what format the browser will support. It will not surprise you that all the
browser manufacturers have a different opinion about which format will be supported.
At the moment, there are three main video formats in contention.


If you want to incorporate HTML5 video, use the <source> tag to include all the
major formats. (You can use the free FFmpeg tool available for all major software
platforms to convert your videos.) As a final fallback, use the <embed> tag inside
your <video> tag to load the video with a Flash player.
You can use JavaScript to control the video element in the same way you control
audio. See the “audio” section earlier in this part for more information
about controlling your media elements through JavaScript code.

The details Element HTML5

This new element helps mark up a section of the document that’s hidden, but can
be expanded to reveal additional information. The aim of the element is to provide
native support for a feature common on the Web—a collapsible box that has a title,
and more info or functionality hidden away.
Normally this kind of widget is created using a combination of markup and scripting.
The inclusion of it in HTML5 intends to remove the scripting requirements and
simplify its implementation for web authors.

<details>
<summary>Some Magazines of Note</summary>
<ul>
<li><cite>Bird Watchers Digest</cite></li>
<li><cite>Rowers Weekly</cite></li>
<li><cite>Fishing Monthly</cite></li>
</ul>
</details>


If details lacks a defined summary, the user agent will define a default summary
(for example, “Details”). If you want the hidden content to be visible by default,
you can use the Boolean open attribute.

The head Element HTML5

The next part of our page is the <head> section. The first line inside the head is the
one that defines the character encoding for the document. This is another element
that’s been simplified. Here’s how you used to do this:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
HTML5 improves on this by reducing the character encoding <meta> tag to the bare
minimum:
<meta charset="utf-8">

In nearly all cases, utf-8 is the value you’ll be using in your documents.

The html Element HTML5

Next up in any HTML document is the html element, which has not changed significantly
with HTML5. In our example, we’ve included the lang attribute with a
value of en, which specifies that the document is in English. In XHTML-based
syntax, you’d be required to include an xmlns attribute. In HTML5, this is no longer
needed, and even the lang attribute is unnecessary for the document to validate or
function correctly.



<!doctype html>
<html lang="en">
</html>

The Doctype HTML5

First, we have the Document Type Declaration, or doctype. This is simply a way to
tell the browser—or any other parsers—what type of document they’re looking at.
In the case of HTML files, it means the specific version and flavor of HTML. The
doctype should always be the first item at the top of all your HTML files. In the
past, the doctype declaration was an ugly and hard-to-remember mess.

HTML5
has done away with that indecipherable eyesore. Now all you need is this:

<!doctype html>

A Basic HTML5 Template

As you learn HTML5 and add new techniques to your toolbox, you’re likely going
to want to build yourself a blueprint, or boilerplate, from which you can begin all
your HTML5-based projects. In fact, you’ve probably already done something similar
for your existing XHTML or HTML 4.0 projects. We encourage this, and you
may also consider using one of the many online sources that provide a basic HTML5
starting point for you.
In this project, however, we want to build our code from scratch and explain each
piece as we go along. Of course, it would be impossible for even the most fantastical
and unwieldy sample site we could dream up to include every new element or
technique, so we’ll also explain some new features that don’t fit into the project.
This way, you’ll be familiar with a wide set of options when deciding how to build
your HTML5 and CSS3 websites and web apps, so you’ll be able to use this book
as a quick reference for a number of techniques.


<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="css/styles.css?v=1.0">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->
</head>
<body>
1

What is a cookie , explaing ?

Cookie is use to store the temporary data in browser memory, We can store data in cookies using setcookie('name','value','time');
we can use that rule for simple cookie, this value will store in the browser memory. If the browser is closed the cookie value will be deleted. Another way to store data in cookie file for long time:
persistent cookie using that way we can store data for long time in the user system.

How can we find the number of rows in a MySQL table?

By Mysql

SELECT COUNT(*) FROM table_name;

How to prevent hijacking in PHP?

 Make Error_reporting to E_ALL so that all variables will be intialized before using them.
 Make practice of using htmlentities(), strip_tags(), utf8_decode() and addslashes() for filtering malicious data in php
 Make practice of using mysql_escape_string() in mysql.

What is difference between mysql_fetch_array(),mysql_fetch_row() and mysql_fetch_object() ?

mysql_fetch_array():: fetches a result row as a associated array, numeric array

mysql_fetch_object: Fetaches a result row as object.

mysql_fetch_row::fetches a result row as array