WP HTML Basics
WP HTML Basics
CSC 4316
Course textbook
Platform independent
<HTML>
<head>
<title>Hello World</title>
</head>
<body bgcolor = “#000000”>
<font color = “#ffffff”>
<H1>Hello World</H1>
</font>
</body>
</HTML>
Hypertext MarkUP
Language
9/3/18 8
Hypertext MarkUP
Language
Common features
– Tables
– Frame
– Form
– Image map
– Character Set
– Meta tags
– Images, Hyperlink,
etc…
9/3/18 9
Hypertext MarkUP
Language
File Extensions:
HTML, HTM
Recent recommendation of W3C is XHTML 1.0 combines
the strength of HTML 4 with the power of XML.
XHTML 1.0 is the first major change to HTML since
HTML 4.0 was released in 1997
More info: http://www.w3.org/TR/xhtml1/
CSS (Cascading Style
Sheet)
Simple mechanism for adding style to web page
Code be embedded into the HTML file
HTML tag:
<style type=“text/css”>CODE</style>
Also be in a separate file FILENAME.css
HTML tag:
<link rel=“stylesheet” href=“scs.css” type=“text/css”>
Style types mainly include:
• Font
• Color
• Spacing
CSS (Cascading Style
Sheet)
Controls format:
– Font, color, spacing
– Alignment
– User override of styles
– Aural CSS (non sighted user and voice-
browser)
– Layers
• Layout
• User Interface
CSS (Cascading Style
Sheet)
<HTML>
<head>
<title>Hello World</title>
<style type=“text/css”>
p,h1,h2 {
margin-top:0px;
margin-bottom:100px;padding:40px 40px
0px 40px;
}
</style>
</head>
<body bgcolor = “#000000”>
<font color = “#ffffff”>
<h1>Hello World<h1>
</font>
</body>
</HTML>
Database Technology
(MYSQL)
9/3/18 15
HTML without CSS
9/3/18 16
Javascript
Main objectives:
User interface, CGI capabilities without
involving server
Client side compilation
Server provides no support
Security hazard for client’s computer
9/3/18 18
VBScript
9/3/18 19
PHP (Hypertext Preprocessor)
PHP- HTML-embedded scripting language
<HTML>
<head><title>
PHP Sample Code</title></head>
<body bgcolor = "#000000">
<font color = "#ffffff"><h1>
This is a PHP TEST</h1>
<p>
<?php
$cnt=0;
while($cnt <= 4)
{ $cnt++;
echo "Hello World<P>"; }
?>
</body>
</HTML>
PHP (Hypertext Preprocessor)
PHP (Hypertext Preprocessor)
Drawback:
• Security
• Easy manipulation of code for hackers
CGI (Common Gateway Interface)
#!/usr/local/bin/perl5.6.1
## printenv -- demo CGI program which just prints its
environment
##
print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
PERL
Drawback:
• Security
• Easy manipulation of code for hackers
Mod_PERL (PERL Module for
Apache)
Module that brings together the power of PERL and Apache HTTP
server
9/3/18 29
Secured Web Server
(HTTPS, MOD_SSL)
Conventional or Symmetric
• Sender and Receiver share a key
Certificate
• A certificate associates a public key with the
real identity of an individual, server
• Includes the identification and signature of the
Certificate Authority that issued the certificate
Secured Web Server
(HTTPS, MOD_SSL)
WebISO (Initial Sign-on and
Pubcookie)
Pubcookie
Main Model:
Example:
https://wonderwoman.web.cs.cmu.edu/Reports
WebISO (Initial Sign-on and
Pubcookie)
Cookies
Web cookies are simply bits of software placed on your computer when you
browse websites
Security
Database Technology
(MYSQL)
Example:
Java Applets
Precompiled code
Included in HTML page
HTML tag:
<applet code=FILENAME.class>LIST OF
PARAMETER</applet>