Friday, 10 October 2014

html5 semantic structure with image

in this article , we like to show the how HTML5 semantic structure will be , check the below image




html5 semantic structure

Friday, 19 September 2014

Attribute in HTML?

An HTML attribute is a modifier of an HTML element. HTML attributes generally appear as name-value pairs, separated by "=", and are written within the start tag of an element, after the element's name
<input type="text" value="" />

in the above sample code, type and value are the attributes

Monday, 9 July 2012

How to include external js or css in HTML5

in HTML5 no need to define the Type of the Script
In Earlier version of HTML: 

< script type="text/javascript" src="~\script.js" />
In HTML 5 we have to follow below Manner

< script  src="~\script.js" />

Use of Character Sets in Meta tag


To display an HTML page correctly, the browser must know what character-set to use.
The character-set for the early world wide web was ASCII. ASCII supports the numbers from 0-9, the uppercase and lowercase English alphabet, and some special characters.

The Unicode Consortium

The Unicode Consortium develops the Unicode Standard. Their goal is to replace the existing character-sets with its standard Unicode Transformation Format (UTF).
The Unicode Standard has become a success and is implemented in XML, Java, ECMAScript (JavaScript), LDAP, CORBA 3.0, WML, etc. The Unicode standard is also supported in many operating systems and all modern browsers.
The Unicode Consortium cooperates with the leading standards development organizations, like ISO, W3C, and ECMA.
Unicode can be implemented by different character-sets. The most commonly used encodings are UTF-8 and UTF-16:
Character-setDescription
UTF-8A character in UTF8 can be from 1 to 4 bytes long. UTF-8 can represent any character in the Unicode standard. UTF-8 is backwards compatible with ASCII. UTF-8 is the preferred encoding for e-mail and web pages
UTF-1616-bit Unicode Transformation Format is a variable-length character encoding for Unicode, capable of encoding the entire Unicode repertoire. UTF-16 is used in major operating systems and environments, like Microsoft Windows 2000/XP/2003/Vista/CE and the Java and .NET byte code environments
Tip: The first 256 characters of Unicode character-sets correspond to the 256 characters of ISO-8859-1.
Tip: All HTML 4 processors already support UTF-8, and all XHTML and XML processors support UTF-8 and UTF-16!

HTML5 Meta tag changes

Use the http-equiv attribute to define the character set for an HTML document: 

  Basically below are the two changes in HTML5 Meta Tag section " 

1) Removed "http-equiv="Content-Type" content="text/html; " attribute if the http-equiv="Content-Type" attributes form the META charset tag . 

In Earlier version of HTML : charset meta tag is like given below 



In HTML5 the meta tag is changed in the below formate
< meta charset="utf-8" />

Difference between width=”100” and width=”100%”



width=100 means the width is 100pixels and width=100% means cover the full width it can exist



What is DOM in HTML


The Document Object Model (DOM) is an API for HTML and XML documents. It provides a structural representation of the document, enabling you to modify its content and visual presentation by using a scripting language such as JavaScript.

DOM - API for HTML. It represents a web page as a tree. In other words, DOM shows how to access HTML page

The HTML DOM defines a standard way for accessing and manipulating HTML documents.


"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The DOM is separated into 3 different parts / levels:
  • Core DOM - standard model for any structured document
  • XML DOM - standard model for XML documents
  • HTML DOM - standard model for HTML documents
The DOM defines the objects and properties of all document elements, and the methods (interface) to access them.



Next Interview Question