HTML TUTORIALS

start learning

CSS TUTORIALS

start learning

JAVA SCRIPT TUTORIALS

start learning

PHP TUTORIALS

start learning

Monday 31 October 2016

HTML BASIC

HTML Basic Examples


Don't worry if these examples use tags you have not learned.
You will learn about them in the next chapters.

HTML Documents

All HTML documents must start with a document type declaration: <!DOCTYPE html>.
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.

Example

<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
Try it Yourself »

HTML Headings

HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading: 

Example

<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
Try it Yourself »

HTML Paragraphs

HTML paragraphs are defined with the <p> tag:

Example

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Try it Yourself »

HTML Links

HTML links are defined with the <a> tag:

Example

<a href="http://www.w3schools.com">This is a link</a>
Try it Yourself »
The link's destination is specified in the href attribute
Attributes are used to provide additional information about HTML elements.

HTML Images

HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:

Example

<img src="w3schools.jpg" alt="W3Schools.com" width="104" height="142">
Try it Yourself »

HTML EDITORS

HTML Editors


Write HTML Using Notepad or TextEdit

Web pages can be created and modified by using professional HTML editors.
However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).
We believe using a simple text editor is a good way to learn HTML.
Follow the four steps below to create your first web page with Notepad or TextEdit.

Step 1: Open Notepad (PC)

Windows 8 or later:
Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.
Windows 7 or earlier:
Open Start > Programs > Accessories > Notepad

Step 1: Open TextEdit (Mac)

Open Finder > Applications > TextEdit
Also change some preferences to get the application to save files correctly. In Preferences > Format >choose "Plain Text"
Then under "Open and Save", check the box that says "Ignore rich text commands in HTML files".
Then open a new document to place the code.

Step 2: Write Some HTML

Write or copy some HTML into Notepad.
<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>
Notepad

Step 3: Save the HTML Page

Save the file on your computer. Select File > Save as in the Notepad menu.
Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).
View in Browser
You can use either .htm or .html as file extension. There is no difference, it is up to you.

Step 4: View the HTML Page in Your Browser

Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with").
The result will look much like this:
View in Browser

Tuesday 25 October 2016

PHP TUTORIAL

PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

Easy Learning with "Show PHP"

Image result for php tutorialOur "Show PHP" tool makes it easy to learn PHP, it shows both the PHP source code and the HTML output of the code.

Example

<!DOCTYPE html>
<html>
<body>

<?php
echo "My first PHP script!";
?>


</body>
</html>
Run example »
Click on the "Run example" button to see how it works.

PHP 5 References

At W3Schools you will find complete references of all PHP functions:

JAVA SCRIPT TUTORIALS

JavaScript is the programming language of HTML and the Web.
Programming makes computers do what you want them to do.
JavaScript is easy to learn.
This tutorial will teach you JavaScript from basic to advanced.

Image result for javascript tutorial Examples in Each Chapter

With our "Try it Yourself" editor, you can change all examples and view the results.

Example

My First JavaScript


We recommend reading this tutorial, in the sequence listed in the left menu.

Learn by Examples

Examples are better than 1000 words. Examples are often easier to understand than text explanations.
This tutorial supplements all explanations with clarifying "Try it Yourself" examples.
If you try all the examples, you will learn a lot about JavaScript, in a very short time!

Why Study JavaScript?

JavaScript is one of the 3 languages all web developers must learn:
   1. HTML to define the content of web pages
   2. CSS to specify the layout of web pages
   3. JavaScript to program the behavior of web pages
This tutorial is about JavaScript, and how JavaScript works with HTML and CSS.

Learning Speed

In this tutorial, the learning speed is your choice.
Everything is up to you.
If you are struggling, take a break, or reread the material.
Always make sure you understand the "Try-it-Yourself" examples and exercises.

JavaScript References

W3Schools maintains a complete JavaScript reference, including all HTML DOM, and browser objects.
The reference contains examples for all objects, properties, and methods, and is continuously updated according to the latest web standards.

JavaScript Quiz Test

Test your JavaScript skills at W3Schools!

Did You Know?

JavaScript and Java are completely different languages, both in concept and design.
JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997.
ECMA-262 is the official name. ECMAScript 2016 (June 2016) is the latest JavaScript version.

HTML INTRODUCTION

What is HTML?

HTML is the standard markup language for creating Web pages.
    Image result for html introduction
  • HTML stands for Hyper Text Markup Language
  • HTML describes the structure of Web pages using markup
  • HTML elements are the building blocks of HTML pages
  • HTML elements are represented by tags
  • HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
  • Browsers do not display the HTML tags, but use them to render the content of the page

A Simple HTML Document

Example

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

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
Try it Yourself »

Example Explained

  • The <!DOCTYPE html> declaration defines this document to be HTML5
  • The <html> element is the root element of an HTML page
  • The <head> element contains meta information about the document
  • The <title> element specifies a title for the document
  • The <body> element contains the visible page content
  • The <h1> element defines a large heading
  • The <p> element defines a paragraph

HTML Tags

HTML tags are element names surrounded by angle brackets:
<tagname>content goes here...</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 forward slash inserted before the tag name
Tip: The start tag is also called the opening tag, and the end tag the closing tag.

Web Browsers

The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.
The browser does not display the HTML tags, but uses them to determine how to display the document:
View in Browser

HTML Page Structure

Below is a visualization of an HTML page structure:
<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>
Note: Only the content inside the <body> section (the white area above) is displayed in a browser.

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
The <!DOCTYPE> declaration is not case sensitive.
The <!DOCTYPE> declaration for HTML is:
<!DOCTYPE html>

HTML Versions

Since the early days of the web, there have been many versions of HTML:
VersionYear
HTML1991
HTML 2.01995
HTML 3.21997
HTML 4.011999
XHTML2000
HTML52014

HTML5 Tutorial

With HTML you can create your own Web site.
This tutorial teaches you everything about HTML.
HTML is easy to learn - You will enjoy it.

Examples in Every Chapter

This HTML tutorial contains hundreds of HTML examples.
With our online HTML editor, you can edit the HTML, and click on a button to view the result.

Example

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

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

</body>
</html>
Try it Yourself »
Click on the "Try it Yourself" button to see how it works.

HTML Examples

At the end of the HTML tutorial, you can find more than 200 examples.
With our online editor, you can edit and test each example yourself.

CSS SELECTORS

A CSS selector is a pattern to match the elements in an HTML document. The associated style rules is applied to the elements that match the selector pattern.

What is Selector

Image result for css sELECTORSSelectors are one of the most important aspects of CSS as they are used to select elements on a web page so that they can be styled. You can define selectors in various ways.

Universal Selector

The universal selector, written as '*' i.e. asterisk or star symbol, matches every single element on the page. The universal selector may be omitted if other conditions exist on the target element. This selector is often used to remove the default margins and paddings from the elements for quick testing purpose.
  • * {
  •     margin: 0;
  •     padding: 0;
  • }
The style rules inside the '*' selector will be applied to every element in a document.
Note:It is not recommended to use the universal selector '*' in a production environment, since this selector matches every element on a page that puts too much of unnecessary pressure on the browsers.

Element Type Selector

An element type selector matches every instance of the element in the document tree with the corresponding element type name.
  • p {
  •     color: blue;
  • }
The style rules inside the 'p' selector will be applied on every <p> element in the document and color it blue, regardless of their position in the document tree.

Id Selectors

The id selector is used to define style rules for a single or unique element.
The id selector is defined with a '#' (hash) sign immediately followed by the id value.
  • #error {
  •     color: red;
  • }
This style rule renders the text of an element in red, whose 'id' attribute is set to 'error'.

Class Selectors

The class selectors can be used to select any HTML element that has a class attribute. All the elements having that class will be formatted according to the defined rule.
The class selector is defined with a '.' (period) sign immediately followed by the class value.
  • .blue {
  •     color: blue;
  • }
The above style rules renders the text in blue of every element in the document that has 'class' attribute set to 'blue'. You can make it a bit more particular. For example:
  • p.blue {
  •     color: blue;
  • }
The style rule inside the selector 'p.blue' renders the text in blue of only those <p> elements that has 'class' attribute set to 'blue', and has no effect on other paragraphs.

Descendant Selectors

You can use these selectors when you need to select an element that is the descendant of another element. For example, if you want to target only those anchors that are contained within an unordered list, rather than targeting all anchor elements.
  • ul.menu li a {
  •     text-decoration: none;
  • }
  • h1 em {
  •     color: green;
  • }
The style rules inside the selector 'ul.menu li a' applied to only those <a> i.e. anchor elements that contained inside an unordered list having the class '.menu', and has no effect on other links inside the document. Similarly, the style rules inside the 'h1 em' selector applied to only <em> elements that contained inside heading <h1>.

Child Selectors

A child selector can be used to select only those elements that are the direct children of some element. A child selector is made up of two or more selectors separated by the greater than symbol (i.e. ">"). You can use these selectors for example, to select the first level of list elements inside a nested list that has more than one level.
  • ul > li {
  •     list-style: square;
  • }
  • ul > li ol {
  •     list-style: none;
  • }
The style rule inside the selector 'ul > li' applied to only those <li> elements that are direct children of the <ul> elements, and has no effect on other list elements.

Adjacent Sibling Selectors

The adjacent sibling selectors can be used to select sibling elements. This selector has the syntax like: E1 + E2, where E2 is the target of the selector.
The selector h1 + p in the example below will select the <p> elements only if both the <h1> and<p> elements share the same parent in the document tree and <h1> is immediately precedes the <p> element. That means only those paragraphs that come immediately after each <h1>heading will have the associated style rules.
  • h1 + p {
  •     color: blue;
  •     font-size: 18px;
  • }
  • ul.task + p {
  •     color: #f0f;
  •     text-indent: 30px;
  • }

General Sibling Selectors

The general sibling selector is similar to the adjacent sibling selector (E1 + E2), but it's less strict. A general sibling selector is made up of two simple selectors separated by the "tilde" () character. It can be written like: E1 ∼ E2, where E2 is the target of the selector.
The selector h1 ∼ p in the example below will select all the <p> elements that preceded by the<h1> element, where all the elements share the same parent in the document tree.
  • h1  p {
  •     color: blue;
  •     font-size: 18px;
  • }
  • ul.task  p {
  •     color: #f0f;
  •     text-indent: 30px;
  • }
There are more selectors like attribute selectorspseudo-classespseudo-elements. We will discuss about these selectors in upcoming chapters.

Grouping Selectors

Often several selectors in a style sheet share the same style rules declarations. You can group them into a comma-separated list to minimize the code in your style sheet. It also prevents you from repeating the same style rules over and over again.
  • h1 {
  •     font-size: 36px;
  •     font-weight: normal;
  • }
  • h2 {
  •     font-size: 28px;
  •     font-weight: normal;
  • }
  • h3 {
  •     font-size: 22px;
  •     font-weight: normal;
  • }
As you can see in the above example, the same style rule 'font-weight: normal' is shared by the selectors h1h2 and h3. So, it can be grouped in a comma-separated list, like this:
  • h1, h2, h3 {
  •     font-weight: normal;
  • }
  • h1 {
  •     font-size: 36px;
  • }
  • h2 {
  •     font-size: 28px;
  • }
  • h3 {
  •     font-size: 22px;
  • }

 

Subscribe to our Newsletter

Contact our Support

Email us: kwofiee3@gmail.com

Our Team Memebers