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

How to Responsive web design

Mobile Websites & Responsive Web Design from Go-MobileMobile Websites, Convert your existing website into a mobile device friendly format for your visitors & customers in just a few minutes.http://go-mobile.com Responsive Web Design is a term coined by Ethan Marcotte that articulates how to adapt a website’s layout for multiple screen resolutions. Choose between responsive design or a native mobile app is difficult since both...

Html Email Links

An email link is just like a standard link, except that, instead of sending you to another page,  the link opens the associated email application so you can email the individual directly. Email links are especially useful for contact emails for individuals, staff members on a company site, and customer service and support feedback. Email links use the mailto: attribute along with the HRef attribute and the recipient's email address to accomplish this function .  The mailto: attribute to create an email link <a href="mailto:test@example.com">email...

W3C node types

Node type Numeric type value Description Element - Represents an element. Attribute - Represents an attribute. Text-3 Represents character data in an element or attribute....

HTML 4.01 and XHTML 1.0 and 1.1 standards

As defined in the HTML 4.01 and XHTML 1.0 and 1.1 standards, a <div> tag divides your document into separate, distinct sections. It may be used strictly as an organizational tool, without any sort of formatti...

Html Core Attributes

Prior to HTML 4.0, few attributes could be used consistently for all the HTML tags. HTML 4.0 changed this, defining a set of 16 core attributes that you can apply to almost all the elements in both HTML 4.01 and XHTML 1.0. For brevity, we list these core attributes   table that follow...

The svg element HTML5

The <svg> element allows the author to build a vector-based image directly in the page using the SVG markup language. <svg xmlns:xlink=”http://www.w3.org/1999/xlink” xmlns=”http://www.w3.org/2000/svg” viewBox=”0 0 200 100” width=”200px” height=”100px”> <circle cx=”50” cy=”50” r=”30” style=”stroke:#0000ff; stroke-width: 5px; fill:#ff0000;”/> <rect x = ”100” y = ”0” height = ”50” width = ”50” stroke-width = ”2px” stroke = ”#ffff00” fill = ”#00ff00” /> </svg&g...

The context object drawing functionality HTML5

arc(): The arc command draws an arc (portion of a circle) as part of apath. The arc is defined like a circle, with a center and radius, but also withbeginning and ending angles. If the angles describe a full circle (0 to 2 × piradians), the arc command will draw a full circle. See the preceding examplefor a custom circle function created from the arc command. beginPath(): This command begins the definition of a path. Normally apath is defined by a single moveTo command, followed by a series oflineTo commands, and finished by a stroke, closePath,...

The canvas tag HTML5

The <canvas> tag sets up a portion of the screen for program-controlled graphics. The HTML simply sets aside a portion of the screen to be used as a canvas. All the drawing and manipulation of the image is done through JavaScript code. The following HTML code sets up a canvas element and provides a button. <canvas id = “myCanvas” width = “300” height = “200”> This example requires HTML5 canvas support </canvas> <button type = “button” onclick = “draw()”> click me to see a drawing </button> (adsbygoogle = window.adsbygoogle...

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...

The details Element HTML5

This new element helps mark up a section of the document that’s hidden, but canbe expanded to reveal additional information. The aim of the element is to providenative 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 andsimplify its implementation for web authors. <details><summary>Some Magazines of Note</summary><ul><li><cite>Bird...

The head Element HTML5

The next part of our page is the <head> section. The first line inside the head is theone that defines the character encoding for the document. This is another elementthat’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 bareminimum:<meta charset="utf-8"> In nearly all cases, utf-8 is the value you’ll be using in your document...

The html Element HTML5

Next up in any HTML document is the html element, which has not changed significantlywith HTML5. In our example, we’ve included the lang attribute with avalue of en, which specifies that the document is in English. In XHTML-basedsyntax, you’d be required to include an xmlns attribute. In HTML5, this is no longerneeded, and even the lang attribute is unnecessary for the document to validate orfunction correctly. <!doctype html><html lang="en"></html&g...

The Doctype HTML5

First, we have the Document Type Declaration, or doctype. This is simply a way totell 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. Thedoctype should always be the first item at the top of all your HTML files. In thepast, the doctype declaration was an ugly and hard-to-remember mess. HTML5has done away with that indecipherable eyesore. Now all you need is this: <!doctype html&g...

A Basic HTML5 Template

As you learn HTML5 and add new techniques to your toolbox, you’re likely goingto want to build yourself a blueprint, or boilerplate, from which you can begin allyour HTML5-based projects. In fact, you’ve probably already done something similarfor your existing XHTML or HTML 4.0 projects. We encourage this, and youmay also consider using one of the many online sources that provide a basic HTML5starting point for you. In this project, however, we want to build our code from scratch and explain eachpiece as we go along. Of course, it would be impossible...

CSS and Canvas HTML5

As with most HTML elements, CSS can be applied to the canvas element itself to add borders, padding,margins, etc. Additionally, some CSS values are inherited by the contents of the canvas; fonts are a goodexample, as fonts drawn into a canvas default to the settings of the canvas element itself.Furthermore, properties set on the context used in canvas operations follow the syntax you mayalready be familiar with from CSS. Colors and fonts, for example, use the same notation on the contextthat they use throughout any HTML or CSS document.Browser...

Overview of HTML5 Canvas

When you use a canvas element in your web page, it creates a rectangular area on the page. By default,this rectangular area is 300 pixels wide and 150 pixels high, but you can specify the exact size and setother attributes for your canvas element.  A Basic Canvas Element<canvas></canvas>Once you have added a canvas element to your page, you can use JavaScript to manipulate it anyway you want. You can add graphics, lines, and text to it; you can draw on it; and you can even addadvanced animations to it.The Canvas API supports the...

Using the Selectors API HTML5

getElementById() -Returns the element with the specified id attribute value<div id="foo">getElementById("foo"); getElementsByName() -Returns all elements whose nameattribute has the specified value<input type="text" name="foo">getElementsByName("foo"); getElementsByTagName() Return all elements whose tag namematches the specified value<input type="text">getElementsByTagName("input"); With the new Selectors API, there are now more precise ways to specify which elements you wouldlike to retrieve without resorting to looping...

CSS File for the HTML5 Page

body {background-color:#CCCCCC;font-family:Geneva,Arial,Helvetica,sans-serif;margin: 0px auto;max-width:900px;border:solid;border-color:#FFFFFF;}header {background-color: #F47D31;display:block;color:#FFFFFF;text-align:center; 13}header h2 {margin: 0px;}h1 {font-size: 72px;margin: 0px;}h2 {font-size: 24px;margin: 0px;text-align:center;color: #F47D31;}h3 {font-size: 18px;margin: 0px;text-align:center;color: #F47D31;}h4 {color: #F47D31;background-color: #fff;-webkit-box-shadow: 2px 2px 20px #888;-webkit-transform: rotate(-45deg);-moz-box-shadow:...

Sectioning HTML5 Elements

header :-Header content (for a page or a section of the page) footer:- Footer content (for a page or a section of the page) section:- A section in a web page article:- Independent article content aside:- Related content or pull quotes nav:- Navigational aids All of these elements can be styled with CSS. In fact, as we described in the utility design principle earlier, HTML5 pushes the separation of content and presentation, so you have to style your page using CSS styles in HTML5. Listing 1-1 shows what an HTML5 page might look like. It uses...

HTML5 Content Types

Embedded:-Content that imports other resources into the document, for example audio, video,canvas, and iframe Flow:-Elements used in the body of documents and applications, for example form, h1, andsmall Heading :-Section headers, for example h1, h2, and hgroupInteractive:- Content that users interact with, for example audio or video controls, button, andtextarea Metadata:- Elements  commonly found in the head section— that set up the presentation orbehavior of the rest of the document, for example script, style, and title Phrasing:- Text...