COURSE CONTENT
Module I: HTML - General Introduction to Internet and WWW; HTML: Structured language,
Document types, Rules of html, Html tags, Head tags, Body tags, Headings, Divisions and
Centering, Quotations, Preformatted text, Lists, Horizontal Rules, Block level elements, Text
level elements,Character entities, Comments, Fonts, Tables: Table tags, Colors, Color names,
Color values, Marquee
tag. Advanced HTML - Linking in html: Anchor tags, Layer tags, Link relationships, URL:
Relative, Absolute, Image, Image maps, Frames: Layouts, Targeting, No frame tag, Floating
frames, Audio, Embed tag, Forms: form tag and its attributes.
Module II: CSS: Style sheet Basics, Adding Style to a Document, CSS (Cascading Style Sheet)
and HTML Elements, Selectors, Document Structure and Inheritance.
Javascript - Introduction to Javascript, Variables and data types, Declaring Variables,
Operators, Control Structures, Conditional Statements, Loop Statements, Functions, Objects,
Dialog Boxes, Alert Boxes, Confirm Boxes, Prompt Boxes, Javascript with HTML, Events,
Introduction to DHTML-Components, Uses, Features.
Module III: PHP: Overview of PHP, The building blocks of PHP: variables, globals & super
globals
Data types: Set type, type casting, test type, Operators & Expressions, Flow control functions in
PHP,
Functions: Defining a function variable scope, calling a function returning values, setting default
values for arguments, passing variable reference, built in functions
Module IV: Arrays: Creating arrays (associative & multidimensional), Array related functions.
Working with Objects, Working with string functions: Formatting strings, Using Date and Time
functions.
Forms in PHP: Form elements, adding elements to a form, creating a simple input form,
combining HTML & PHP code on a single page
redirecting the user, creating a send mail form, File upload form, working with files and
directories.
Cookies: Introduction, different types of cookies, setting a cookie with PHP, deleting a cookie
session function overview: starting a session, working with session variables.
General Introduction to Internet and WWW
ARPANET
Network giants: British Telecom, AT & T
Servers :
Clients :
Web server software: IIS, Apache Webserver etc.
Web client software (browser) : IE, Chrome, Mozilla firefox
TCP / IP
Internet Domain:
Internet Gateway
InterNIC:
NCST:
Inter NIC Root Servers:
Establishing connectivity on the internet:
CLient IP address , (ISP),
IP address and domain name
Resolving Domain name :
The structure of an Internet Address
HTML: Structured language,
Document types, Rules of html, Html tags, Head tags, Body tags,
HTML tags
Paired tag
Singular tag
The html structure : html, head , body tags.
The <a> tag defines a hyperlink.
The href attribute specifies the URL of the page the link goes to:
<img> tag, The <img> tag should also contain
the width and height attributes.
The style attribute is used to add styles to an element, such as color, font,
size, and more.
The lang Attribute : You should always include the lang attribute inside
the <html> tag, to declare the language of the Web page. This is meant to
assist search engines and browsers.
All HTML elements can have attributes
The href attribute of <a> specifies the URL of the page the link goes to
The src attribute of <img> specifies the path to the image to be
displayed
The width and height attributes of <img> provide size information for
images
The alt attribute of <img> provides an alternate text for an image
The style attribute is used to add styles to an element, such as color,
font, size, and more
The lang attribute of the <html> tag declares the language of the Web
page
The title attribute defines some extra information about an element.
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important
heading
Paragraph breaks: <p>
The browser moves onto a new line, skipping one line between the previous
line and the new line.
Line breaks : <BR>
When the text needs to start from a new line.
OTHER TEXT EFFECTS
CENTERING( Text, Images)
https://www.geeksforgeeks.org/html-center-tag/
The <center> tag was used in HTML4 to center-align text.
The <center> tag in HTML is used to set the alignment of text into the
center. This tag is not supported in HTML5. CSS’s property is used to set the
alignment of the element instead of the center tag in HTML5.
Syntax:
<center> Contents... </center>
Center-align text (with CSS):
<style>
h1 {text-align: center;}
p {text-align: center;}
div {text-align: center;}
</style>
Quotations, https://www.w3schools.com/html/html_quotation_elements.asp
HTML Quotation and Citation Elements
Tag Description
<abbr> Defines an abbreviation or acronym
<address> Defines contact information for the author/owner of a documen
<bdo> Defines the text direction
<blockquote> Defines a section that is quoted from another source
<cite> Defines the title of a work
<q> Defines a short inline quotation
Pre formatted text,
https://www.w3schools.com/tags/tag
The <pre> tag defines preformatted text.
Text in a <pre> element is displayed in a fixed-width font, and the text
preserves both spaces and line breaks. The text will be displayed exactly as
written in the HTML source code.
Tag Description
<code> Defines a piece of computer code
<samp> Defines sample output from a computer program
<kbd> Defines keyboard input
<var> Defines a variable
Lists https://www.w3schools.com/html/html_lists.asp
HTML lists allow web developers to group a set of related items in lists.
1. Unordered HTML List
2. Ordered HTML List
3. HTML Description Lists
Horizontal Rules, https://www.w3schools.com/tags/tag_hr.asp
Block level elements, https://www.w3schools.com/html/html_blocks.asp
7/4/2023
Text level elements, https://www.w3schools.com/html/html_formatting.asp
Character entities, https://www.w3schools.com/html/html_entities.asp
Comments, https://www.w3schools.com/html/html_comments.asp
Fonts, https://www.w3schools.com/tags/tag_font.asp
Tables: Table tags,
https://www.w3schools.com/html/html_tables.asp
https://www.w3schools.com/html/html_table_borders.asp
https://www.w3schools.com/html/html_table_sizes.asp
https://www.w3schools.com/html/html_table_headers.asp
https://www.w3schools.com/html/html_table_padding_spacing.asp
https://www.w3schools.com/html/html_table_colspan_rowspan.asp
https://www.w3schools.com/html/html_table_styling.asp
https://www.w3schools.com/html/html_table_colgroup.asp
Colors, Color names, Color values, https://www.w3schools.com/colors/default.asp
Marquee tag. https://www.w3schools.in/html/marquee-tag
Advanced HTML
Linking in html: Anchor tags https://www.w3schools.com/tags/tag_a.asp
Layer tags https://www.tutorialspoint.com/html/html_layer_tag
Link relationships, https://www.w3schools.com/tags/att_link_rel.asp
URL: Relative, Absolute,
How do you add an absolute URL in HTML?
Attribute Values
An absolute URL - points to another web site
(like href="http://www.example.com/theme.css") A relative URL - points to a file
within a web site (like href="/themes/theme. css")
Image, https://www.w3schools.com/html/html_images.asp
Image maps, https://www.w3schools.com/html/html_images_imagemap.asp
Frames: Layouts, Targeting, https://www.tutorialspoint.com/html/html_frames.htm
No frame tag, https://www.geeksforgeeks.org/html-noframes-tag/
Floating frames https://www.w3schools.com/html/html_iframe.asp
Audio, Embed tag, https://www.w3schools.com/html/html5_audio.asp
Forms: form tag and its attributes. https://www.w3schools.com/tags/tag_form.asp
Module 2
https://www.w3schools.com/htmL/html_css.asp
http://web.simmons.edu/~grabiner/comm244/weekfour/css-concepts.html
CSS Selectors
CSS selectors are used to "find" (or select) the HTML elements you want to
style.
We can divide CSS selectors into five categories:
Simple selectors (select elements based on name, id, class)
Combinator selectors (select elements based on a specific relationship
between them)
Pseudo-class selectors (select elements based on a certain state)
Pseudo-elements selectors (select and style a part of an element)
Attribute selectors (select elements based on an attribute or attribute
value)
https://www.w3schools.com/css/css_selectors.asp
https://www.w3schools.com/css/css_combinators.asp
https://www.w3schools.com/css/css_pseudo_classes.asp
https://www.w3schools.com/css/css_pseudo_elements.asp
https://www.w3schools.com/css/css_attribute_selectors.asp
What is PHP?
PHP is an acronym for "PHP: Hypertext Preprocessor"
PHP is a widely-used, open source scripting language
PHP scripts are executed on the server
PHP is free to download and use
What is a PHP File?
PHP files can contain text, HTML, CSS, JavaScript, and PHP code
PHP code is executed on the server, and the result is returned to the
browser as plain HTML
PHP files have extension ".php"
What Can PHP Do?
PHP can generate dynamic page content
PHP can create, open, read, write, delete, and close files on the server
PHP can collect form data
PHP can send and receive cookies
PHP can add, delete, modify data in your database
PHP can be used to control user-access
PHP can encrypt data
Why PHP?
PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
PHP is compatible with almost all servers used today (Apache, IIS,
etc.)
PHP supports a wide range of databases
PHP is free. Download it from the official PHP resource: www.php.net
PHP is easy to learn and runs efficiently on the server side
A PHP script is executed on the server, and the plain HTML result is sent back to
the browser.
A PHP script can be placed anywhere in the document.
A PHP script starts with <?php and ends with ?>
<html>
<body>
<h1>My first PHP page</h1>
<?php
echo "Hello World!";
?>
</body>
</html>
PHP Case Sensitivity
In PHP, keywords (e.g. if, else, while, echo, etc.), classes, functions, and
user-defined functions are not case-sensitive.
Comments in PHP
single-line comments,
// This is a single-line comment
# This is also a single-line comment
multiple-line comments, /*
This is a multiple-lines comment block
that spans over multiple
lines
*/
Creating (Declaring) PHP Variables
In PHP, a variable starts with the $ sign, followed by the name of the variable
PHP Variables
A variable can have a short name (like x and y) or a more descriptive name
(age, carname, total_volume).
Rules for PHP variables:
A variable starts with the $ sign, followed by the name of the variable
A variable name must start with a letter or the underscore character
A variable name cannot start with a number
A variable name can only contain alpha-numeric characters and
underscores (A-z, 0-9, and _ )
Variable names are case-sensitive ($age and $AGE are two different
variables)
Remember that PHP variable names are case-sensitive!
Output Variables
The PHP echo statement is often used to output data to the screen.
PHP Variables Scope
In PHP, variables can be declared anywhere in the script.
The scope of a variable is the part of the script where the variable can be
referenced/used.
PHP has three different variable scopes:
local
global
static
Global and Local Scope
A variable declared outside a function has a GLOBAL SCOPE and can only be
accessed outside a function:
A variable declared within a function has a LOCAL SCOPE and can only be
accessed within that function:
PHP The global Keyword
The global keyword is used to access a global variable from within a function.
To do this, use the global keyword before the variables (inside the function):
<?php
$x = 5;
$y = 10;
function myTest() {
global $x, $y;
$y = $x + $y;
}
myTest();
echo $y; // outputs 15
?>
PHP also stores all global variables in an array called $GLOBALS[index].
The index holds the name of the variable. This array is also accessible from
within functions and can be used to update global variables directly.
PHP The static Keyword
Normally, when a function is completed/executed, all of its variables are
deleted. However, sometimes we want a local variable NOT to be deleted. We
need it for a further job.
PHP echo and print Statements
echo and print are more or less the same. They are both used to output
data to the screen.
The differences are small: echo has no return value while print has a return
value of 1 so it can be used in expressions. echo can take multiple
parameters (although such usage is rare) while print can take one
argument. echo is marginally faster than print.
The echo statement can be used with or without
parentheses: echo or echo().
The PHP print Statement
The print statement can be used with or without
parentheses: print or print().
PHP Data Types
PHP Data Types
Variables can store data of different types, and different data types can do
different things.
PHP supports the following data types:
String
Integer
Float (floating point numbers - also called double)
Boolean
Array
Object
NULL
Resource
PHP String
A string is a sequence of characters.
A string can be any text inside quotes. You can use single or double
quotes.
Eg: $x = "Hello world!";
PHP Integer
An integer data type is a non-decimal number between -2,147,483,648 and
2,147,483,647.
Rules for integers:
An integer must have at least one digit
An integer must not have a decimal point
An integer can be either positive or negative
Integers can be specified in: decimal (base 10), hexadecimal (base
16), octal (base 8), or binary (base 2) notation
Eg: $x = 5985;
PHP Float
A float (floating point number) is a number with a decimal point or a number
in exponential form.
$x = 10.365;
PHP Boolean
A Boolean represents two possible states: TRUE or FALSE.
$x = true;
$y = false;
PHP Array
An array stores multiple values in one single variable.
$cars = array("Volvo","BMW","Toyota");
PHP Object
Classes and objects are the two main aspects of object-oriented
programming.
A class is a template for objects, and an object is an instance of a class.
PHP NULL Value
Null is a special data type which can have only one value: NULL.
PHP Resource
The special resource type is not an actual data type. It is the storing of a
reference to functions and resources external to PHP.
A common example of using the resource data type is a database call.
PHP String Functions
strlen() - Return the Length of a String
echo strlen("Hello world!"); // outputs 12
str_word_count() - Count Words in a String
echo str_word_count("Hello world!"); // outputs 2
The PHP strrev() function reverses a string.
echo strrev("Hello world!"); // outputs !dlrow olleH
strpos() - Search For a Text Within a String
echo strpos("Hello world!", "world"); // outputs 6
str_replace() - Replace Text Within a String
The PHP str_replace() function replaces some characters with some
other characters in a string.
echo str_replace("world", "Dolly", "Hello world!"); // outputs Hello
Dolly!
Fourth module
Three types of arrays https://www.w3schools.com/php/php_arrays.asp
Array functions https://www.w3schools.com/php/php_arrays_sort.asp
Working with objects https://www.w3schools.com/php/php_oop_classes_objects.asp
Working with string functions: Formatting strings
https://www.w3schools.com/php/func_string_printf.asp
PHP Strings https://www.w3schools.com/php/php_string.asp
String functions https://www.w3schools.com/php/php_ref_string.asp
date and time https://www.w3schools.com/php/php_date.asp
Form Handling https://www.w3schools.com/php/php_forms.asp
Form Validation https://www.w3schools.com/php/php_form_required.asp
PHP Forms - Required Fields https://www.w3schools.com/php/php_form_required.asp
Redirecting : https://www.geeksforgeeks.org/how-to-make-a-redirect-in-php
Sending email : https://www.w3schools.com/php/func_mail_mail.asp
File upload: https://www.w3schools.com/php/php_file_upload.asp
File handling: https://www.w3schools.com/php/php_file.asp
Directories: https://www.w3schools.com/php/php_ref_directory.asp
Cookies: https://www.w3schools.com/php/php_cookies.asp
session function : https://www.w3schools.com/php/php_sessions.asp