Defining Relative Path Using html ‘base’ tag

October 1st, 2012 by Laeeq | No comments

Sometimes you need to define relative path in a html page.  HTML provides <base> tag for defining relative urls in a html page. The href attribute of  <base> tag specifies the base URL for all relative URLs in the page. There can be at maximum one <base> element in a document, and it must be inside the <head> element. There is no difference between HTML 4.01 and HTML5. See  the running example of html <base> tag.

Read Full Post »

HTML5

HTML5 download Attribute

September 24th, 2012 by Laeeq | No comments

As we had discussed many useful html5  elements and attributes like canvas, placeholders, figure, slider, headeraudio etc.

Recently, I have find extremely useful html5 attribute. it’s a html5 download attribute that’s very simple to use. The download attribute allows you to set a separate file name for download using anchor tag. you just need to pass download attribute with this anchor tag to open download dialog box.

Read Full Post »

HTML5

HTML5 New hidden Attribute

September 22nd, 2012 by Laeeq | No comments

HTML5 has provide us with useful and magical HTML attribute: placeholder and many more.

There is another new attribute introduces by HTML5, that’s hidden atribute. This atribute functions just like CSS “display:none;”. According to HTML5 specification, any element which has the hidden attribute should be considered irrelevant and thus should not be rendered by the browser. It’s simply like this:

Read Full Post »

HTML5

HTML5 Canvas Element

August 30th, 2012 by Laeeq | No comments

<canvas> is a HTML5 element which is used to draw graphics using scripting. This element can be used to draw graphs, make photo compositions or do simple animations.

This tutorial describes how to implement the <canvas> element in your HTML pages. The examples provided should give you some clear ideas what you can do with <canvas> and can be used to start building your own implementations.

The markup for the canvas element will be like this:

<canvas id=”myCanvas” width=”480″ height=”90″ style=”border:1px solid #000000;”></canvas>

Like <img> element, canvas has a width and height set in the markup to give it an actual size. And because canvas requires scripting for its full capabilities, I’ve added an id attribute that will allow us to target it using either JavaScript or a JavaScript web development library like jQuery or MooTools.

Read Full Post »

HTML5

Popular Free HTML5 and CSS Templates

July 11th, 2012 by Laeeq | 3 comments

With the popularity of HTML5 and CSS3, HTML5 templates also getting very popular these days because all professional HTML5 templates are compatible to all browsers with its functionality and features, and with the release of HTML5 / CSS3 it has become even more popular among designers because of the additional and great features. These templates offer qick and easy solution for building modern websites. Here in this post we are presenting popular professional HTML5 and CSS3 templates that are free to download.

VividPhoto

Vivid Photo is a modern and elegant Photography Website Template. It is cross browser compatible and created to suit needs of photographers. The template is made using HTML5, jQuery and CSS3 with no external fonts, HTML5 Contact Form and a lot more stuff for various functionalities. You are free to use it for your personal as well as commercial projects. It is released under New BSD License.

Read Full Post »

CSS, HTML5

Web forms with new HTML5 features

June 21st, 2012 by Laeeq | No comments

HTML5 presents many new features that makes your web forms more functional. Here we will discuss few exciting HTML5 features that definitly improve your forms and also make them more functional and user friendly.

Required fields:

Whenever we deisgn a web form, there is always one or more mandatory fields and we have to impliment functions for that. but HTML5 introduces a “required” attribute to make input field as required:

  1. <input type=“text” name=“emp_name” required>

As you can see above that it will save you a lot of time.

There are two similar attributes are also available: optional and invalid. They work exactly as the required attribute explained above.

Read Full Post »

HTML5

HTML5 placeholder Attribute

May 28th, 2012 by Laeeq | 4 comments

HTML5 has introduced many interesting and usefull features like semantic tags , javascipt API’s form, Audio, video and many more. among them one of my favorites is the placeholder attribute to INPUT elements. The placeholder attribute shows text in a field until the field is focused upon, then hides the text.

As we had created placeholders for textboxes using javascript but it had a many probelm. actually when we set the value attribute initially, but, as soon as the user deletes that text and clicks away, the input will be left blank again. The HTML5 placeholder attribute has solved this issues.

HTML5 placeholder code:
  1. <input type=“text” name=“employee_first_name” placeholder=“Employee first name…”>  

Read Full Post »

HTML5

HTML5 – The figure & figcaption elements

May 26th, 2012 by Laeeq | 2 comments

HTML5 introduces many interesting elements like audio, video, Canvas, Drag and Drop, SVG, figure, figcaption etc. Here in this article we we’ll discuss figure and figcaption elements. Actually the <figure> element is used in conjunction with <figcaption> element to mark up photos, diagrams etc.

The <figure> element:

As above mentioned, The <figure> element is used with the element to mark up photos, diagrams etc.

An image within a <figure> element without a caption:

blue footed boobie bird

 

Read Full Post »

HTML5

New HTML5 Doctype

May 26th, 2012 by Laeeq | 1 comment

Here we’ll discuss the New HTML5 Doctype. because If you are still using traditional complex, hard to memorize XHTML doctype. it is right time to switch to simple HTML5 Doctype.

Traditional HTML Doctype Syntax
  1. <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
  2. “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

Read Full Post »

HTML5

Simple Slider with HTML5 Range Input Type

May 26th, 2012 by Laeeq | 1 comment

Unlike HTML, HTML5 intoduces a new range type of Input. The range type is used for input fields that have values from a range of numbers. So here in this post we will learn how to create smooth slider using HTML5 Range Input type.

  1. <input type=“range”>

There are attributes like max, min, step and value by which we can set restrictions on what numbers are accepted.

So from here we will proceed to the real example of HTML5 Range Input by creating a simple Slider step by step.

Read Full Post »

HTML5