Thursday 31 December 2015

Java Script

Last Post was done with HTML,CSS .

Let Begin with Java Script


JAVA SCRIPT
 
 Why we need to study java script ?

 We learnt about HTML which is used to define the content of web pages
 And  CSS to specify the layout of web pages,now
 JavaScript to program the behavior of web pages
 This tutorial is about JavaScript.

 > Method to use Javascript in HTML : getElementById().

In This example uses the method to "find" an HTML element (with id="demo"), and changes the element content (innerHTML) to "Hello JavaScript":

Example

document.getElementById("demo").innerHTML = "Hello JavaScript";

 ( Notice the capital and small letters)


> Method to use Javascript in HTML,form of CSS: getElementById().

Example

document.getElementById("demo").style.fontSize = "20px";
 
 
 
 
The SCRIPT Tag :
 
 
In HTML, JavaScript code must be inserted between <script> and </script> tags.

Example

<script>
document.getElementById("demo").innerHTML = "My First JavaScript";
</script>
 
 
The next part will be continued in the next session of the blog...!!

Thursday 15 October 2015

Html part3

Html #part3 

  CSS Tutorial

 CSS is a stylesheet language that describes the presentation of an HTML (or XML) document.

 

Example

body {
    background-color: #d0f5fs;
}

h1 {
    color: orange;
    text-align: center;
}

p {
    font-family: "Times New Roman";
    font-size: 30px;
}

 

What is CSS?

  • CSS stands for Cascading Style Sheets
  • CSS describes how HTML elements are to be displayed on screen, paper, or in other media.
  • CSS also saves lot of work. 

     CSS Syntax

    A CSS rule set consists of a selector and a declaration block:

    H1 {color:blue; font-size:12px;}

    Selector : H1
    Declaration: Color:blue, font-size:12px

    The selector points to the HTML element you want to style.
    The declaration block contains one or more declarations separated by semicolons.
    Each declaration includes a property name and a value, separated by a colon.


    Three Ways to Insert CSS

    There are three ways of inserting a style sheet:
  • External style sheet
  • Internal style sheet
  • Inline style

    External Style Sheet

    With an external style sheet, you can change the look of an entire website by changing just one file!
    Each page must include a reference to the external style sheet file inside the <link> element. The <link> element goes inside the head section:

    <head>
    <link rel="stylesheet" type="text/css" href="mystyle.css">
    </head>
     
    An external style sheet can be written in any text editor. The file should not contain any html tags. The style sheet file must be saved with a .css extension. An example of a style sheet file called "myStyle.css", is shown below:
     
    body {
        background-color: lightblue;
    }

    h1 {
        color: navy;
        margin-left: 20px;
    }
     

    Internal Style Sheet

    An internal style sheet may be used if one single page has a unique style.
    Internal styles are defined within the <style> element, inside the head section of an HTML page:

    <head>
    <style>
    body
    {
        background-color: linen;
    }

    h1 {
        color: maroon;
        margin-left: 40px;
    }
    </style>
    </head>
     
     

    Inline Styles

    An inline style may be used to apply a unique style for a single element.
    An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly!
    To use inline styles, add the style attribute to the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a <h1> element:

    <h1 style="color:blue;margin-left:30px;">This is a heading.</h1>
     
    include this code in html file itself.

Saturday 26 September 2015

Html #part2:

HTML Text Color

The color property defines the text color to be used for an HTML element:

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


HTML Fonts

The font-family property defines the font to be used for an HTML element:

<h1 style="font-family:verdana">This is a heading</h1>

HTML Text Size

The font-size property defines the text size to be used for an HTML element:

<h1 style="font-size:200%">This is a heading</h1>

HTML Text Alignment

The text-align property defines the horizontal text alignment for an HTML element:

<h1 style="text-align:center">Centered Heading</h1>
 <h1 style="text-align:left">Left Heading</h1 
><h1 style="text-align:right">Right Heading</h1>


HTML  Formatting : 

Subscript

The HTML <sub> element defines subscripted text.

 <p>This is <sub>subscripted</sub> text.</p>


Superscript:

<p>This is <sup>superscripted</sup> text.</p>

HTML <q> for Short Quotations

The HTML <q> element defines a short quotation.

<p>WWW.: <q>Tihs is text from www.blackfacers.blogspot.com.</q></p>

HTML <abbr> for Abbreviations

The HTML <abbr> element defines an abbreviation or an acronym.

<p>The <abbr title="End Of  File">EOF</abbr></p>
 
 

HTML Comment Tags

<!-- Write your comments here -->


 

 




Friday 25 September 2015

Learning HTML: #part 1


What is HTML?

HTML is a markup language for describing web documents (web pages).
  • HTML stands for Hyper Text Markup Language
  • A markup language is a set of markup tags
  • HTML documents are described by HTML tags
  • Each HTML tag describes different document content

HTML Tags

HTML tags are keywords (tag names) surrounded by angle brackets:
<tagname>content</tagname>
  • HTML tags normally come in pairs like <p> and </p>
  • The first tag in a pair is the start tag, the second tag is the end tag
  • The end tag is written like the start tag, but with a slash before the tag name
The tags used in above example are explained here:
Open the Notepad++ file
type the following code

<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>


save the file with .html extension
for example: sample.html


HTML can be edited by using professional HTML editors like:
  • Microsoft WebMatrix
  • Sublime Text
For learning HTML we recommend a text editor like Notepad (PC) or TextEdit (Mac).

The DOCTYPE declaration defines the document type to be HTML
The text between <html> and </html> describes an HTML document
The text between <head> and </head> provides information about the document
The text between <title> and </title> provides a title for the document
The text between <body> and </body> describes the visible page content
The text between <h1> and </h1> describes a heading
The text between <p> and </p> describes a paragraph


HTML Headings

HTML headings are defined with the <h1> to <h6> tags:
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
so on.....

HTML Links

HTML links are defined with the <a> tag:
<a href="www.blackfacers.blogspot.com">This is a link</a>

HTML Images

HTML images are defined with the <img> tag.
<img src="blackfacers.jpg" alt="blogspot.com" width="104" height="142">

 

 

Saturday 14 March 2015

Pyhton



Python can be easy to pick up whether you're a first time programmer or you're experienced with other languages. The following pages are a useful first step to get on your way writing programs with Python!

The community hosts conferences and meetups, collaborates on code, and much more. Python's documentation will help you along the way, and the mailing lists will keep you in touch.

The Python Package Index (PyPI) hosts thousands of third-party modules for Python. Both Python's standard library and the community-contributed modules allow for endless possibilities.

Python is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. Python's license is administered by the Python Software Foundation.


To download:
https://www.python.org/about/ 
(Direct link)
https://www.python.org/downloads/