0% found this document useful (0 votes)
22 views5 pages

Web Tech CH 1

Gf

Uploaded by

faimp212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

Web Tech CH 1

Gf

Uploaded by

faimp212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

INTRODUCTION to HTML

HTML stands for HyperText Markup Language. HTML is the standard markup language used for
creating Web pages.

Features of HTML :
- HTML is a very easy and simple language and can be easily understood and modified.
- It is a markup language so it provides a flexible way to design web pages.
- It is platform-independent because it can be displayed on any platform like Windows,
Linux and Macintosh etc.
- IN html YOU CAN add Graphics, Videos, and Sound to the web pages which makes it more
attractive and interactive.
- it is very easy to make effective presentation with HTML because it has a lot of formatting
tags.
CSS (CASCADING STYLE SHEET) :
• CSS is a standard language used for describing the presentation of the web pages.
• The purpose of CSS is to make attractive web pages and increase look and feel of them.
• Cascading style sheets is a language used to describe the look and formatting of a web
document written in a markup language.
Advantages of CSS :
CSS Saves Time, Pages Load Faster , Easy Maintenance, Superior Styles to HTML:,
Multiple Device Compatibility: , Global Web Standard, Control on Web Page:, Browser
Support:
Inline CSS :
• An inline CSS is used to apply a unique style to a single HTML element. In HTML document
we can add inline CSS by using the style attribute inside HTML elements.
Embedded (Internal) CSS :
• An internal CSS is used to define a style for a single HTML page.
• An internal CSS is defined in the section of an HTML page, within a
External CSS:
• External CSS contains only CSS code and is saved with a ".css" file extension. This CSS file is
referred from HTML file using the tag.
• To use an external style sheet, add a tag in the section of each HTML page.
Web Server :
• The web is a collection of files known as web pages. These web pages (or web site) reside
on a computer known as a web server.
• A web server interacts with the client through the web browser and processes requests,
sent by the client.
• The primary function of a web server is to store, process and deliver web pages to clients.
• To view a website, the browser sends a request to the server. On receiving the request,
the server sends (response) the appropriate web page to the client's machine
Web Browser :
• To view Web pages, we need a Web browser which is a software program that requests,
downloads and displays Web pages stored on a Web server.
• Web browser used to access the Internet.
• A browser can be defined as, "a software used to locate, retrieve and display content on
the Internet and World Wide Web, including web pages, images, audio, video and other
files". There are two type of browser graphicle ad text browser.
• the popular web browser are opera, google crome, Mozilla Firefox, safari,
HTTP BASICS :
• HTTP stands for HyperText Transfer Protocol. A protocol is a set of rules that grow A way two or more
computers communicate with one another.
• HTTP is used to transfer data across the Web. • HTTP is the foundation for data communication for the ww
HTTP Request Massage :
HTTP Requests are messages which are sent by the client or user to initiate an action on the server.
It contain three parts ie.
1. Request Line: The first line of the header is called the request line.
2. Request Headers: The HTTP Request Header contains optional header information sent by the
client like MIME type
PHP BASICS :
• PHP is a server side scripting language which is used to create dynamic and interactive web pages.
• A scripting language is a language that interprets scripts at runtime.
• PHP is a server side script that is interpreted on the server.
• PHP is an open-source, interpreted, and object-oriented scripting language that can be executed
at the server-side.
• PHP files can contain text, HTML, CSS, JavaScript, and PHP code. PHP codes are executed on the
server, and the result is returned to the browser as plain HTML. PHP files have extension ".php".
• The latest version of PHP is PHP 8.
• PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic
content, databases, session tracking, even build entire e-commerce sites.
Advantages of PHP:
- the speed of php is fast, it is easy to use, the php is stable, Platform independent , Open
source, Powerful library support
Disadvantages of PHP
- php was week security, Weak type, Not suitable for large applications .
Features of PHP :
Performance, Database Connectivity, Existing Libraries Support, Portability, Simplicity,
Efficiency, Flexibility, Familiarity, Security, Open Source
LEXICAL STRUCTURE :
• PHP is a case sensitive language.
• Case sensitivity defines whether uppercase and lowercase letters are treated.
Comments : • Comments give information to people who read the code. • Comments in PHP
programming language is used to describe code and make simple to understand.
Literals : • A literal is a data value in PHP that appears directly in a program.
Identifiers : • An identifier is simply a name. In PHP, identifiers are used to name variables,
functions, constants, and classes., • The first character of an identifier must be an ASCII letter,
Constants : • A constant is a name for a simple value. A constant value cannot change during the
execution of the PHP script. • A constant is case-sensitive by default • In PHP we use the define()
function to create a constant.
Keywords : • Words reserved by the language for its core functionality are called as keyword or
reserved , wordbreak ,case ,catch, class, do ,for, endfor, extends , while, exit( ), function if else
elseif new or public static switch
Data Types :
• A data type is defined as "a set of values and the allowable operations on those values".
• PHP data types are used to hold different types of data or values. PHP data types define the type
of data a variable can store
• PHP supports eight primitive types ie. Integer, Float , String , Boolean, Null, Resource , Array ,
Object.
1. Integers:
• The integer data type is used to specify a numeric value
• The range of integers in PHP is equivalent to the range of the long data type in C.
• Integers can be written in decimal, octal or hexadecimal. If it is decimal, it is just the number.
If it is octal, then number should precede with (zero) 0. If it is hexadecimal then precede with
OX.
• PHP does not support unsigned integers.
2. Strings:
• A string is a sequence of characters
• PHP supports only a 256-character set.
• String literals are delimited by either single (‘…’) or double quotes (“…”)
.$a=“Good”;
echo “$a, morning \n”;
Output: Good, morning
3.Arrays:
• An array stores group of values under single variable.
• In PHP array is a collection of the different type of values.
4.Resource :
• The resource is a special PHP data type that refers to external resource.
• The exteral Resource is not a part of the php.
• Resources are created and used by special functions.
Variable Variables :
• PHP allows us to use dynamic variable names called as variable variables.
• Variable variables are simply variables whose names are dynamically created by another
variable's value.
**Variable Scope :
• Scope of variable is an part of program in which it is accessible.
• Scope can be defined as, "the range of availability of a variable has to the program in which it is
declared".
• There are four types of variable scope in PHP i.e. local, global, static and function parameter.
1. Local Scope:
• A variable which is declared inside the function is called as local variable.
• Local variable has access only within that function. Local variable cannot be accessed from
outside the function.
• Only functions can provide local scope., in PHP we can’t create a variable whose scope is a loop.
2. Global Scope:
• Variables declared outside function can accessed from any part of program colled globle scope.
• A global variable can be accessed in any part of the program. Ie.inside the function & outside the
function.
3 Static Variable:
• Static variables are those variables which can hold value when function called again
• Static variables are used only with the functions. These variables retain their values between
different calls to a function.
• We can declare a variable to be static simply by placing the keyword STATIC in front of the
variable name.
Operators :
• An operator is a symbol that manipulates one or more values usually producing a new value.
Operators in PHP are used to performing operations on variables and values.
• Operators are special symbols that perform some specific operations using the operands and
operator
Z = X + Y (X & Y are operand and (+) is a operator).
• There are three Categories of operators in PHP ie. Uary operator, biary operator, conditional
operator.
There are varius type of operators in PHP :
1. Arithmetic Operators:
• The PHP arithmetic operators are used to perform common arithmetical operations, such
as addition, subtraction, multiplication etc.
• The arithmetic operators require numeric values and non-numeric values are converted
automatically to numeric values.
•There are multiple arithmetic operators supported by PHP language ie. Negation, addition,
subtraction, multiplication, division, modulus, exponential.
2 .Autoincrement and Autodecrement Operators:
• PHP supports C-style pre- and post-increment and decrement operators.
• The increment/decrement operators only affect numbers and strings. The increment and
decrement operators are used to increase and decrease the value of a variable
++$a Pre-increment, --$a Pre-decrement,
$a++ Post-increment, $a-- Post-decrement
2. Comparison Operators:
3. 4. Logical Operators:
4. Assignment Operators:
5. 6. Bitwise Operators:
*Control Flow Statements :
If statement, if else Statement,
switch statement. :
• Switch statement is used to compare the value with multiple cases or values.
* LOOPS
While loop:
He while loop will execute block of code until certain condition is met.
• The while loop statement checks the expression at the beginning of each iteration. If the
expression evaluates to true, the code block inside the curly braces is executed. If the
expression evaluates to false, the loop exits
, do while loop , foreach loop
1. break Statement:
the break statement is used to break out of for loops, foreach loop, while loop, do
while loop and swich statement .
2. continue Statement :
• The PHP continue keyword is used to skip the current iteration of a loop but
it does not terminate the loop. it skips the current iteration of the loop and
transfers the control to the beginning of the loop
include and require:
• A common use of include is to separate page-specific content from general site design. Common
elements such as headers and footers go in separate HTML files

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy