let's use some tables in our html webpage.......In this video you can learn that how to use table element in html webpages....
Saturday, April 5, 2014
tables in html webpages
let's use some tables in our html webpage.......In this video you can learn that how to use table element in html webpages....
how to enter in admin system without knowing password?
Software Used - Prorat v1.9
**Always use prorat on a virtual machine.
***Never download prorat form the internet.
1. Open/Create your virutal machine.
2. Open Prorat.
3. Click on create.
4. Click on create prorat server 243 kbyat.
5. Uncheck all the options.
6. Check only the "mail option" enter your email id (Commercial emails like gmail, yahoo, rediff mail won't work)
7. Go to "General Settings" enter desired password and victim name .
8. Click on "bind with file".
9. Select the "desired file".
10. Click on "ok".
11. Select the server icon.
12. Click on create.
13. Go to the prorat folder look for the file named "binded_server" rename it and compress it.
14. Send that file to your target.
15. Check your e-mail for his ip and port address.
16. Enter them into prorat and click connect.
17. Enter the password.
18. If connected.
19. It's Hacked.
***use your coded virus to bind with server for better results.
callwithus.com - for fake voice calling
**Always use prorat on a virtual machine.
***Never download prorat form the internet.
1. Open/Create your virutal machine.
2. Open Prorat.
3. Click on create.
4. Click on create prorat server 243 kbyat.
5. Uncheck all the options.
6. Check only the "mail option" enter your email id (Commercial emails like gmail, yahoo, rediff mail won't work)
7. Go to "General Settings" enter desired password and victim name .
8. Click on "bind with file".
9. Select the "desired file".
10. Click on "ok".
11. Select the server icon.
12. Click on create.
13. Go to the prorat folder look for the file named "binded_server" rename it and compress it.
14. Send that file to your target.
15. Check your e-mail for his ip and port address.
16. Enter them into prorat and click connect.
17. Enter the password.
18. If connected.
19. It's Hacked.
***use your coded virus to bind with server for better results.
callwithus.com - for fake voice calling
List element in html
Learn how to use list element in html pages. This video has contain hands-on tutorial video that step by step to use list element in html webpages.
Wednesday, January 22, 2014
CSS Part 7
Set the text cases:
Following is the example which demonstrates how to set the cases for a text. Possible values are none, capitalize, uppercase, lowercase..<p style="text-transform:capitalize;"> This will be capitalized </p>
<p style="text-transform:uppercase;"> This will be in uppercase </p>
<p style="text-transform:lowercase;"> This will be in lowercase </p>
This will produce following result:
This will be capitalized
This will be in uppercase
This will be in lowercase
Set the white space between text:
Following is the example which demonstrates how white space inside an element is handled. Possible values are normal, pre, nowrap.<p style="white-space:pre;">This text has a line break and the white-space pre setting tells the browser to honor it just like the HTML pre tag.</p>
This will produce following result:
This text has a line break
and the white-space pre setting tells the browser to honor it
just like the HTML pre tag.
Set the text shadow:
Following is the example which demonstrates how to set the shadow around a text. This may not be supported by all the browsers.<p style="text-shadow:4px 4px 8px blue;"> If your browser supports the CSS text-shadow property, this text will have a blue shadow.</p>
This will produce following result:
If your browser supports the CSS text-shadow property, this text will have a blue shadow.
CSS – Images
Images are very important part of any Web Page. Though it is not recommended to include lot of images but it is still important to use good images wherever it is required.
CSS plays a good role to control image display. You can set following image properties using CSS.
- The border property is used to set the width of an image border.
- The height property is used to set the height of an image.
- The width property is used to set the width of an image.
- The -moz-opacity property is used to set the opacity of an image.
The image border Property:
The border property of an image is used to set the width of an image border. This property can have a value in length or in %.A width of zero pixels means no border.
Here is the example:
<img style="border:0px;" src="/images/css.gif" /> <br /> <img style="border:3px dashed red;" src="/images/css.gif" />
This will produce following result:
The image height Property:
The height property of an image is used to set the height of an image. This property can have a value in length or in %. While giving value in %, it applies it in respect of the box in which an image is available.Here is the example:
<img style="border:1px solid red; height:100px;" src="/images/css.gif" /> <br /> <img style="border:1px solid red; height:50%;" src="/images/css.gif" />
This will produce following result:
The image width Property:
The width property of an image is used to set the width of an image. This property can have a value in length or in %. While giving value in %, it applies it in respect of the box in which an image is available.Here is the example:
<img style="border:1px solid red; width:50px;" src="/images/css.gif" /> <br /> <img style="border:1px solid red; width:30%;" src="/images/css.gif" />
This will produce following result:
The -moz-opacity Property:
The -moz-opacity property of an image is used to set the opacity of an image. This property is used to create a transparent image in Mozilla. IE uses filter:alpha(opacity=x) to create transparent images.In Mozilla (-moz-opacity:x) x can be a value from 0.0 - 1.0. A lower value makes the element more transparent (The same things goes for the CSS3-valid syntax opacity:x).
In IE (filter:alpha(opacity=x)) x can be a value from 0 - 100. A lower value makes the element more transparent.
Here is the example:
<img style="border:1px solid red;-moz-opacity:0.4;filter:alpha(opacity=40);" src="/images/css.gif" />
This will produce following result:
HTML Part 9
Strong Text - The <strong> Element:
The <strong> element is intended to show strong emphasis for its content; stronger emphasis than the <em> element. As with the <em> element, the <strong> element should be used only when you want to add strong emphasis to part of a document.
<p>You <strong>must</strong> remember to close elements in XHTML.</p>
This will produce following result:
You must remember to close elements in XHTML.
Text Abbreviation - The <abbr> Element :
You can indicate when you are using an abbreviated form by placing the abbreviation between opening <abbr> and closing </abbr> tags.
<p>I have a friend called <abbr title="Abhishek">Abhy</abbr>.</p>
This will produce following result:
I have a friend called Abhy.
Using Acronym - The <acronym> Element :
The <acronym> element allows you to indicate that the text between an opening <acronym> and closing </acronym> element is an acronym.
When possible use a title attribute whose value is the full version of the acronyms on the <acronym> element, and if the acronym is in a different language, include an xml:lang attribute in XHTML documents.
<p>This chapter covers marking up text in <acronym title="Extensible Hypertext Markup Language">XHTML</acronym>.</p>
This will produce following result:
This chapter covers marking up text in XHTML.
At present, the major browsers do not change the appearance of the content of the <acronym> element.
Special Terms - The <dfn> Element :
The <dfn> element allows you to specify that you are introducing a special term. Its use is similar to the words that are in italics in the midst of paragraphs in this book when new key concepts are introduced.Typically, you would use the <dfn> element the first time you introduce a key term and only in that instance. Most recent browsers render the content of a <dfn> element in an italic font.
<p>This tutorial teaches you how mark up your documents for the web using <dfn>XHTML</dfn>.</p>
This will produce following result:
This tutorial teaches you how mark up your documents for the web using XHTML.
Quoting Text - The <blockquote> Element :
When you want to quote a passage from another source, you should use the <blockquote> element.Text inside a <blockquote> element is usually indented from the left and right edges of the surrounding text, and sometimes uses an italicized font.
<p>The following description of XHTML is taken from the W3C Web site:</p>
<blockquote> XHTML 1.0 is the W3C's first Recommendation for XHTML, following on from earlier work on HTML 4.01, HTML 4.0, HTML 3.2 and HTML 2.0. </blockquote>
This will produce following result:
The following description of XHTML is taken from the W3C Web site:
XHTML 1.0 is the W3C's first Recommendation for XHTML, following on from earlier work on HTML 4.01, HTML 4.0, HTML 3.2 and HTML 2.0.
Citations - The <cite> Element :
If you are quoting a text, you can indicate the source placing it between an opening <cite> tag and closing </cite> tagAs you would expect in a print publication, the content of the <cite> element is rendered in italicized text by default.
<p>This HTML Tutorial is derived from <cite>World Wide Web Standard for HTML</cite>.</p>
This will produce following result:
This HTML Tutorial is derived from World Wide Web Standard for HTML.
Computer Code - The <code> Element :
Any code to appear on a Web page should be placed inside a <code> element. Usually the content of the <code> element is presented in a monospaced font, just like the code in most programming books.<h1> <code>This is inside code element</code></h1>
This will produce following result:
This is inside code element
Programming Variables - The <var> Element :
This element is usually used in conjunction with the <pre> and <code> elements to indicate that the content of that element is a variable that can be supplied by a user.<p><code>document.write("<var>user-name</var>")</code></p>
This will produce following result:
document.write("user-name")
Program Output - The Element :
The element indicates sample output from a program, script, or the like. Again, it is mainly used when documenting programming concepts. For example: The element indicates sample output from a program, script, or the like. Again, it is mainly used when documenting programming concepts. For example:
<p>Result produced by the program is <samp>Hello World</samp></p>
This will produce following result:
Result produced by the program is Hello World
Wednesday, January 15, 2014
Burn a CD on Windows XP without using software
Windows XP comes with a built in CD-copy feature that not many people are aware of. Although almost everyone has his/her favorite CD-copy software to stick with, it is still good to know about this CDR feature from Windows XP. You will find it very useful when you come to another PC that doesn't have a CD-copy software, and you can't just install your favorite software to it. With this feature, you can write some data or MP3 files to a CD/DVD, or erase a re-writable CD/DVD.
If you're using a Re-Writable CD (CD-RW), make sure the disc is blank. You might need to erase (or "format") it before use. For information how to erase a CD-RW on Windows XP without using any other software, see this article.
Requirements: You need to enable the CD-R feature on Windows XP. If you haven't done so, see this article.
Insert a Formated-ReWritable CD or a Recordable (CD-R) disc into the CD drive.
From Desktop, double-click on "My Computer".
Navigate to the files/folders you want to copy to CD. Select them and press "Ctrl-c" to copy.
Browse back to the CD-ROM, and press "Ctrl-V" to paste. The files/folders will show up as temporary files/folders at this time.
On the left panel, select "Write these files to CD".
The window "CD Writing Wizard" appears with the default CD name. Change the CD name if you wish, then click "Next".
The "CD Writing Wizard" starts to write files/folders to the CD:
Once the writing process is complete, the wizard will disappear and the CD-Rom will be ejected.
Reset Windows Password
Forgot your administrator password? Don't panic, it happens to some other people too, and you have found the solution! The following instructions will show you step-by-step how to reset your local Windows password. This only works for local user accounts, however, not domain accounts.The password recovery tool from this page is written by Petter Nordahl-Hagen, and the original information, as well as the downloadable tool, can be found from his website. According to the author, this tool should work for Windows NT/2000/XP/Vista.
WARNING! Users who have EFS encrypted files on the Windows XP or Vista computers will loose access to the EFS encrypted files after recovery of your password!
Use this trick at your own risks
The tool to reset your password can be downloaded here.
I. Download the boot disk:
Download the boot disk, which includes the password recovery tool here. The file contains the ISO CD image.
Unzip (extract) the ISO file and burn it to a CD. Note that this is an ISO file, you must burn it to CD as an ISO image, not as a "data" file. If you're not sure how, see this article. Also, the image is bootble, you need to burn the image to a CD using the image burning feature; do not extract the contents of the ISO and burn them to the CD, you'll end up with a CD that can't boot!
II. Understanding the process:
You'll use the boot disk created from the above steps to boot up your computer, which you want to reset your administrator password.
You'll be asked for things like: which drive is the boot drive, which path to the SAM file, etc.. but don't worry, details will be provided.
Once you have selected an account to reset the password, you'll need to type in a new password; however, it is highly recommended to use a BLANK password at this point, then you can change your password later in Windows.
Follow the prompts to the end. You'll need to save the changes at the end!
III. OK! Enough talking. Here are the steps:
Start up your computer with the boot disk created above. You should see a welcome screen following with a prompt:
boot:
Just wait, the boot up process will continue automatically. Then you should see a screen similar to this:========================================================= . Step ONE: Select disk where the Windows installation is ========================================================= .... NT partitions found: 1 : /dev/sda1 4001MB Boot 2 : /dev/sda5 2148MB Please select partition by number or a = show all partitions, d = automatically load new disk drivers m = manually load new disk drivers l = relist NTFS/FAT partitions, q = quit Select: [1]
========================================================= . Step TWO: Select PATH and registry files ========================================================= .... What is the path to the registry directory? (relative to windows disk) [windows/system32/config] :
-r-------- 1 0 0 262144 Jan 12 18:01 SAM -r-------- 1 0 0 262144 Jan 12 18:01 SECURITY -r-------- 1 0 0 262144 Jan 12 18:01 default -r-------- 1 0 0 8912896 Jan 12 18:01 software -r-------- 1 0 0 2359296 Jan 12 18:01 system dr-x------ 1 0 0 4096 Sep 8 11:37 systemprofile -r-------- 1 0 0 262144 Sep 8 11:53 userdiff Select which part of registry to load, use predefined choices or list the files with space as delimiter 1 - Password reset [sam system security] 2 - RecoveryConsole parameters [software] q - quit - return to previous [1]
- Hit "Enter" with the default option selected "[1]". Then ...:
========================================================= . Step THREE: Password or registry edit ========================================================= Loaded hives:
1 - Edit user data and passwords 2 - Syskey status & change 3 - RecoveryConsole settings - - - 9 - Registry editor, now with full write support! q - Quit (you will be asked if there is something to save) What to do? [1] -> 1 - Hit "Enter" with the default option selected "[1]". Then ...:
===== chntpw Edit User Info & Passwords ==== RID: 01f4, Username: <Administrator> RID: 01f5, Username: <Guest>, *disabled or locked* RID: 03e8, Username: <HelpAssistant>, *disabled or locked* RID: 03eb, Username: <pnh>, *disabled or locked* RID: 03ea, Username: <SUPPORT_388945a0>, *disabled or locked* Select: ! - quit, . - list users, 0x<RID> - User with RID (hex) or simply enter the username to change: [Administrator]
- Hit "Enter" with the default option selected "[Administrator]", or select another user account. Here you can enter the full user account surrounded by < and >, CASE-SENSITIVE, or enter the RID number (i.e. 0x1f4). Assuming you select the Administrator account, you should see the following screen:
RID : 0500 [01f4] Username: Administrator fullname: comment : Built-in account for administering the computer/domain homedir : Account bits: 0x0210 = [ ] Disabled | [ ] Homedir req. | [ ] Passwd not req. | [ ] Temp. duplicate | [X] Normal account | [ ] NMS account | [ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act | [X] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) | [ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) | Failed login count: 0, while max tries is: 0 Total login count: 3 * = blank the password (This may work better than setting a new password!) Enter nothing to leave it unchanged Please enter new password: *
- At the prompt "Please enter new password", Enter the * for a blank password (HIGHLY RECOMMENDED!) then press Enter
Please enter new password: * Blanking password! Do you really wish to change it? (y/n) [n] y
- At the prompt, type in "y", then press Enter. Note that the default option is "n".
Do you really wish to change it? (y/n) [n] y Changed! Select: ! - quit, . - list users, 0x - User with RID (hex) or simply enter the username to change: [Administrator] !
- Enter the "!" to go back to the main menu. Then select "q" at the following menu to quit:
<>========<> chntpw Main Interactive Menu <>========<> Loaded hives: 1 - Edit user data and passwords 2 - Syskey status & change 3 - RecoveryConsole settings - - - 9 - Registry editor, now with full write support! q - Quit (you will be asked if there is something to save) What to do? [1] -> q
- A prompt to save changes displays, enter "y" to save:
========================================================= . Step FOUR: Writing back changes ========================================================= About to write file(s) back! Do it? [n] : y
- The changes are saved! You should see the following screen, press Enter, and reboot your computer.
Writing sam ***** EDIT COMPLETE ***** You can try again if it somehow failed, or you selected wrong New run? [n] : n
Notice the last line "Select: [1]" which shows the [1] as default selection because the tool detected the boot up partition is [1]. This might be different on your own machine, so you should review the list shown under "NT partitions found:". The partition with the word "Boot" should be selected.
Hit Enter once you confirm the selection. You should see a similar screen as follows:
Notice the last line "[windows/system32/config]" which shows the default path. This was also detected by the tool. If the path is correct, hit Enter, or if you wish to enter a different path, enter it now then hit Enter.
Here are the paths for different versions of Windows:
- Windows NT 3.51: winnt35/system32/config
- Windows NT 4 and Windows 2000: winnt/system32/config
- Windows XP/2003 (and often Windows 2000 upgraded from Windows 98 or earlier): windows/system32/config
Once you hit "Enter", you should see the next screen similar to the following:
CSS Part 6
Set the text direction :
Following is the example which demonstrates how to set the direction of a text. Possible values are ltr or rtl.<p style="direction:rtl;">
This text will be renedered from right to left
</p>
This will produce following result:
This text will be renedered from right to left
Set the space between characters:
Following is the example which demonstrates how to set the space between characters. Possible values are normal or a number specifying space..This text is having space between letters.
</p>
This will produce following result:
This text is having space between letters.
Set the space between words:
Following is the example which demonstrates how to set the space between words. Possible values are normal or a number specifying space..
<p style="word-spacing:5px;">
This text is having space between words.
</p>
This will produce following result:
This text is having space between words.
Set the text indent:
Following is the example which demonstrates how to indent the first line of a paragraph. Possible values are % or a number specifying indent space..
<p style="text-indent:1cm;">
This text will have first line indented by 1cm and this line will remain at its actual position this is done by CSS text-indent property.
</p>
This will produce following result:
This text will have first line indented by 1cm and this line will remain at its actual position this is done by CSS text-indent property.
Set the text alignment:
Following is the example which demonstrates how to align a text. Possible values are left, right, center, justify..
<p style="text-align:right;">
This will be right aligned. </p>
<p style="text-align:center;">
This will be center aligned. </p>
<p style="text-align:left;">
This will be left aligned. </p>
This will produce following result:
This will be right aligned.
This will be center aligned.
This will be left aligned.
Decorating the text:
Following is the example which demonstrates how to decorate a text. Possible values are none, underline, overline, line-through, blink..<p style="text-decoration:underline;">
This will be underlined </p>
<p style="text-decoration:line-through;">
This will be striked through. </p>
<p style="text-decoration:overline;">
This will have a over line. </p>
<p style="text-decoration:blink;">
This text will have blinking effect </p>
This will produce following result:
This will be underlined
This will be striked through.
This will have a over line.
This text will have blinking effect
Tuesday, January 14, 2014
How to Change password using command promt?
Hi, Friends Today I uploaded a video of how to change administrator password or reset it you can also change user password without knowing current password.
53d07ec7d038421ab4a6da68e61853b24e312d51e9599e000f
HTML Part 8
Strike Text - The <strike> Element:
Anything that appears in a <strike>...</strike> element is displayed with strikethrough, which is a thin line through the text:
<p>The following word uses a <strike>strikethrough</strike> typeface.</p>
This will produce following result:
The following word uses a strikethrough typeface.
Monospaced font - The <tt> Element:
The content of a <tt> element is written in monospaced font. Most fonts are known as variable- width fonts because different letters are of different widths (for example, the letter m is wider than the letter i). In a monospaced font, however, each letter is the same width.
<p>The following word uses a <tt>monospaced</tt> typeface.</p>
This will produce following result:
The following word uses a monospaced typeface.
Superscript Text - The <sup> Element:
The content of a <sup> element is written in superscript; the font size used is the same size as the characters surrounding it but is displayed half a character.s height above the other characters.<p>The following word uses a <sup>superscript</sup> typeface.</p>
This will produce following result:
The following word uses a superscript typeface.
Subscript Text - The <sub> Element:
The content of a <sub> element is written in subscript; the font size used is the same as the characters surrounding it, but is displayed half a character.s height beneath the other characters.<p>The following word uses a <sub>subscript</sub> typeface.</p>
This will produce following result:
The following word uses a subscript typeface.
Grouping - The <div> and <span> Elements :
The <div> and <span> elements allow you to group together several elements to create sections or subsections of a page.For example, you might want to put all of the footnotes on a page within a <div> element to indicate that all of the elements within that <div> element relate to the footnotes. You might then attach a style to this <div> element so that they appear using a special set of style rules.
The <div> element is used to group block-level elements together:
<div id="menu" align="middle" >
<a href="/index.htm">HOME</a> |
<a href="/about/contact_us.htm">CONTACT</a> |
<a href="/about/index.htm">ABOUT</a> </div>
<div id="content" align="left" bgcolor="white">
<h5>Content Articles</h5>
<p>Actual content goes here.....</p>
</div>
This will produce following result:
Content Articles
Actual content goes here.....The <span> element, on the other hand, can be used to group inline elements only. So, if you had a part of a sentence or paragraph you wanted to group together you could use the <span> element.
<div><p>This is the example of <span style="color:green">span tag</span> and the <span style="color:purple">div tag</span> alongwith CSS</p></div>
This will produce following result:
This is the example of span tag and the div tag alongwith CSS
These tags are commonly used with CSS to allow you to attach a style to a section of a page.
We will see all phrase tags in this section with examples.
<p>You <em>must</em> remember to close elements in XHTML.</p>
This will produce following result:
You must remember to close elements in XHTML.
These tags are commonly used with CSS to allow you to attach a style to a section of a page.
HTML Phrase Tags
While some of these phrase elements are displayed in a similar manner to the <b>, <i>, <pre>, and <tt> elements you have already seen, they are designed for specific purposes. For example, the <em> and <strong> elements give text emphasis and strong emphasis respectively and there are several elements for marking up quotes.We will see all phrase tags in this section with examples.
Emphasized Text - The <em> Element:
The content of an <em> element is intended to be a point of emphasis in your document, and it is usually displayed in italicized text. The kind of emphasis intended is on words such as "must" in the following sentence:<p>You <em>must</em> remember to close elements in XHTML.</p>
This will produce following result:
You must remember to close elements in XHTML.
CSS Part 5
Set the font family:
Following is the example which demonstrates how to set the font family of an element. Possible value could be any font family name.<p style="font-family:georgia,garamond,serif;">
This text is rendered in either georgia, garamond, or the default serif font depending on which font you have at your system.
</p>
This will produce following result:
This text is rendered in either georgia, garamond, or the default serif font depending on which font you have at your system.
Set the font style:
Following is the example which demonstrates how to set the font style of an element. Possible values are normal, italic and oblique.
<p style="font-style:italic;">
This text will be rendered in italic style
</p>
This will produce following result:
This text will be rendered in italic style
Set the font weight:
Following is the example which demonstrates how to set the font weight of an element. The font-weight property provides the functionality to specify how bold a font is. Possible values could be normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900.
<p style="font-weight:bold;">
This font is bold.
</p>
<p style="font-weight:bolder;">
This font is bolder.
</p>
<p style="font-weight:900;">
This font is 900 weight.
</p>
This will produce following result:
This font is bold.
This font is bolder.
This font is 900 weight.
Set the font size:
Following is the example which demonstrates how to set the font size of an element. The font- size property is used to control the size of fonts. Possible values could be xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, size in pixels or in %<p style="font-size:20px;">
This font size is 20 pixels
</p>
<p style="font-size:small;">
This font size is small
</p>
<p style="font-size:large;">
This font size is large
</p>
This will produce following result:
This font size is 20 pixels
This font size is small
This font size is large
Set the font size adjust:
Following is the example which demonstrates how to set the font size adjust of an element. This property enables you to adjust the x-height to make fonts more legible. Possible value could be any number.<p style="font-size-adjust:0.61;">
This text is using a font-size-adjust value. </p>
This will produce following result:
This text is using a font-size-adjust value.
Manipulating Text using CSS
This tutorial will teach you how to manipulate text using CSS properties. You can set following text properties of an element:- The color property is used to set the color of a text.
- The direction property is used to set the text direction.
- The letter-spacing property is used to add or subtract space between the letters that make up a word.
- The word-spacing property is used to add or subtract space between the words of a sentence.
- The text-indent property is used to indent the text of a paragraph.
- The text-align property is used to align the text of a document.
- The text-decoration property is used to underline, overline, and strikethrough text.
- The text-transform property is used to capitalize text or convert text to uppercase or lowercase letters.
- The white-space property is used to control the flow and formatting of text.
- The text-shadow property is used to set the text shadow around a text.
Set the text color:
Following is the example which demonstrates how to set the text color. Possible value could be any color name in any valid format.
<p style="color:red;">
This text will be written in red. </p>
This will produce following result:
This text will be written in red.
Sunday, January 12, 2014
CSS Part 4
Setting Backgrounds using CSS
This tutorial will teach you how to set backgrounds of various HTML elements. You can set following background properties of an element:- The background-color property is used to set the background color of an element.
- The background-image property is used to set the background image of an element.
- The background-repeat property is used to control the repetition of an image in the background.
- The background-position property is used to control the position of an image in the background.
- The background-attachment property is used to control the scrolling of an image in the background.
- The background property is used as shorthand to specify a number of other background properties.
Set the background color:
Following is the example which demonstrates how to set the background color for an element.
<p style="background-color:yellow;"> This text has a yellow background color. </p>
This will produce following result:
This text has a yellow background color.
Set the background image:
Following is the example which demonstrates how to set the background image for an element.
<table style="background-image:url(/images/pattern1.gif);">
<tr>
<td> This table has background image set. </td>
</tr>
</table>
Repeat the background image:
Following is the example which demonstrates how to repeat the background image if image is small. You can use no-repeat value for background-repeat property if you don't want to repeat an image, in this case image will display only once.
By default background-repeat property will have repeat value.
<table style="background-image:url(/images/pattern1.gif);
background-repeat: repeat;">
<tr><td>
This table has background image which repeats multiple times.
</td></tr>
</table>
Following is the example which demonstrates how to repeat the background image vertically.
<table style="background-image:url(/images/pattern1.gif);
background-repeat: repeat-y;">
<tr><td>
This table has background image set which will repeat vertically.
</td></tr>
</table>
Following is the example which demonstrates how to repeat the background image horizontally.
<table style="background-image:url(/images/pattern1.gif);
background-repeat: repeat-x;">
<tr><td>
This table has background image set which will repeat horizontally.
</td></tr>
</table>
Set the background image position:
Following is the example which demonstrates how to set the background image position 100 pixels away from the left side.
<table style="background-image:url(/images/pattern1.gif);
background-position:100px;">
<tr>
<td> Background image positioned 100 pixels away from the left. </td>
</tr>
</table>
Following is the example which demonstrates how to set the background image position 100 pixels away from the left side and 200 pixels down from the top.
<table style="background-image:url(/images/pattern1.gif);
background-position:100px 200px;">
<tr>
<td> This table has background image positioned 100 pixels away from the left and 200 pixels from the top. </td>
</tr>
</table>
Set the background attachment:
Background attachment determines whether a background image is fixed or scrolls with the rest of the page.
Following is the example which demonstrates how to set the fixed background image.
<p style="background-image:url(/images/pattern1.gif);
background-attachment:fixed;">
This parapgraph has fixed background image.
</p>
Following is the example which demonstrates how to set the scrolling background image.
<p style="background-image:url(/images/pattern1.gif);
background-attachment:scroll;">
This parapgraph has scrolling background image.
</p>
Shorthand property :
You can use the background property to set all the background properties at once. For example:
<p style="background:url(/images/pattern1.gif) repeat fixed;">
This parapgraph has fixed repeated background image.
</p>
Saturday, January 11, 2014
C-sharp part 3
C# Data Types
In C#, variables are categorized into the following types:
- Value types
- Reference types
- Pointer types
Value Types Value type variables can be assigned a value directly. They are derived from the class System.Value Type. The value types directly contain data. Some examples are int, char, float, which stores numbers, alphabets, floating point numbers, respectively. When you declare an int type, the system allocates memory to store the value. The following table lists the available value types in C# 2010:
To get the exact size of a type or a variable on a particular platform, you can use the sizeof method. The expression sizeof(type) yields the storage size of the object or type in bytes. Following is an example to get the size of int type on any machine:
using System;
namespace DataTypeApplication
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Size of int: {0}", sizeof(int));
Console.ReadLine();
}
}
}
When the above code is compiled and executed, it produces the following result:
Size of int: 4
Reference Types
The reference types do not contain the actual data stored in a variable, but they contain a reference to the variables.In other words, they refer to a memory location. Using more than one variable, the reference types can refer to a memory location. If the data in the memory location is changed by one of the variables, the other variable automatically reflects this change in value. Example of built-in reference types are: object, dynamic and string.
OBJECT TYPE
The Object Type is the ultimate base class for all data types in C# Common Type System (CTS). Object is an alias for System.Object class. So object types can be assigned values of any other types, value types, reference types, predefined or user-defined types. However, before assigning values, it needs type conversion. When a value type is converted to object type, it is called boxing and on the other hand, when an object type is converted to a value type, it is called unboxing.object obj; obj = 100; // this is boxing
DYNAMIC TYPE
You can store any type of value in the dynamic data type variable. Type checking for these types of variables takes place at runtime. Syntax for declaring a dynamic type is:dynamic <variable_name> = value;
For example,
dynamic d = 20;
Dynamic types are similar to object types except that type checking for object type variables takes place at compile time, whereas that for the dynamic type variables takes place at run-time.
STRING TYPE
The String Type allows you to assign any string values to a variable. The string type is an alias for the System.String class. It is derived from object type. The value for a string type can be assigned using string literals in two forms: quoted and @quoted. For example,String str = "Tutorials Point";
A @quoted string literal looks like:
@"Tutorials Point";
The user-defined reference types are: class, interface, or delegate. We will discuss these types in later chapter.
Pointer Types
Pointer type variables store the memory address of another type. Pointers in C# have the same capabilities as in C or C++.Syntax for declaring a pointer type is:
type* identifier;
For example,
char* cptr; int* iptr;
We will discuss pointer types in the chapter 'Unsafe Codes'.
C# Type Conversion
Type conversion is basically type casting or converting one type of data to another type. In C#, type casting has two forms:- Implicit type conversion - these conversions are performed by C# in a type-safe manner. Examples are conversions from smaller to larger integral types and conversions from derived classes to base classes.
- Explicit type conversion - these conversions are done explicitly by users using the pre-defined functions. Explicit conversions require a cast operator.
When the above code is compiled and executed, it produces the following result:
5673
C# Type Conversion Methods
C# provides the following built-in type conversion methods:
The following example converts various value types to string type:
When the above code is compiled and executed, it produces the following result:
75
53.005
2345.7652
True
CSS Part 3
CSS Rules Overriding:
We have discussed four ways to include style sheet rules in a an HTML document. Here is the rule to override any Style Sheet Rule.- Any inline style sheet takes highest priority. So it will override any rule defined in <style>...</style> tags or rules defined in any external style sheet file.
- Any rule defined in <style>...</style> tags will override rules defined in any external style sheet file.
- Any rule defined in external style sheet file takes lowest priority and rules defined in this file will be applied only when above two rules are not applicable.
Handling old Browsers:
There are still many old browsers who do not support CSS. So we should take care while writing our Embedded CSS in an HTML document. The following snippet shows how you can use comment tags to hide CSS from older browsers:
<style type="text/css">
<!--
body, td {
color: blue;
}
-->
</style>
CSS Comments:
Many times you may need to put additional comments in your style sheet blocks. So it is very easy to comment any part in style sheet. You simple put your comments inside /*.....this is a comment in style sheet.....*/.
You can use /* ....*/ to comment multi-line blocks in similar way you do in C and C++ programming languages.
Example:
/* This is an external style sheet file */
h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
/* end of style rules. */
CSS - Measurement Units
Before we start actual exercise, I would like to give a brief idea about the CSS Measurement Units.
CSS supports a number of measurements including absolute units such as inches, centimeters, points, and so on, as well as relative measures such as percentages and em units. You need these values while specifying various measurements in your Style rules e.g border="1px solid red".
We have listed out all the CSS Measurement Units alogwith proper Examples:
CSS – Colors
CSS uses color values to specify a color. Typically, these are used to set a color either for the foreground of an element(i.e., its text) or else for the background of the element. They can also be used to affect the color of borders and other decorative effects.
You can specify your color values in various formats. Following table tells you all possible formats:
These formats are explained in more detail in the following sections:
CSS 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.
CSS 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.
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:
Friday, January 10, 2014
C-sharp Part 2
It's worth to note the following points:
- C# is case sensitive.
- All statements and expression must end with a semicolon (;).
- The program execution starts at the Main method.
- Unlike Java, file name could be different from the class name.
Compile & Execute a C# Program:
If you are using Visual Studio.Net for compiling and executing C# programs, take the following steps:
- Start Visual Studio.
- On the menu bar, choose File, New, Project.
- Choose Visual C# from templates, and then choose Windows.
- Choose Console Application.
- Specify a name for your project, and then choose the OK button.
- The new project appears in Solution Explorer.
- Write code in the Code Editor.
- Click the Run button or the F5 key to run the project. A Command Prompt window appears that contains the line Hello World.
You can compile a C# program by using the command-line instead of the Visual Studio IDE:
- Open a text editor and add the above-mentioned code.
- Save the file as helloworld.cs
- Open the command prompt tool and go to the directory where you saved the file.
- Type csc helloworld.cs and press enter to compile your code. If there are no errors in your code, the command prompt will take you to the next line and would generate helloworld.exe executable file.
- Next, type helloworld to execute your program.
- You will be able to see "Hello World" printed on the screen.
C# Basic Syntax
C# is an object-oriented programming language. In Object-Oriented Programming methodology, a program consists of various objects that interact with each other by means of actions. The actions that an object may take are called methods. Objects of the same kind are said to have the same type or, more often, are said to be in the same class.
For example, let us consider a Rectangle object. It has attributes like length and width. Depending upon the design, it may need ways for accepting the values of these attributes, calculating area and display details.
Let us look at an implementation of a Rectangle class and discuss C# basic syntax, on the basis of our observations in it:
When the above code is compiled and executed, it produces the following result:
Length: 4.5
Width: 3.5
Area: 15.75
The using Keyword
The first statement in any C# program is
using System;
The using keyword is used for including the namespaces in the program. A program can include multiple using statements.
The class Keyword
The class keyword is used for declaring a class.
Comments in C#
Comments are used for explaining code. Compilers ignore the comment entries. The multiline comments in C# programs start with /* and terminates with the characters */ as shown below:
/* This program demonstrates
The basic syntax of C# programming
Language */
Single-line comments are indicated by the '//' symbol. For example,
//end class Rectangle
Member Variables
Variables are attributes or data members of a class, used for storing data. In the preceding program, the Rectangle class has two member variables named length and width.
Member Functions
Functions are set of statements that perform a specific task. The member functions of a class are declared within the class. Our sample class Rectangle contains three member functions: AcceptDetails, GetArea and Display.
Instantiating a Class
In the preceding program, the class ExecuteRectangle is used as a class, which contains the Main() method and instantiates the Rectangle class.
Identifiers
An identifier is a name used to identify a class, variable, function, or any other user-defined item. The basic rules for naming classes in C# are as follows:
- A name must begin with a letter that could be followed by a sequence of letters, digits (0 - 9) or underscore. The first character in an identifier cannot be a digit.
- It must not contain any embedded space or symbol like ? - +! @ # % ^ & * ( ) [ ] { } . ; : " ' / and \. However, an underscore ( _ ) can be used.
- It should not be a C# keyword.
C# Keywords
Keywords are reserved words predefined to the C# compiler. These keywords cannot be used as identifiers; however, if you want to use these keywords as identifiers, you may prefix the keyword with the @ character.
In C#, some identifiers have special meaning in context of code, such as get and set, these are called contextual keywords.
The following table lists the reserved keywords and contextual keywords in C#:
CSS Part 2
Multiple Style Rules:
You may need to define multiple style rules for a single element. You can define these rules to combine multiple properties and corresponding values into a single block as defined in the following example:
h1 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
Here all the property and value pairs are separated by a semi colon (;). You can keep them in a ingle line or multiple lines. For better readability we keep them into separate lines.
Grouping Selectors:
You can apply a style to many selectors if you like. Just separate the selectors with a comma as given in the following example:h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
This define style rule will be applicable to h1, h2 and h3 element as well. The order of the list is irrelevant. All the elements in the selector will have the corresponding declarations applied to them.
Embedded CSS - The <style> Element:
You can put your CSS rules into an HTML document using the <style> element. This tag is placed inside <head>...</head> tags. Rules defined using this syntax will be applied to all the elements available in the document. Here is the generic syntax:<head>
<style type="text/css" media="..."> Style Rules ............ </style>
</head>
Attributes:
Attributes associated with <style> elements are:
Example:
Following is the example of embed CSS based on above syntax:
<head>
<style type="text/css" media="all">
h1{
color: #36C;
}
</style>
</head>
Inline CSS - The style Attribute:
You can use style attribute of any HTML element to define style rules. These rules will be applied to that element only. Here is the generic syntax:<element style="...style rules....">
Attributes:
Example:
Following is the example of inline CSS based on above syntax:
<h1 style ="color:#fff;"> This is inline CSS </h1>
This will produce following result:
This is inline CSS
External CSS - The <link> Element:
The <link> element can be used to include an external stylesheet file in your HTML document.
An external style sheet is a separate text file with .css extension. You define all the Style rules within this text file and then you can include this file in any HTML document using <link> element.
Here is the generic syntax of including external CSS file:
<head>
<link type="text/css" href="..." media="..." />
</head>
Attributes:
Attributes associated with <style> elements are:
Example:
Consider a simple style sheet file with a name mystyle.css having the following rules:
h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
Now you can include this file mystyle.css in any HTML document as follows:
<head>
<link type="text/css" href="mystyle.css" media="all" />
</head>
Imported CSS - @import Rule:
@import is used to import an external stylesheet in a manner similar to the <link> element. Here is the generic syntax of @import rule.
<head>
<@import "URL";
</head>
Here URL is the URL of the style sheet file having style rules. You can use another syntax as well:
<head>
<@import url("URL");
</head>
Example:
Following is the example showing you how to import a style sheet file into HTML document:
<head>
@import "mystyle.css";
</head>
Thursday, January 9, 2014
CSS Tutorial Part 1
CSS stands for Cascading Style Sheet.
This tutorial gives complete understanding on CSS.
CSS Introduction
Before your begin:
Before you begin, it's important that you know Windows or Unix. A working knowledge of Windows or Unix makes it much easier to learn HTML.
You should be familiar with:
- Basic word processing using any text editor.
- How to create directories and files.
- How to navigate through different directories.
- Basic understanding on internet browsing using a browser like Internet Explorer or Firefox etc.
- Basic understanding on developing simple Web Pages using HTML or XHTML.
What is CSS?
Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify the process of making web pages presentable.
CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, as well as a variety of other effects.
CSS is easy to learn and understand but it provides powerful control over the presentation of an HTML document. Most commonly, CSS is combined with the markup languages HTML or XHTML.
Advantages of CSS:
- CSS saves time - You can write CSS once and then reuse same sheet in multiple HTML pages. You can define a style for each HTML element and apply it to as many Web pages as you want.
- Pages load faster - If you are using CSS, you do not need to write HTML tag attributes every time. Just write one CSS rule of a tag and apply to all the occurrences of that tag. So less code means faster download times.
- Easy maintenance - To make a global change, simply change the style, and all elements in all the web pages will be updated automatically.
- Superior styles to HTML - CSS has a much wider array of attributes than HTML so you can give far better look to your HTML page in comparison of HTML attributes.
- Multiple Device Compatibility - Style sheets allow content to be optimized for more than one type of device. By using the same HTML document, different versions of a website can be presented for handheld devices such as PDAs and cell phones or for printing.
- Global web standards - Now HTML attributes are being deprecated and it is being recommended to use CSS. So its a good idea to start using CSS in all the HTML pages to make them compatible to future browsers.
Who Creates and Maintains CSS?
CSS is created and maintained through a group of people within the W3C called the CSS Working Group. The CSS Working Group creates documents called specifications. When a specification has been discussed and officially ratified by W3C members, it becomes a recommendation.
These ratified specifications are called recommendations because the W3C has no control over the actual implementation of the language. Independent companies and organizations create that software.
NOTE: The World Wide Web Consortium, or W3C is a group that makes recommendations about how the Internet works and how it should evolve.
CSS Syntax – Selectors
A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts:
- Selector: A selector is an HTML tag at which style will be applied. This could be any tag like <h1> or <table> etc.
- Property: A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color or border etc.
- Value: Values are assigned to properties. For example color property can have value either red or #F1F1F1 etc.
You can put CSS Style Rule Syntax as follows:
selector { property: value }
Example: You can define a table border as follows:
table{ color: red; }
Here table is a selector and color is a property and given value red is the value of that property.
You can define selectors in various simple ways based on your comfort. Let me put these selectors one by one.
- The Type Selectors
- The Universal Selectors
- The Descendant Selectors
- The Class Selectors
- The ID Selectors
- The Child Selectors
- The Attribute Selectors
The Type Selectors:
This is the same selector we have seen above. Again one more example to give a color to all level 1 headings :
h1 { color: #36CFFF; }
The Universal Selectors:
Rather than selecting elements of a specific type, the universal selector quite simply matches the name of any element type :
* { color: #000000; }
This rule renders the content of every element in our document in black.
The Descendant Selectors:
Suppose you want to apply a style rule to a particular element only when it lies inside a particular element. As given in the following example, style rule will apply to <em> element only when it lies inside <ul> tag.
ul em { color: #000000; }
The Class Selectors:
You can define style rules based on the class attribute of the elements. All the elements having that class will be formatted according to the defined rule.
.black { color: #000000; }
This rule renders the content in black for every element with class attribute set to black in our document. You can make it a bit more particular. For example:
h1.black { color: #000000; }
This rule renders the content in black for only <h1> elements with class attribute set to black.
You can apply more than one class selectors to given element. Consider the following example :
<p class="center bold"> This para will be styled by the classes center and bold. </p>
The ID Selectors:
You can define style rules based on the id attribute of the elements. All the elements having that id will be formatted according to the defined rule.
#black { color: #000000; }
This rule renders the content in black for every element with id attribute set to black in our document. You can make it a bit more particular. For example:
h1#black { color: #000000; }
This rule renders the content in black for only <h1> elements with id attribute set to black.
The true power of id selectors is when they are used as the foundation for descendant selectors, For
example:
#black h2 { color: #000000; }
In this example all level 2 headings will be displayed in black color only when those headings will lie with in tags having id attribute set to black.
The Child Selectors:
You have seen descendant selectors. There is one more type of selectors which is very similar to descendants but have different functionality. Consider the following example:
body > p { color: #000000; }
This rule will render all the paragraphs in black if they are direct child of <body> element. Other paragraphs put inside other elements like <div> or <td> etc. would not have any effect of this rule.
The Attribute Selectors:
You can also apply styles to HTML elements with particular attributes. The style rule below will match all input elements that has a type attribute with a value of text:
input[type="text"]{ color: #000000; }
The advantage to this method is that the <input type="submit" /> element is unaffected, and the color applied only to the desired text fields.
There are following rules applied to attribute selector.
- p[lang] - Selects all paragraph elements with a lang attribute.
- p[lang="fr"] - Selects all paragraph elements whose lang attribute has a value of exactly "fr".
- p[lang~="fr"] - Selects all paragraph elements whose lang attribute contains the word "fr".
- p[lang|="en"] - Selects all paragraph elements whose lang attribute contains values that are exactly "en", or begin with "en-".
Subscribe to:
Posts (Atom)