Current Android Release version:
Version Code: Pie
Version: 9
API level: 28

Showing posts with label HTML5. Show all posts
Showing posts with label HTML5. Show all posts

How to install Sencha Touch?

Sencha Touch enables you to quickly and easily create HTML5 based mobile apps that work on Android, iOS, and Blackberry devices, and produce a native-app-like experience inside a browser or in a hybrid shell.

Sencha Touch 2.1 is the latest version of the market leading mobile app framework.

First, you need to download the free Sencha Touch SDK and Sencha Cmd from the Sencha website. 
You will also need the following:

  • A web server running locally on your computer
  • A modern web browser; Chrome and Safari are recommended

Download Sencha Touch using below link:

Download apache server using below link:



  • Set Java path C:\java\jdk1.6.0_14 (JAVA_HOME)
  • Install Sencha Cmd in C: drive.
  • install Apache server in C: drive
            C:\apache-tomcat-7.0.35
  • Extract Sench SDK in below path
            C:\apache-tomcat-7.0.35\webapps
  • After that run apache server (C:\apache-tomcat-7.0.35\bin)
after that just verify using below link

How to add video and audio in HTML5?

Like below we can add video in html5

<video width="320" height="240" controls="controls">
     <source src="pcds.mp4" type="video/mp4" />
     <source src="pcds.ogg" type="video/ogg" />
</video>

And audio like this 
<audio controls="controls">

     <source src="song.ogg" type="audio/ogg" />
     <source src="song.mp3"  type="audio/mpeg" />
</audio>


What the use of Canvas Element in HTML5?


The canvas element is used to  draw graphics images on a web page by using javascript like below

<canvas id="pcdsCanvas" width="500" height="400">
</canvas> 
<script type="text/javascript">
           var pcdsCanvas=document.getElementById("pcdsCanvas");
           var pcdsText=pcdsCanvas.getContext("2d");
           pcdsText.fillStyle="#82345c";
           pcdsText.fillRect(0,0,150,75);
</script>

What is the use of localStorage in HTML5 ?


Before HTML5 LocalStores was done with cookies. Cookies are not very good for large amounts of data, because they are passed on by every request to  the server, so it was very slow and in-effective. 

In HTML5, the data is NOT passed on by every server request, but used ONLY when asked for. It is possible to  store large amounts of data without affecting the website's performance.and The data is stored in different areas for different websites, and a website can only access data stored by itself.

And for creating localstores just need to  call localStorage object like below we are storing name and address

<script type="text/javascript">
         localStorage.name="PCDS";
         document.write(localStorage.name);
</script> 
<script type="text/javascript">
         localStorage.address="Mumbai India..";
         document.write(localStorage.address);
</script>

What are the New Media Elements in HTML5? is canvas element used in HTML5?


Below are the New Media Elements have added in HTML5

<audio> For multimedia content, sounds, music or other audio streams.
<video> For video content, such as a movie clip or other video streams.
<source> For media resources for media elements, defined inside video or
              audio elements.
<embed> For embedded content, such as a plug-in.
<track> For text tracks used in media players.

yes we can use Canvas element in html5  like below 
<canvas>

How many New Markup Elements you know in HTML5?


Below are the New Markup Elements added in HTML5:

<article>  
Specifies independent, self-contained content,could be a news article, blog post, forum post, or other articles which can be distributed independently from the rest of the site.

<aside>   
For content aside from the content it is placed in. The aside content should be related to the surrounding content.

<bdi>      
For text that should not be bound to the text-direction of its parent elements.

<command> 
A button, or a radio button, or a check box.

<details> 
For describing details about a document, or parts of a document.

<summary> 
A caption, or summary, inside the details element.

<figure> 
For grouping a section of stand-alone content, could be a video.

<figcaption>
The caption of the figure section.

<footer>
For a footer of a document or section, could include the name of the author, the date of the document, contact information, or copyright information.

<header>
For an introduction of a document or section, could include navigation.

<hgroup>
For a section of headings, using <h1> to <h6>, where the largest is the main heading of the section, and the others are sub-headings.

<mark> 
For text that should be highlighted.

<meter>
For a measurement, used only if the maximum and minimum values are known.

<nav> 
For a section of navigation.

<progress> 
The state of a work in progress.

<ruby> 
For ruby annotation (Chinese notes or characters).

<rt> 
For explanation of the ruby annotation.

<rp> 
What to show browsers that do not support the ruby element.

<section>
For a section in a document. Such as chapters, headers, footers, or any other sections of the document.

<time> 
For defining a time or a date, or both.

<wbr> 
Word break. For defining a line-break opportunity.

How do you play a video using HTML5?

We can display video using the <video> tag as shown below:

<video width="320" height="240" controls="controls"> 
          <source src="test2.mp4" type="video/mp4" /> 
</video>

What is the ? Is it necessary to use in HTML5 ?

The <!DOCTYPE> is an instruction to  the web browser about what version of HTML the page is written in. AND The <!DOCTYPE> tag does not have an end tag and It is not case sensitive.

The <!DOCTYPE> declaration must be the very first thing in HTML5 document, before the <html>  tag. As In HTML 4.01,all <! DOCTYPE >  declarations require a reference to  a Document Type Definition (DTD), because HTML 4.01 was based on Standard Generalized Markup Language (SGML). WHERE AS HTML5 is not based on SGML, and therefore does not require a reference to  a Document Type Definition (DTD).

Give an example of new elements in HTML5 to support multimedia?

HTML5 introduced many elements such as <audio>, <video> instead of <object> to support multimedia

What is the difference between HTML and HTML5 ?

HTML5 is upgraded version of HTML where in HTML5 Lot of new future like Video, Audio/mp3, date select function,placeholder,Canvas,2D/3D Graphics, Local SQL Database added so that no need to  do external plugin like Flash player or other library.

HTML 5

HTML 5 is the latest version of Hypertext Markup Language for creating web pages. It is the fifth revision of the HTML standard.

HTML5 provides developers with tools such as Offline Web Storage, GeoLocation API, Canvas Drawing, CSS3, and many more.



HTML5 applications run on Tizen, Firefox OS and WebOS without a browser.

Why HTML5?

  • New HTML Standard
  • New Elements
  • New Attributes
  • Full CSS3 Support
  • Video and Audio
  • 2D/3D Graphics
  • Local Storage
  • Local SQL Database
Rules:
  • New features should be based on HTML,CSS,DOM and JavaScript
  • Reduce the need for external plugins(like Flash)
  • Better Error handling
  • More markup to replace scripting
  • HTML5 should be device independent
New Features:
  • Canvas element for drawing
  • video and audio elements for media playback
  • Better support for local offline storage
  • New content Specific elements like article,footer,header,nav,section
  • New form controls like calendar,date,time,email,url,search
New Markup Elements:


New Media Elements:

New Canvas elements:

New Form elements:

New Input Elements: