Monday, February 15, 2016

Know english

HERE ARE SOME BASIC:If you want to learn English for both writing and speaking then you should know
 about basic.Here basic means know the essential things.For example sound,word,sentence ,parts of speech etc.
Sound: Sound  that come out from our mouth and help us to express our will.Such as education here three sound create to pronounce education agu +ca+tion.If you want to pronounce education then you need three sounds.And again work + er = worker,pen,love,brother,mena all of them are sound while pronouncing.

Word:Sounds make word.Example:hand,man,book,job,umbrella,bed,population,teacher etc.

Sentence: One or two or more than  word create sentence.Example Rahim have one doll.Here four words create the above sentence.That is our university beside mosque.Here  six words create the above sentence.Follow-->That + is + our + university + beside + mosque.
Parts of speech: When we tell any sentence and  every part of this sentence will be a parts of speech.Parts of speech are eight kinds;they are:noun,pronoun,verb,adverb,adjective,preposition,conjunction,interjection.
 Noun: Noun means name.All names are noun.example:Rana,Man,Pen,Teacher,Runa,Red etc.

Pronoun: Pronoun means that use absent of noun.Example:Rahim is a student.He goes to school every day.
Here 1st sentence Rahim is noun because it is name and 2nd sentence he is pronoun because it is use for Rahim.More pronoun are:she,they,I,you,it etc.

Verb: Any kind of work is verb.example:do,teach,play,eat,write,love,drive,go etc.Above words are verb because they stands work.

Preposition: Preposition means a word which sit before noun and pronoun and helps to add sentence with other words.Example:The color of shirt is nice.Rahim goes to home.We live in Canada.

Adjective:  Adjective means a word which works as a good or bad or number or situation etc of noun or pronoun.Example-The man is tall,The thief are not good,I have a pen.Runa is white.


Adverb: Adverb means a word which uses for verification of an adjective.Example:The girl is very nice.Rana walks slowly.The book is best.
Conjunction: Conjunction means a word which add two or more sentence or subject.Example:Rana and Reza are brothers.He is my friend but senior.Do or die.

Interjection:Interjection understands amazing and have " !"this sign in the end of sentence.Example:Wow! nice to meet you.

First use html

HTML stands for Hyper Text Markup Language. It is used by Internet browsers to display web content in a structured manner. In this module, we focus on HTML4 (HTML 4.01) version of HTML. We would touch upon HTML5 as and when needed. However, a detailed discussion of HTML5 is out of the scope for this module.
HTML is a tag-based language and uses tags to identify its elements. Authoring an HTML document is simply a matter of putting content within the relevant tags. For example, if we have to create a paragraph for some text, we can use the <p> tag to mark the start of the paragraph add the text, and then use the </p> to end the paragraph. In fact, the entire HTML document itself sits within two tags -- it begins with <html> tag and once the entire document is done, it ends with the </html> tag.
Like the above examples of <p> and <html>, majority of HTML elements are identified as a pair of tags: the first tag (the opening tag) marks the beginning of an element and the second tag (the closing tag) marks the ends of that element. However, there are a handful of HTML elements that work just fine even with one single tag. These elements do not enclose any content and hence, all they need is the opening tag. Since they do not enclose any content, they are also known as empty elements, void elements, or singleton elements.
In terms of structure, an HTML document has two prominent tags: head and body. The head section is identified by the <head> and </head> tag-pair and contains meta-information of the HTML page (like say, the title of the page). The body section is identified by the <body> and </body> tag-pair and encloses the actual content of the HTML page. However, these head and body tags are optional. Thus, it is possible to have a valid HTML page that does not contain any these four tags: <head>, </head>, <body>, and </body>!
While content sits within tags that identify HTML elements, tags can additionally have specific modifiers. These modifiers are called attributes. Both tag names and attribute names are case-insensitive. Thus, if we were to write the head element, then both <HEAD> and <head> would mean the same thing. Same is true for attributes.
HTML also provides elements and attributes that focus on accessibility. These constructs help us render content for non-visual readers like non-graphic display terminals, speech synthesizers etc. As we go along, we would make a note as and when we touch upon these elements. When we write an HTML document, it is important that we pay attention to these elements since they would make the document more widely acceptable.

Useing css for it

We can use Cascading Style Sheets (CSS) elements to provide design/style to an HTML or an XHTML page. Since web-pages are (fairly) visual, a good web-page design would go a long way in increasing the usability of your web application. Becoming familiar with CSS allows you to do just that!
When we add a CSS style, we should broadly keep two things in mind. First is the selection of an element (or elements) where we apply the style. Second, is the CSS design that we would apply to the selected element (or elements).
With that, let us see a simple example. The example (provided below) contains one CSS rule that specifies designs for font and color to paragraph (<p>) elements. What this rule says is that if we have any <p> element on the HTML page, then the two design elements would be automatically applied to them. Since the design is applied to all <p> elements on the page, we do not have to add this design individually for each <p> elements. This makes adding design in CSS far more scalable.
 p {
     font-family: Verdana, sans-serif;
     color: blue;
 }
CSS is all about rules. Fortunately, they are different than the ones that our parents ask us to follow! When adding style to a page, we can have a large number of CSS rules; they these rules would look similar to the one above.
Each CSS rule has several components. It is important to understand those. For that, let us use the following figure to get to know the building blocks. This figure breaks down the above CSS rule into its constituent elements.


Figure: Elements of a CSS Rule
In the above figure, the very first member is the element where we are going to apply the design; in this case it is the <p> (paragraph) element. It is the first token (or tokens) before the opening braces and is referred to as the selector (or selectors). Following the selector, we have a pair of braces that contains two lines. Everything that sits between these braces is the selector block. In the above example, the block has two lines. Each line is called a declaration. A block can have as many declarations as needed. Each declaration provides a value to a specific style property. Thus, we can see each line as a property/value pair that is separated by a colon. Do not forget that each declaration line ends with a semi-colon. Together, all of these make up one CSS rule. In case you are wondering, the "font-family" property takes one or more font types, provided in the decreasing order of priority. With this property, we are saying that we would like to use the "Verdana" font as our first preference. If that is unavailable, then we are okay with "sans-serif"! The "color" property sets the text-color to the "blue".
In fact, we can use the same rule and apply it to more than one element! If we wanted to extend the above rule beyond <p> element, then that is as simple as specifying additional elements in the selector list and separate them with commas. With that, let us extend the above rule to include not only paragraphs (<p>) but also ordered lists (<ol>) and unordered lists (<ul>).
 p, ol, ul {
     font-family: Verdana, sans-serif;
     color: blue;
 }
Now that we have covered some of the basics, let us get our hands dirty. We start with a simple HTML page that has, among other things, a simple paragraph. Next, we use a CSS rule to add style to the paragraph element. We reuse the CSS rule in this example from above. So, here is the example.
 <!doctype html>
 <html>
 <head>
     <title> Learning CSS: Getting Started </title>
     <style>
         p {
             font-family: Helvetica, Verdana, sans-serif;
             color: blue;
         }
     </style>
 </head>
 <body>
 <p>
 Tyrannosaurus were a category of carnivorous dinosaurs that lived during the late
 Cretaceous period. They were bipedal reptiles with a massive skull, which was
 balanced by a long and heavy tail. Among them, the mightiest and the deadliest
 were the Tyrannosaurus rex (or T. rex for short). These giants could grow up to
 40 feet in length, up to 20 feet in height, and weigh up to 7 tons.
 </p>
 </body>
 </html>
When we load the page (output provided below), we find that the paragraph text has the font-color as blue and it would also have the text as one of the fonts: "Helvetica", "Verdana", or if they are not available, then the fall-back option of "sans-serif". Pretty much what we expected!

Useing java script for it

Running a JavaScript program is fairly easy. We can embed JavaScript code in an HTML page using tags "<script type="text/javascript">" and "</script>". Any code that sits between these two tags executes in the JavaScript context. And, such a JavaScript code can be placed anywhere in an HTML page and can be placed any number of times. With HTML5, the default script type is assumed to be that of JavaScript, and so we can actually get away with just using the tags <script> and </script> and not explicitly specify the script type as "text/javascript"; we provide "text/javascript" for the sake of completeness. However, HTML4 mandates that we specify the script type.
Since JavaScript is run using a web browser's built-in JavaScript interpreter, there is no need to compile these programs!
We begin by providing below a simple "Hello World!" JavaScript example. As described earlier, we can embed JavaScript code in an HTML file (let us name this file, "hello.html"). This programs prints "Hello World!" in two different styles. In the first style, we use JavaScript's document.write() function to print the string "Hello World!" on the browser. In the second style, we use the innerHTML property of the "idDiv" HTML element to add "Hello World!" to it.
 <!doctype html>
 <html>
 <body>
 <div id="idDiv"> </div>

 <script type="text/javascript"> 
 <!--  Needed for old-browsers that do not understand Javascript.

 // Get a handle of the div element.
 var elem = document.getElementById("idDiv");
 elem.innerHTML +=  "Hello World! <br>";

 document.write("Hello World! <br>");
 // -->
 </script>

 </body>
 </html>
We present two different styles to print "Hello World!" for a good reason.
The first style uses the write() method of the document object and this method prints text on the HTML page. This method was a popular method in the past but its use now is discouraged due to the possibility of it erasing all the contents on a page. Therefore, we would not be using document.write() henceforth.
The second method uses getElementById() method of the document object to get a handle of the "div" element of the HTML body. Next, it adds to the innerHTML property of the "div" element. This method is safe and does not erase existing content. In our examples, we will use innerHTML method for printing text on the page.
Note that we will describe the document object, document.write() method, document.getElementById() method, and innerHTML property in a later section. If you feel overwhelmed, please make a note of these methods and once you have read the later sections, these methods would start to make complete sense!
In-between the script tags, the above example has two lines, one starting with "<!--" and the other one having "// -->". This is a workaround to handle (old) browsers that are incompatible with JavaScript. With this workaround, these browsers see JavaScript code lying between "<!--" and "-->" as HTML comments and thus, ignore it. In that case, why do JavaScript-compatible browsers not see this code as comments? Well, JavaScript engine has a hack for this. It is acceptable for JavaScript code to keep the string "<!--" at the start of the script code and JavaScript simply ignores everything in this line. Now, the last line starts with "//" and since "//" indicates JavaScript comments, JavaScript ignores everything on that line as well. This way, JavaScript does not complain about HTML's closing comment tag, "-->"! Thus, this workaround allows JavaScript compatible browsers to run JavaScript code and JavaScript incompatible browsers to ignore it.
In the above example, we end each line with a semicolon; each of these lines are referred to as a statement. In JavaScript, it is not required to end each line with a semicolon, but when we provide a semicolon, JavaScript does interpret that as an end of statement. While it is okay to not provide semicolon, for cases that have a statement spread over multiple lines, a lack of semicolon can sometimes lead to unknown behavior. Without a semicolon, JavaScript can parse a statement spread over multiple lines as long as it considers them to be making a valid expression. It is this behavior that can potentially lead to confusion! For this reason, we always use a semicolon at the end of each line and we also recommend the same!

Useing php for it

Before we proceed further, let us understand the steps to run a PHP program. Typically, a PHP code is embedded in an HTML page using tags "<?php" and "?>". Any code that sits between these two tags executes in the PHP context. Such a PHP code can be placed anywhere in an HTML page and can be placed any number of times as needed in an HTML page. Since PHP is an interpreter based language, there is no need to compile these programs!
We provide below a simple PHP "Hello World!" program. As mentioned above, we embed this program in an HTML file (let us call this file, "hello.php"). This program uses a PHP function "echo" to print the string "Hello World!"; when run, the output would get displayed on the browser. The line that contains the echo function is terminated by a semicolon and is often referred to as a statement.
 <!doctype html>
 <html>
 <body>
 <?php
 echo "Hello World! <br>";
 ?>
 </body>
 </html>
We need to follow a handful of steps to run this program.
First, we need to store this file at a location that is accessible to the web server (in Fedora/Red Hat Linux, the default location for web server is "/var/www/html"). Second, we need to ensure that the web server itself is running (in Fedora/Red Hat Linux, we can use "service httpd status" to see if the web server is running). If the web server is not running, then we need to start it (in Fedora/Red Hat Linux, we can use "service httpd start" to start the web server). Lastly, we need to load this file from a browser ("http://localhost/hello.php").
When we load this file, the web server would run the PHP code. Here is the output: