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

Wednesday, 11 June 2014

How to Create Drop Down Menu in HTML CSS style

Post By: Hanan Mannan
Contact Number: Pak (+92)-321-59-95-634
-------------------------------------------------------

How to Create Drop Down Menu in HTML

we learn today “How to Create Drop Down Menu in HTML“. Navigation is the most important factor of any user friendly website.
We use navigation to navigate or access website different parts.It must be user friendly and easy to navigate in order to make user experience good.
It is very easy and simple.You just need to make a css file and unordered list of pages to do so.
here is the css for drop down menu.you can change it on your requirements.
<style type=text/css>#Menu,
#Menu ul {
    list-style: none;
}
#Menu {
    float: left;
}
#Menu > li {
    float: left;
}
#Menu li a {
display: block;
background: #CEE3F6;
    height: 2em;
    line-height: 2em;
    padding: 0 1.5em;
    text-decoration: none;
    
}
#Menu > li:hover > a {
    background: #f09d28;
    color: #000;}
#Menu ul {
    position: absolute;
    display: none;
    background: #f09d28
z-index: 999;
}
#Menu ul li a {
    width: 80px;
}
#Menu li:hover ul {
background: #ffc97c; 
   display: block;
}
</style>
Here is the pages list of navigation
<ul id=”Menu”>
<li><a href=”#”>Dashboard</a></li>
<li>
<a href=”#”>Pages</a>
<ul>
<li><a href=”#”>Create Page</a></li>
</ul>
</li>
<li>
<a href=”#”>Menu</a>
<ul>
<li><a href=”#”>Create Menu</a></li>
</ul>
</li>
<li><a href=”#”>Logout</a></li>
</ul>
It would be look like this
How to Create Drop Down Menu in HTML CSS style
How to Create Drop Down Menu in HTML [hmragroupengineers.blogspot.com]
 
How to Create Drop Down Menu in HTML CSS style
Drop Down Menu in css html hmragroupengineers.blogspot.com]
if you have any question regarding this article.feel free to comment on us.we will help you ASAP.

Posted By MIrza Abdul Hannan5:38:00 am

Wednesday, 28 May 2014

HTML Colors

Filled under:

Post By: Hanan Mannan
Contact Number: Pak (+92)-321-59-95-634
-------------------------------------------------------

HTML Colors


Colors are very important to give a good look and feel to your website. You can specify colors on page level using <body> tag or you can set colors for individual tags.
The <body> tag has following attributes which can be used to set different colors:
  • bgcolor: Sets a color for the background of the page.
  • text: Sets a color for the body text.
  • alink: Sets a color for active links or selected links.
  • link: Sets a color for linked text.
  • vlink: Sets a color for visited links - that is, for linked text that you have already clicked on.
NOTE: It is recommended to use CSS to set background or text colors.

HTML Color Coding Methods:

There are following three different methods to set colors in your web page:
  • Color names: You can specify color names directly like green, blue or red.
  • Hex codes: A six-digit code representing the amount of red, green, and blue that make up the color.
  • Color decimal or percentage values: : This value is specified using the rgb( ) property.
Now we will see these coloring schemes one by one.

HTML Colors - Color Names:

You can sepecify direct a color name to set text or background color. W3C has listed 16 basic color names that will validate with an HTML validator but there are over 200 different color names supported by Netscape and IE. Check a complete list of HTML Color Name.

W3C Standard 16 Colors:

Here is the list of W3C Standard 16 Colors names and it is recommended to use them.
BlackGraySilverWhite
YellowLimeAquaFuchsia
RedGreenBluePurple
MaroonOliveNavyTeal
To Become more comfortable - Do Online Practice

HTML Colors - Hex Codes:

A hexadecimal is a 6 digit representation of a color. The first two digits(RR) represent a red value, the next two are a green value(GG), and the last are the blue value(BB).
A hexadecimal value can be taken from any graphics software like Adobe Photoshop, Jasc Paintshop Pro or even using Advanced Paint Brush.
Each hexadecimal code will be preceded by a pound or hash sign #. Following are the examples to use Hexadecimal notation.
ColorColor HEX
#000000
#FF0000
#00FF00
#0000FF
#FFFF00
#00FFFF
#FF00FF
#C0C0C0
#FFFFFF
To Become more comfortable - Do Online Practice

HTML Colors - RGB Values:

This color value is specified using the rgb( ) property. This property takes three values, one each for red, green, and blue. The value can be an integer between 0 and 255 or a percentage.
NOTE: All the browsers does not support rgb() property of color so it is recommended not to use it.
Following is the example to show few colors using RGB values.
ColorColor RGB
rgb(0,0,0)
rgb(255,0,0)
rgb(0,255,0)
rgb(0,0,255)
rgb(255,255,0)
rgb(0,255,255)
rgb(255,0,255)
rgb(192,192,192)
rgb(255,255,255)
Building Color Codes:
You can build millions of color codes using our Color Code Builder. Check our HTML Color Code Builder. To use this tool you would need a Java Enabled Browser.

Browser Safe Colors:

Here is the list of 216 colors which are supposed to be most safe and computer independent colors. These colors very from hexa code 000000 to FFFFFF. These color are safe to use because they ensure that all computers would display the colors correctly when running a 256 color palette:
0000000000330000660000990000CC0000FF
0033000033330033660033990033CC0033FF
0066000066330066660066990066CC0066FF
0099000099330099660099990099CC0099FF
00CC0000CC3300CC6600CC9900CCCC00CCFF
00FF0000FF3300FF6600FF9900FFCC00FFFF
3300003300333300663300993300CC3300FF
3333003333333333663333993333CC3333FF
3366003366333366663366993366CC3366FF
3399003399333399663399993399CC3399FF
33CC0033CC3333CC6633CC9933CCCC33CCFF
33FF0033FF3333FF6633FF9933FFCC33FFFF
6600006600336600666600996600CC6600FF
6633006633336633666633996633CC6633FF
6666006666336666666666996666CC6666FF
6699006699336699666699996699CC6699FF
66CC0066CC3366CC6666CC9966CCCC66CCFF
66FF0066FF3366FF6666FF9966FFCC66FFFF
9900009900339900669900999900CC9900FF
9933009933339933669933999933CC9933FF
9966009966339966669966999966CC9966FF
9999009999339999669999999999CC9999FF
99CC0099CC3399CC6699CC9999CCCC99CCFF
99FF0099FF3399FF6699FF9999FFCC99FFFF
CC0000CC0033CC0066CC0099CC00CCCC00FF
CC3300CC3333CC3366CC3399CC33CCCC33FF
CC6600CC6633CC6666CC6699CC66CCCC66FF
CC9900CC9933CC9966CC9999CC99CCCC99FF
CCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF
CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFF
FF0000FF0033FF0066FF0099FF00CCFF00FF
FF3300FF3333FF3366FF3399FF33CCFF33FF
FF6600FF6633FF6666FF6699FF66CCFF66FF
FF9900FF9933FF9966FF9999FF99CCFF99FF
FFCC00FFCC33FFCC66FFCC99FFCCCCFFCCFF
FFFF00FFFF33FFFF66FFFF99FFFFCCFFFFFF

Posted By MIrza Abdul Hannan4:57:00 am

HTML Quick Reference Guide

Filled under:

Post By: Hanan Mannan
Contact Number: Pak (+92)-321-59-95-634
-------------------------------------------------------
HTML Quick Reference Guide

This page is having a quick review of all the HTML tags discussed in this tutorial. If you need to know in detail about any tag then refer to HTML Tag List chapter.

HTML Basic Syntax:

  • HTML Element names and attribute names are not case sensitive.
  • HTML Documents start with a <!doctype...> statement, followed by a header and a text body all enclosed in <html>...</html>.
  • HTML Header is enclosed in <head>....</head> tags.
  • HTML Body is enclosed in <body>....</body> tags.
  • HTML Comments are written as <!-- A comment -->.

HTML Basic Document:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4.0//EN">
<html>
<head>
<title>Document Title like HTML Tutorial</title>
</head>

<body>
   Document Text with other tags will come here.
</body>

</html>

Header elements:

  • <head> - Opening tag for the head of the document. The following optional tags can be placed inside the head.
  • <title>...</title> -Document title (not part of the text), recommended maximum length 64 characters.
  • <link ...> - Relationships for the document as a whole: common attributes are rel, rev, href.
  • <base href="url"> - Specifies the base URL of the document. This is used when dereferencing relative URLs in the page.
  • <base href="url" target="..."> - Specifies the base URL of the document. This is used when dereferencing relative URLs in the page. Also specifies the base target frame that all links will default to.
  • <meta ...> - Embed meta-information as if given by the server: attributes http-equiv, name, content.
    <meta http-equiv="refresh" content="N" > - Same page will be reloaded automatically after N seconds.
    <meta http-equiv="refresh" content="N" url="http://www.example.com> - Same other page will refresh automatically after N seconds.
    <meta http-equiv="expires" content="Wed, 08 Aug 2007 01:21:00 GMT" > - Specifies an expiration date for the page so that it will be reloaded after a certain date.
    <meta http-equiv="keywords" content="keyword1, keyword2,..." > - Specifies various keywords available on the page and to be used by the search engine.
    <meta http-equiv="description" content="A short description of the site" > - Specifies small description of the page and to be used by the search engine.
  • <style type="text/css" href="URL" /> - Specifies a CSS file to be used for the web page.
  • <script type="text/scripttype" href="URL" /> - Specifies a Javascript of VBscript file to be used for the web page.
  • <noscript> ... </noscript> - Encloses anything you want displayed by browsers that do not support inline scripts. This goes inside the <script> tags.
  • </head> - Closing tag for the head of the document.

Body Elements:

  • <body>...</body> - Encloses the main body of the document.
  • <hn>...</hn> - Makes the enclosed text a heading of various sizes where n is any number ranging from 1 to 6, and 1 creates the biggest heading while 6 creates the smallest.
  • <basefont size="n"> - Sets the default font properties for the entire page.
  • <isindex attributes> - Displays a text box indicating the presence of a searchable index. Simply adding this tag will not create a searchable page. The server must be set up to support it.
  • <img src="URL" attributes> - Places an inline image into the document.
  • <map attributes>...</map> - Specifies a collection of hot spots that define a client-side image map. The <area> tag can be used inside to define the hot spots.
  • <area attributes>...</area> - Specifies the shape and size of a hot spot to be used in the definition of a client-side image map. Used inside the <map> tag.
  • <marquee attributes>...</marquee> - Places a scrolling text marquee into the document.
  • <applet attributes>...</applet> - Inserts a Java applet in the HTML document. Any text placed between the opening and closing <applet> tags will be displayed by browsers that do not support JAVA.
  • <embed attributes>...</embed> - Inserts an embedded multimedia object, such as a sound file or video, into the page.
  • <a href="...">...</a> - When used with the HREF attribute, the enclosed text and/or graphic becomes a link to another document or anchor. When used with the NAME attribute, the enclosed text and/or graphic becomes an anchor.
  • <ol attributes>...</ol> - Puts the enclosed items marked with <li>, in a numbered list.
  • <ul attributes>...</ul> - Puts the enclosed items marked with <li>, in a bulleted list.
  • <dl>...</dl> - Creates a definition list. Within this container, <dt> specifies a definition term and <dd> specifies the definition.

Frame Elements:

  • <frameset attributes>...</frameset> - Defines a set of frames that will make up the page. The <frame>, and <noframes> tags go inside this. The <frameset> tag is used instead of the <body> tag. You can, however, include a <body> tag inside the <noframes> tags for browsers that do not support frames.
  • <frame attributes /> - Defines a single frame within a frameset.
  • <iframe attributes>...</iframe> - Defines a floating frame. Does not need to be placed within a frameset.
  • <noframes>...</noframes> - Placed inside the <frameset>, anything between the beginning and ending of this tag is viewable only by browsers that do not support frames. This tag is used to create pages that are compatible with older browsers that do not support frames.

Table Elements:

  • <table attributes>...</table> -Creates a table that can include any number of rows.
  • <caption attributes>...</caption> -Specifies the caption of the table.
  • <tr attributes>...</tr> - Specifies a table row. It can enclose the table heading and table data.
  • <th attributes>...</th> - Specifies a table heading.
  • <td attributes>...</td> - Specifies a table data cell.
  • <colgroup attributes /> - Specifies the properties of one or more columns. This tag generally goes right after the opening <table> tag.
  • <col attributes /> - Used with the <colgroup> tag, this specifies the properties of one column. This tag overrides any attributes specified in the <colgroup> tag that comes right before it.
  • <tbody>...</tbody> - Encloses the body of your table. This tag is optional unless you are using the <thead> or <tfoot> tags. It used to separate the rows in the table from those in the header or footer.
  • <tfoot>...</tfoot> - Encloses the table rows that are to be used as a footer. It is an optional tag and comes right after the ending <tbody> element.
  • <thead>...</thead> - Encloses the table rows that are to be used as a header. It is an optional tag and comes before the opening <tbody> element.

Form Elements:

  • <from attributes>...</from> - Specifies a form. Forms can be used to send user input to the server in the form of NAME/VALUE pairs.
  • <input attributes /> - Specifies a control or input area for a form, from which a NAME/VALUE pair will be returned to the server. It could be Checkbox, Raidobox, password, text, reset, submit, hidden and image.
  • <select attributes>...</select> - Creates a drop-down list of items. The list items are defined by the <option> tags placed inside the opening and closing <select> tag.
  • <option value="..." /> - Specifies an item in the drop down list. Placed within the opening and closing <select> tags. Any text following the <option> tag is what the user will see in the list.
  • <textarea attributes>...</textarea> - Creates a multi-lined text entry box. Any text placed in between the tags is used as the default text string that is displayed when the page is loaded.
  • <button attributes>...</button> - allows you to have push buttons on forms that more closely resemble push buttons available in Windows and other applications.

Text Formatting Elements:

  • <address>.....< /address> - Encloses the signature file of the author of the page. Text is displayed in italics.
  • <acronym>.....< /acronym> - indicates an acronym in the text.
  • <b>...< /b> - Boldfaces the enclosed text.
  • <big>...< /big> - Makes the enclosed text one size larger.
  • <blink>.....< /blink> - Makes the enclosed text blink continually.
  • <blockquote>.....< /blockquote> - Encloses a long quote. Both the left and right margins are indented.
  • <br> - Inserts a line break.
  • <center>.....< /center> - Centers the enclosed elements.
  • <cite>.....< /cite> - Encloses a citation such as the title of a book or paper.
  • <code>.....< /code> - Encloses a sample of code. The text is rendered in small font.
  • <comment>.....< /comment> - Encloses a comment. Text inside the tags is ignored unless it contains HTML code.
  • <del>.....< /del> - To mark the document text that has been deleted since a previous version.
  • <dfn>.....< /dfn> - Encloses a definition. Text inside the tags is formatted to look like a definition.
  • <div>...< /div> - Specifies the alignment of the enclosed elements. Can be used to divide a document into sections that are aligned differently.
  • <em>...< /em> - Emphasis on the enclosed text (Italics).
  • <font attributes>...< /font> - Sets the font properties for the enclosed text.
  • <fieldset attributes>...< /fieldset> - Allows you can group related form fields, making your form easier to read and use.
  • <hr attributes /> - Inserts a horizontal line.
  • <i>...< /i> - The enclosed text is italics.
  • <ins>...< /ins> - To mark parts of a document that have been added since the document's last version.
  • <label>...< /label> - Allows you to lable a tag.
  • <kbd>...< /kbd> - Specifies text to be entered at the keyboard. Text is rendered as bold and fixed-width.
  • <p attributes>...< /p> - Designates the enclosed text as a plain paragraph.
  • <q>...</q> - acts much the same as the <blockquote> tag, but applies to shorter quoted sections, ones that don't need paragraph breaks.
  • <pre>.....< /pre> - Displays text in fixed-width type without collapsing spaces.
  • <s>.....< /s> - Displays text with a line through it. The <strike> tag does exactly the same.
  • <samp>...< /samp> - Indicates sample output from a form or program. Text is rendered in small font.
  • <small>...< /small> - Makes the enclosed text one size smaller.
  • <spacer attributes>...< /spacer> - Inserts blocks of spaces into HTML documents.
  • <strong>...< /strong> - Stronger emphasis on the enclosed text.
  • <sub>...< /sub> - Renders the enclosed text in subscript.
  • <sup>...< /sup> - Renders the enclosed text in superscript.
  • <tt>...< /tt> - The enclosed text is typewriter font.
  • <u>...< /u> - The enclosed text in underlined.
  • <var>...< /var> - Specifies a variable. Text is rendered in small fixed-width type.
  • <wbr> - Causes text enclosed by the NOBR tags to wrap only if necessary.

Posted By MIrza Abdul Hannan4:43:00 am

Tuesday, 27 May 2014

HTML/XHTML Deprecated Tags and Attributes

Post By: Hanan Mannan
Contact Number: Pak (+92)-321-59-95-634
-------------------------------------------------------

HTML/XHTML Deprecated Tags and Attributes


A complete list of deprecated tags and attributes are given here. All the tags are ordered alphabetically.
An equivalent tag or alternate CSS option is given:
TagDescriptionAlternate
<applet>Deprecated. Specifies an applet<object>
<basefont>Deprecated. Specifies a base font 
<center>Deprecated. Specifies centered texttext-align
<dir>Deprecated. Specifies a directory list 
<embed>Deprecated. Embeds an application in a document<object>
<font>Deprecated. Specifies text font, size, and colorfont-family, font-size
<isindex>Deprecated. Specifies a single-line input field 
<listing>Deprecated. Specifies listing of items<pre>
<menu>Deprecated. Specifies a menu list 
<plaintext>Deprecated. Specifies plaintext<pre>
<s>Deprecated. Specifies strikethrough texttext-decoration
<strike>Deprecated. Specifies strikethrough texttext-decoration
<u>Deprecated. Specifies underlined texttext-decoration
<xmp>Deprecated. Specifies preformatted text<pre>

HTML Decprecated Attributes:

Following is the list of deprecated attributes and alternate CSS options available.
TagDescriptionAlternate
alignSpecifies positioning of an elementtext-align , float & vertical-align
alinkSpecify the color of an active link or selected linkactive
backgroundSpecifies background imagebackground-image
bgcolorSpecifies background colorbackground-color
borderSpecifies a border width of any elementborder-width
clearIndicates how the browser should display the line after the <br /> elementclear
heightSpecifies height of body and other elementsheight
hspaceSpecifies the amount of whitespace or padding that should appear left or right an elementpadding
languageSpecifies scripting language being usedtype
linkSpecifies the default color of all links in the documentlink
nowrapPrevents the text from wrapping within that table cellwhite-space
startIndicate at what number a browser should start numbering a listcounter-reset
textSpecifies color of body textcolor
typeSpecifies the type of list in <li> taglist-style-type
vlinkSpecify the color of visited linksvisited
vspaceSpecifies the amount of whitespace or padding that should appear above or below an elementpadding
widthSpecifies width of body and other elementswidth

Posted By MIrza Abdul Hannan11:08:00 pm