Showing posts with label Language. Show all posts
Showing posts with label Language. Show all posts

Sunday, 23 October 2011

JAVA SCRIPT: Variables, Operators, Statments, Loops

JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a mulch-paradigm language, supporting object-oriented, imperative, and functional programming styles.

JavaScript was formalized in the ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a Web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects within a host environment.

<html>
<head>
<script type="text/javascript">
function displaydate()
{
document.getElementById ("demo").innerHTML=Date();
}
</script>
</head>
<body>

<h1>My first Javascript</h1>
<p id="demo">this is a paragraph.</p>

<button type="button" onclick="displaydate()">Display Date</button>

</body>
</html>
For short comment : // and comment & for long comment /* and long comment and closed to */

Java Script Variables :
A variables is when java script keep information. the two types of variable ---
  1. Local
  2. Gobble
In Java Script without declaration you can use a variables
Var x;
---------- declare variable
x=27;
-------------
y = 34;  No declaration

JAVA SCRIPT Operators : 
Modulus :
+
-
/
%
++          Inc by,
--            dis by,


 =                               x = y
+=                              x+ =y                    x = x+y
-=                               x-= y                     x = x-y
*=                              x* = y                    x = x*y
/=                              x/ = y                     x = x/y
%=                           x% =y                    x = x%y
Text1           =           " is in";
Text2           =           " Agra";
Text3           =           "Taj Mahal";
Text4           =           Text3+Text1+Text2 


Wednesday, 14 September 2011

HTML Tables and the Border (complete tag)

Table is made-up of rows and column, rows and horizontal lines and columns are vertical lines, where the rows and columns are intersect with code other is called cell.
Table can be created by using the table elements using start and end tag.
<table>………………………………</table>
Table is rewired one set of <tr>…………….</tr> it represent for table row and eves row is required a cell, cell is represented by <td>………………</td>
The structure of table is look like this:
<Table>
<tr>
<td>……..</td>
</tr>
</table>
Sample table and structure:
<table>
<tr>
<td>name</td><td>course</td>
</Tr>
</table>
Output of the table:
Name   course
If you want to show the border of the table it needed to add the border in the table tag like this:
<table border>
Name
Course
Fee
p. No
Abc
Cca
-----
-------

Table border thicknes:
Used to change the border lines of the table in thick
<table border = “2, 3, 4, 5, etc”>
Table cell spacing: used to give space between cells.
<table cellspacing=”1, 2, 3, 4 etc”>
Table cell padding: It is used to give space in the cell or outside area of the text.
<table cellpadding=”1, 2, 3, 4 etc”>
<Table bg color>: this tag can be used to change the back around color of the table.
<table bg color= “color name”>
<Table background>: this tag can be used to insert the image in the background of the table.
<table background=”source of image\image name. Extension”>
<Table width>:- this tag is used of change the width of the table.
Alignment of cell: - it is used to arrange the text in the cell . these are two type of alignment used in table tags.
(1)   Horizontal alignments
(2)   Vertical alignments
Horizontal alignment is used to arrange text horizontally in 4 type.
(a)    Left alignment
<td align=”left”>
(b)   Center alignment
<td align=”center”>
(c)    Right alignment
<td align=”right”>
(d)   Justify alignment
<td align=”justify”>
Vertical alignment is used to arrange the text of cell in vertical .3 type of alignment used in table of vertical.
(1)    Top alignment
<td align=”top”>
(2)    Middle alignment
<td align=”middle”>
(3)    Bottom alignment
<td align=”bottom”>

Colspan:- colspan is used to merge the columns of the table.
This tag is type in td toy.
<td colspan=”number of column”>

Rewspan: - it is used to merge the rows in the table.
The is also type in td tag
<td rowspan=”number rows”>
Color of Cell: - we can change the color of cell in the table with the <td=color name”>

Tuesday, 30 August 2011

HTML CODING (SUPER SCRIPT, SUB SCRIPT AND UNORDERED LIST)


SUPER SCRIPT:
We make super script to any character or it is used for power creation.
e.g. x2+y2
TAG FOR SUPER SCRIPT:
It is always start  from <sup> and close with </sup>
Example: x<sup>2</sup>+y<sup>2</sup>
SUBSCRIPT:
We make sub script to any character or it is used to creat chemical equations
e.g. c6 h12 o6 h2o etc.
TAG FOR SUB SCRIPT:
It is always start from <sub> and close with </sub>
Example:
C<sub>6</sub>H<sub>12</sub>o<sub>6</sub>
STRIKE THROUGH:
We can strike through any word or sentence
TAG FOR STRIKE THROUGH:
It is always start from <strike>and close with</strike>
PRE:
This is used to read the same formet of your html editor as, space, tab,enter all the things which you can want to use in your editor(notepad)
It is always start from <pre> and close with </pre>
<pre>name       add      course  city      duration           fee
Enter record below the field same as field by using tab key.
UL (UNORDERD LIST):
It is used to creat the ul crdesed list or bullet list in your web page.
It is always start from <ul>and closed with </ul> but <li> is the most important tag. It is always typed between the <ul>
                        <li>
                       </ul>
Every <li> tag shows bullets on the web page

Wednesday, 17 August 2011

FORMATTING WITH TEXT IN HTML

TAGS FOR FORMATTING IN HTML
                                    <B>THIS TAG IS USED TO MAKE BOLD THE TEXT IT IS ALWAYS START FROM<B> AND CLOSED WITH</B>
                                    <I>THIS TAG IS USED TO MAKE ITALIC CHARACTERS IT IS ALWAYS START FROM <I> AND CLOSED WITH</I>
                                    <U> THIS TAG IS USED TO MAKE CHARACTERS IN UNDERLINED IT IS ALWAYS START FORM<U> AND CLOSED WITH</U>
                                    <FONT SIZE="TYPE THE NUMBERS FROM 1-7"> THIS TAG IS USED TO INCREASE THE FONT SIZE OF YOUR CHARACTERS, IT IS ALWAYS START FROM <FONT SIZE="4"> AND CLOSED WITH </FONT>
                                    <P> THIS TAG IS USED TO CREATE PARAGRAPH THIS IS SINGLE TAG IT IS ALWAYS START FROM <P> NOT NEED TO CLOSED
ALIGNMENTS:
    THERE ARE FOLLOWING FOUR TYPES OF ALIGNMENTS ARE USED IN HTML

1- LEFT ALIGNMENT :-YOUR TEXT WILL MOVED IN LEFT SIDE OF THE WEB PAGE, IT IS ALWAYS START FROM <P ALIGN="LEFT"> AND CLOSED WITH</LEFT>

2-CENTER ALIGNMENT:-YOUR TEXT WILL MOVED IN THE CENTER  OF THE WEB PAGE, IT IS ALWAYS START FROM <P ALIGN="CENTER"> AND CLOSED WITH</CENTER>

3-RIGHT ALIGNMENT:- YOUR TEXT WILL MOVED IN RIGHT SIDE OF THE WEB PAGE, IT IS ALWAYS START FROM <P ALIGN="RIGHT"> AND CLOSED WITH</RIGHT>

4-JUSTIFY ALIGNMENT:- YOUR TEXT WILL JUSTIFIED OR BALANCED FROM BOTH SIDE(LEFT AND RIGHT SIDE) ON THE WEB PAGE, IT IS ALWAYS START FROM <P ALIGN="JUSTIFY"> AND CLOSED WITH</JUSTIFY>


Basic HTML

HTML
HTML is acronym for hypertext markup language. It is standardized for tagging text files achieving font, color,graphics (images), link and effects on the www (world wide web ) pages. We can display all the thing through tags, attributes, elements.

Tags:- Tags is a simple text character used to identify text on the web page.e.g. <>less then and greater than these sign is known as tags.

Attributes:- which identify the format of the tag you want to apply on the web page. e.g. <p> it is use to make a paragraph.

Element:- In which tag we show the format code start and end is known as element.

Note:- HTML coding is written in the note pad file.

BASIC STRUCTURE OF HTML:-

<HTML> = This is the identification of yours file in which you program is written.

<HEAD>
<title> = If you type anything between the title tags it will show on the title bar of your browser and title tags is also written between the need tags. </title>
</HEAD>

<body> = All the contents written in the body tags shows on your browsers page. </body>
</HTML> = this is the closing of your tags. two types of tags are used to creat web page.
(1) Single tags
(2) Paired tags.
(1) Single tags: Single tag will only start like <p>, <br> etc.
(2) Paired Tags: Paired tags start and end both tags are compulsory to show its cont.. e.g. <b>.......</b>, <i>.........</i> etc.

How to write a HTML Program
click on start - program- accessories-notepad or start- run- type "notepad" in the box- ok
Type the structure of the HTML codes in the notepad.
<html>
<head>
<title>your title</title>
</head>
<body>type your contant</body>
</html>
file- save- type the name of the file with the extension e.g. siss.HTML-save-double click on your browser-file-open-browse-select file where you saved-open-OK

All the contants of that file will show in your browser.

Basic HTML Stretcher  


(source by faizan jamal)