• No results found

advanced_html.ppt

N/A
N/A
Protected

Academic year: 2020

Share "advanced_html.ppt"

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)

CITA 110

College of Digital Economy and Information

(2)

Announcements

Advanced HTML

Tables

CSS (Cascading Style Sheets)

Forms

Javascript

Break

Exam Results

HTML Portfolio Assignment

(3)

HTML stands for Hypertext Markup

Language

HTML pages provide the majority of the

content on the World Wide Web

(4)

<html>

<!-- TL home page December 29, 2008 -->

<head>

<title>My Home Page</title>

</head>

<body>

<h1>Tom's Home Page</h1>

<hr />

<font face="Arial" color="blue">

My favorite color is blue!

</font>

(5)

Text in the Title tag displays here

(6)

HTML Format Tag

Browser Displays

Basic structure allows

for many features:

<i>Italic</i>

<b>Bold</b>

<u>Underline</u>

<ul></ul>

<ol></ol>

<img />

<a></a>

Italic

Bold

Underline

• Cat

• Dog

1. Cat 2. Dog

(7)

These tags work brilliantly on simple pages

but

...

Formatting problems

Not enough formatting control with simple tags

Formatting tags are often clunky

This makes maintaining large Websites difficult

Basic HTML is not robust

HTML pages are static, a.k.a. boring

Simple HTML pages cannot leverage databases

(8)

<html>

<!-- TL home page December 29, 2008 -->

<head>

<title>My Home Page</title>

</head>

<body>

<h1>Tom's Home Page</h1>

<hr />

<font face="Arial" color="blue">

My favorite color is blue!

</font>

(9)

Advanced techniques in HTML remedy such

problems

Tables

provide a graphical way to format data

Cascading Style Sheets (CSS)

allow for

advanced easily-maintainable formatting

Forms

allow HTML to accept data from a user

Javascript

allows for procedural logic to handle:

advanced conditional formatting

input validation

(10)

Presenting data on the Web is useful

Tables provide the simplest and most

powerful way to present data on the Web

HTML Tables offer an excellent range of

(11)

Tag Purpose

(12)
(13)

Header Row is Bold!

(14)

Tables can be nested

Tables can be used for formatting

Only do this if absolutely necessary

Working with complex and nested tables is a mess

Tables should be used to present data

We have other options for complex

(15)

Cascading Style Sheets provide a facility for

formatting Web pages

CSS saves a great deal of work

Multiple styles will cascade into one

Browser default

External style sheets

Internal style sheets

(16)

<html>

<!-- TL home page December 29, 2008 --> <head>

<title>My Home Page</title> </head>

<body>

<h1>Tom's Home Page</h1> <hr />

</body> </html>

<font face="Arial" color="blue">

My favorite color is blue! </font>

<p style="font-family: Arial; color: Blue"> My favorite color is blue!

(17)

<html>

</body> </html>

<font face="Arial" color="blue">

My favorite color is blue! </font>

<p>My favorite color is blue!</p> <head>

<title>My Home Page</title> <style type="text/css">

p{font-family: Arial; color: Blue} </style>

</head>

<body>

<h1>Tom's Home Page</h1> <hr />

<head>

<title>My Home Page</title> </head>

(18)
(19)

<html>

</body> </html>

<font face="Arial" color="blue">

My favorite color is blue! </font>

<p>My favorite color is blue!</p> <head>

<title>My Home Page</title> <style type="text/css">

p{font-family: Arial; color: Blue} </style>

</head>

<body>

<h1>Tom's Home Page</h1> <hr />

<head>

<title>My Home Page</title> </head>

(20)
(21)

<html>

</body> </html>

<font face="Arial" color="blue">

My favorite color is blue! </font>

<p>My favorite color is blue!</p> <head>

<title>My Home Page</title>

<link rel="stylesheet" type="text/css" href="mystyle.css" />

</head>

<body>

<h1>Tom's Home Page</h1> <hr />

<head>

<title>My Home Page</title> </head>

(22)

/* CSS Comment */

(23)

There are many, many CSS commands

If you have a formatting question, the

answer almost always involves CSS

For a detailed list of commands, techniques,

and tips consult the following site:

(24)

Accept information from users

Update databases from a Website

(25)

<html> <head> <title>My Form</title> </head> <body> <h1>Feedback Form</h1> <hr /> <form method="post" action="mailto:[email protected]"> Name: <input type="text" name="Name"><br />

Comments: <input type="text" name="Comment"><br /> <input type="submit" value="Send Comments"> </form>

(26)
(27)

Use the GET method for queries

Use the POST method for database

manipulation

Action will usually point to a server-side

script written in a language like PHP or PERL

The server-side script will handle the data

and perform the required operations

For simple email routing, use a free service

(28)

Javascript is a client-side scripting language

Adds logic capabilities to Web pages

The most prevalent programming language

on the planet

Excellent starting point for those interested

(29)

<html> </body> </html> <p> Hello World! </p> <script type="text/javascript"> document.write("Hello World!"); </script> <body>

<h1>Tom's Home Page</h1> <hr />

<head>

(30)

<html>

<body>

<script type="text/javascript">

var browser=navigator.appName;

var b_version=navigator.appVersion;

var version=parseFloat(b_version);

document.write("Browser name: " + browser);

document.write("<br />");

document.write("Browser version: " + version);

</script>

(31)
(32)
(33)
(34)

if (document.images) {

image1off = new Image();

image1off.src = 'images/transparent.gif';

image1on = new Image();

image1on.src = 'images/fib_thinker.jpg';

...

function change(image,ext) {

if (document.images)

document.images[image].src = eval(image +

ext + ".src");

}

(35)

Web sites have inspired a great number of

technologies and techniques

Keep up with developments in technology

New trends develop all of the time

The better you can use these technologies

References

Related documents

&lt;join type&gt; join &lt;dimension table&gt; on &lt;joined columns&gt; where &lt;simple filters&gt; group by &lt;grouped columns&gt; having &lt;aggregate filters&gt; order

To address these questions, the following goals were set: (a) to reproduce field explosions pertaining to primary blast injury as accurate as possible in a controlled

s-process p-process Mass known Half-life known

“ the seven words of our LORD on

&lt;SSRPMDESC:This is an example report template&gt; This table contains the currently enrolled users:&lt;br&gt;&lt;br&gt; &lt;SSRPMCOMP:Customized Enrolled users&gt;. This

Process maps for case-level barcode tagging, item-level RFID tagging, case-level RFID tagging and pallet-level RFID tagging in EOL aircraft RL were developed and simulated in Arena

ALTER TABLE &lt;table&gt; ALTER COLUMN &lt;colname&gt; SET INLINE LENGTH

In memory of Harold Taub, beloved husband of Paula Taub by: Karen &amp; Charles Rosen.. Honouring Maria Belenkova-Buford on her marriage by: Karen &amp;