Showing posts with label HTML 5. Show all posts
Showing posts with label HTML 5. Show all posts

Saturday, 2 May 2015

HTML 5:Omitting of HEAD tag

Metadata is basically data about data.Metadata will not be displayed on the page.Metadata is used to specify page description, keywords etc.Metadata is used by Browsers,search engines and web services.


In HTML <meta> Tag provides metadata of the HTML document.<meta> tag always go inside the <head> element.

Inside the <head> element following tags defines metadata:-
 <title>, <style>, <meta>, <link>, <script>, and <base>

CODE




RESULT



In HTML 5 standard <head> tag can also be omitted.By default, browsers will add all elements before <body>, to a default <head> element.



Saturday, 17 January 2015

HTML URL

URL is Uniform Resource Locator , This Term is used as a Web Address.A Uniform Resource Locator (URL) is used to address a document (or other data) on the web.

SYNTAX FOR WEB ADDRESS

http://www.tech-e-learning.com/


scheme://host.domain:port/path/filename  


  • scheme - defines the type of Internet service (most common is http)
  • host - defines the domain host (default host for http is www)
  • domain - defines the Internet domain name (tech-e-learning.com)
  • port - defines the port number at the host (default for http is 80)
  • path - defines a path at the server (If omitted: the root directory of the site)
  • filename - defines the name of a document or resource 

URLs can only be sent over the Internet using the ASCII character-set.Since URLs often contain characters outside the ASCII set, the URL has to be converted into ASCII.

URL encoding converts characters into a format that can be transmitted over the Internet.

URL encoding replaces non ASCII characters with a "%" followed by hexadecimal digits.

URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign, or %20.

Monday, 22 December 2014

HTML HYPERLINK

  • HTML Links are used for the web, to open any web page we use HTML Links.Links allow users to click their way from page to page.
  • HTML Links are basically HYPERLINKS.
  • In , HTML we define link with <a>.
Syntax for HYPERLINKS  
<a href="url">link text</a> 

EXAMPLE
<a href="http://www.tech-e-learning.com/">Visit TECH-E-LEARNING</a>
RESULT 
 


Sunday, 14 December 2014

HTML FORMATTING|| ITALIC,EMPHASIZED,SMALL

HTML Formatting have different Types . in this tutorial we discuss about following types of formatting .
  1. ITALIC Formatting
  2. emphasized Formatting 
  3. small Formatting 

HTML ITALIC FORMATTING

HTML <i> element defines italic text, without any extra importance. 
the code for  italic formatting shown below.

CODE

<p>This text is normal.</p>

<p><i>This text is italic</i>.</p>
OUTPUT

HTML EMPHASIZED FORMATTING 
The HTML <em> element defines emphasized text, with added semantic importance. Code for  italic formatting shown below.
CODE
 
<p>This text is normal.</p>

<p><em>This text is emphasized</em>.</p>
OUTPUT

HTML SMALL FORMATTING 
 
The HTML <small> element defines small text.Code for  italic formatting shown below.
CODE
<h2>HTML <small>Small</small> Formatting</h2> 
OUTPUT


 

HTML FORMATTING

HTML Formatting were basically design to display the spacial type of text like BOLD Text , ITALIC Text ,MARKED Text etc.
we use the element like <b>, <i> to find the output like BOLD,Italic.

There are some formatting elements are designed as following :-

  • Bold text
  • Important text
  • Italic text
  • Emphasized text
  • Marked text
  • Small text
  • Deleted text
  • Inserted text
  • Subscripts
  • Superscripts

 

HTML BOLD FORMATTING 

In HTML Formatting , we use Bold Element as per shown below code. we use <b> in code to bold the text.

Code


<p>This text is normal.</p>

<p><b>This text is bold</b>.</p>
 

Output 

 

 

  

Saturday, 13 December 2014

HTML TEXT ALIGNMENT|| HTML STYLES

HTML style have various uses. We can change the text color ,Text Alignment , Text Size,font style by the use of this attribute.


HTML TEXT ALIGNMENT

In HTML,Text Alignment we can align text as per our need, We can align text e.g. center,left, right,justify.

Code  for Center Alignment  
<html>

<body>
  <h1 style="text-align:center">Centered Heading</h1>
  <p>This is a paragraph.</p>
</body>

</html> 

RESULT


TIP

The <center> tag, supported in older versions of HTML, is not valid in HTML5.

Code For Right Alignment

<html>

<body>
  <h1 style="text-align:right">Right Heading</h1>
  <p>This is a paragraph.</p>
</body>

</html>
  

Result 

 

You can use this code in your own editor.

Code For Left Alignment

<html>

<body>
  <h1 style="text-align:left">Left Heading</h1>
  <p>This is a paragraph.</p>
</body>

</html>

 

HTML STYLE|| HTML TEXT COLOR

HTML style have various uses. We can change the text color , font style by the use of this attribute. 



HTML TEXT COLOR

Text color basically defines the color of text used , let see it with example 



Code  


<html>
<body>

<h1 style="color:blue">This is a heading</h1>

<p style="color:red">This is a paragraph.</p>

</body>

</html>



we got the output like following :-



Wednesday, 10 December 2014

HTML STYLE|| STYLE ATTRIBUTE

In HTML Style is one of the important part of designing. HTML element have some default style , it shows background color , text size , ext color etc. 

These all elements are change by style attribute  

If we give input like following 





Then the result of above code is 







TIPS- bgcolor is replaced by background color in HTML  5. we can use bgcolor  in previous version of html .

Tuesday, 9 December 2014

HTML||Inline Elements

Inline Elements

Inline elements, on the other hand, can appear within sentence and do not have to appear on new lines of their own. The <b>, <i>, <u>, <em>, <strong>, <sup>, <sub>, <big>, <small>, <ins>, <del>, <code>, <cite>, <dfn>, <kbd> and <var> element are all inline elements.

HTML Code for Inline Element

<html>
<head></head>
<body>
<p>Say <b>Hello</b> 2 <strong>World Say </strong><i>Hello 2</i> <u>World Say Hello 2 World</u> Say Hello 2 World Say Hello 2 World </p>
</body>
</html>

Output

Say Hello 2 World Say Hello 2 World Say Hello 2 World Say Hello 2 World Say Hello 2 World 

Monday, 8 December 2014

HTML BLOCK ELEMENT

You have seen many of the elements that can be used to mark up text, it is important to make an observation about all the elements that live inside the <body> element, because each one can fall into one of two categories;
  • Block Level Element. 
  • Inline Element. 

Block Level Element

Block level elements appears on the screen as if they have a carriage return or line break before and after them. For example, the <p>, <h1>, <h2>,<h3>, <h4>, <h5>, <h6>, <ul>, <ol>, <dl>, <pre>, <hr/>, <blockquote>, and <address> elements are all block level elements. 

Inline Elements

Inline elements, on the other hand, can appear within sentence and do not have to appear on new lines of their own. The <b>, <i>, <u>, <em>, <strong>, <sup>, <sub>, <big>, <small>, <ins>, <del>, <code>, <cite>, <dfn>, <kbd> and <var> element are all inline elements. 

HTML Code for Block Level Element

<html>
<head></head>
<body>
<h1>Hello World</h1>
<p>Say Hello 2 World </p>
<h2>Hello World</h2>
<p>Say Hello 2 World </p>
</body>
</html>

Output

Hello World

Say Hello 2 World

Hello World

Say Hello 2 World

Wednesday, 23 July 2014

HTML TABLES

HTML TABLES

  • Tables are defined with the <table> tag.
  • A table is divided into rows with the <tr> tag. 
  • A row is divided into data cells with the <td> tag.
  • A row can also be divided into headings with the <th> tag. 
  • The <td> elements can contain all sorts of HTML elements like text, images, lists, other tables, etc.

Let we want to write  a HTML code for given table


ABCD15
PQRS10

So HTML Code for this table is


<table border="1" style="width: 300px;">
<tbody>
<tr>
<td>AB</td><td>CD</td>
<td>15</td></tr>
<tr>
<td>PQ</td><td>RS</td><td>10</td></tr>
</tbody>
</table>


NOTE


Here border and width will change according to the requirement & we can add more row on the table. 

Tuesday, 1 July 2014

New Elements in HTML5

HTML5 has  Introduced new elements for , displaying media content, for better page structure and better form handling, and several new APIs, drawing graphics such as drag and drop, get the geographical position of a user, store local data, and more.


The New <canvas> Element

<canvas>                  Defines graphic drawing using JavaScript

New Form Elements

<keygen>                Defines a key-pair generator field (for forms)
<datalist>               Defines pre-defined options for input controls
<output>                 Defines the result of a calculation

New Media Elements

 <audio>                 Defines sound or music content
<embed>                Defines containers for external applications (like plug-ins)
<source>                Defines sources for <video> and <audio>
<track>                  Defines tracks for <video> and <audio>
<video>                 Defines video or movie content


New Semantic/Structural Elements

<article>              Defines an article in the document
<aside> Defines content aside from the page content
<bdi> Defines a part of text that might be formatted in a different direction from other text outside it
<details> Defines additional details that the user can view or hide
<dialog> Defines a dialog box or window
<figcaption> Defines a caption for a <figure> element
<figure> Defines self-contained content, like illustrations, diagrams, photos, code listings, etc.
<footer> Defines a footer for the document or a section
<header> Defines a header for the document or a section
<main> Defines the main content of a document
<mark> Defines marked or highlighted text
<menuitem>  Defines a command/menu item that the user can invoke from a popup menu
<meter> Defines a scalar measurement within a known range (a gauge)
<nav> Defines navigation links in the document
<progress> Defines the progress of a task
<rp> Defines what to show in browsers that do not support ruby annotations
<rt> Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby> Defines a ruby annotation (for East Asian typography)
<section> Defines a section in the document
<summary> Defines a visible heading for a <details> element
<time> Defines a date/time
<wbr> Defines a possible line-break     

Monday, 30 June 2014

HTML 5 WHAT IS NEW CHECK IT OUT ?

HTML 5 comes in market with some new and supportive features .lets check which features are added in HTML 5


WHAT IS NEW ?  

  • New Element
  • New Attributes
  • Full CSS3 Support
  • Video & Audio
  • 2D/3D Graphics 
  • Local Storage
  • Local SQL Database
  • Web Application
 

WHAT IS HTML 5? 

  • HTML5 is the latest standard for HTML.HTML5 was designed to replace both HTML 4, XHTML, and the HTML DOM Level 2 .
  • It was specially designed to deliver rich content without the need for additional plugins. The current version delivers everything from animation to graphics, music to movies, and can also be used to build complicated web applications.

RULES TO USE HTML 5?

  • New features should be based on HTML, CSS, DOM, and JavaScript
  • The need for external plugins (like Flash) should be reduced
  • Error handling should be easier than in previous versions
  • Scripting has to be replaced by more markup
  • HTML5 should be device-independent
  • The development process should be visible to the public

INTERESTING FEATURES IN HTML 5? 

  • The <canvas> element for 2D drawing
  • The <video> and <audio> elements for media playback
  • Support for local storage
  • New content-specific elements, like <article>, <footer>, <header>, <nav>, <section>
  • New form controls, like calendar, date, time, email, url, search.

 

 


Wednesday, 18 June 2014

HTML TAGES

Tag Description
<!--...--> Defines a comment
<!DOCTYPE>  Defines the document type
<a> Defines a hyperlink
<abbr> Defines an abbreviation
<acronym> Not supported in HTML5. Use <abbr> instead.Defines an acronym
<address> Defines contact information for the author/owner of a document
<applet> Not supported in HTML5. Use <object> instead.Defines an embedded applet
<area> Defines an area inside an image-map
<article> Defines an article
<aside> Defines content aside from the page content
<audio> Defines sound content
<b> Defines bold text
<base> Specifies the base URL/target for all relative URLs in a document
<basefont> Not supported in HTML5. Use CSS instead.Specifies a default color, size, and font for all text in a document
<bdi> Isolates a part of text that might be formatted in a different direction from other text outside it
<bdo> Overrides the current text direction
<big> Not supported in HTML5. Use CSS instead.Defines big text
<blockquote> Defines a section that is quoted from another source
<body> Defines the document's body
<br> Defines a single line break
<button> Defines a clickable button
<canvas> Used to draw graphics, on the fly, via scripting (usually JavaScript)
<caption> Defines a table caption
<center> Not supported in HTML5. Use CSS instead.Defines centered text
<cite> Defines the title of a work
<code> Defines a piece of computer code
<col> Specifies column properties for each column within a <colgroup> element 
<colgroup> Specifies a group of one or more columns in a table for formatting
<datalist> Specifies a list of pre-defined options for input controls
<dd> Defines a description/value of a term in a description list
<del> Defines text that has been deleted from a document
<details> Defines additional details that the user can view or hide
<dfn> Defines a definition term
<dialog> Defines a dialog box or window
<dir> Not supported in HTML5. Use <ul> instead.Defines a directory list
<div> Defines a section in a document
<dl> Defines a description list
<dt> Defines a term/name in a description list
<em> Defines emphasized text 
<embed> Defines a container for an external (non-HTML) application
<fieldset> Groups related elements in a form
<figcaption> Defines a caption for a <figure> element
<figure> Specifies self-contained content
<font> Not supported in HTML5. Use CSS instead.Defines font, color, and size for text
<footer> Defines a footer for a document or section
<form> Defines an HTML form for user input
<frame> Not supported in HTML5.Defines a window (a frame) in a frameset
<frameset> Not supported in HTML5.Defines a set of frames
<h1> to <h6> Defines HTML headings
<head> Defines information about the document
<header> Defines a header for a document or section
<hr> Defines a thematic change in the content
<html> Defines the root of an HTML document
<i> Defines a part of text in an alternate voice or mood
<iframe> Defines an inline frame
<img> Defines an image
<input> Defines an input control
<ins> Defines a text that has been inserted into a document
<kbd> Defines keyboard input
<keygen> Defines a key-pair generator field (for forms)
<label> Defines a label for an <input> element
<legend> Defines a caption for a <fieldset> element
<li> Defines a list item
<link> Defines the relationship between a document and an external resource (most used to link to style sheets)
<main> Specifies the main content of a document
<map> Defines a client-side image-map
<mark> Defines marked/highlighted text
<menu> Defines a list/menu of commands
<menuitem> Defines a command/menu item that the user can invoke from a popup menu
<meta> Defines metadata about an HTML document
<meter> Defines a scalar measurement within a known range (a gauge)
<nav> Defines navigation links
<noframes> Not supported in HTML5.Defines an alternate content for users that do not support frames
<noscript> Defines an alternate content for users that do not support client-side scripts
<object> Defines an embedded object
<ol> Defines an ordered list
<optgroup> Defines a group of related options in a drop-down list
<option> Defines an option in a drop-down list
<output> Defines the result of a calculation
<p> Defines a paragraph
<param> Defines a parameter for an object
<pre> Defines preformatted text
<progress> Represents the progress of a task
<q> Defines a short quotation
<rp> Defines what to show in browsers that do not support ruby annotations
<rt> Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby> Defines a ruby annotation (for East Asian typography)
<s> Defines text that is no longer correct
<samp> Defines sample output from a computer program
<script> Defines a client-side script
<section> Defines a section in a document
<select> Defines a drop-down list
<small> Defines smaller text
<source> Defines multiple media resources for media elements (<video> and <audio>)
<span> Defines a section in a document
<strike> Not supported in HTML5. Use <del> instead.Defines strikethrough text
<strong> Defines important text
<style> Defines style information for a document
<sub> Defines subscripted text
<summary> Defines a visible heading for a <details> element
<sup> Defines superscripted text
<table> Defines a table
<tbody> Groups the body content in a table
<td> Defines a cell in a table
<textarea> Defines a multiline input control (text area)
<tfoot> Groups the footer content in a table
<th> Defines a header cell in a table
<thead> Groups the header content in a table
<time> Defines a date/time
<title> Defines a title for the document
<tr> Defines a row in a table
<track> Defines text tracks for media elements (<video> and <audio>)
<tt> Not supported in HTML5. Use CSS instead.Defines teletype text
<u> Defines text that should be stylistically different from normal text
<ul> Defines an unordered list
<var> Defines a variable
<video> Defines a video or movie
<wbr> Defines a possible line-break