cs 3870/cs 5870 web protocols, technologies and applications

16
CS 3870/CS 5870 Web Protocols, Technologies and Applications

Upload: rosemary-maxwell

Post on 13-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 3870/CS 5870 Web Protocols, Technologies and Applications

CS 3870/CS 5870

Web Protocols, Technologies and Applications

Page 2: CS 3870/CS 5870 Web Protocols, Technologies and Applications

2

Formatting HTML Pages

<h1> CS3870/CS5870: Prog1</h1>

<h3> HTML Elements </h3>

<ul>

<li> Bold face </li>

<li> Underline</li>

<li> emphasize</li>

<li> italics</li>

<li> Larger Size</li>

<li> small size</li>

</ul>

Page 3: CS 3870/CS 5870 Web Protocols, Technologies and Applications

3

Formatting HTML Pages

<ul>

<li> <b> Bold face </b></li>

<li> <u> Underline</u></li>

<li> <em>emphasize</em></li>

<li> <i> italics</i></li>

<li> <font size=+1>Larger Size</font></li>

<li> <font size=-1>small size</font></li>

</ul>

Page 4: CS 3870/CS 5870 Web Protocols, Technologies and Applications

4

Using Style

<ol>

<li style="font-size:large">Large font size </li>

<li style="text-decoration:underline">underlined</li>

<li style="font-style:italic">Italics</li>

</ol>

Page 5: CS 3870/CS 5870 Web Protocols, Technologies and Applications

5

Elements Not Supported in VS

<center>

<ol>

<li style="font-size:large">Large font size </li>

<li style="text-decoration:underline">underlined</li>

<li style="font-style:italic">Italics</li>

</ol>

</center>

-1: using non-supported HTML element

Page 6: CS 3870/CS 5870 Web Protocols, Technologies and Applications

6

Cascading Style Sheets (CSS)

• Inline Styles• Internal Style Sheets• External Style Sheets

Page 7: CS 3870/CS 5870 Web Protocols, Technologies and Applications

7

Inline Styles

<ol>

<li style="font-size:large">Large font size </li>

<li style="text-decoration:underline">underlined</li>

<li style="font-style:italic">Italics</li>

</ol>

Page 8: CS 3870/CS 5870 Web Protocols, Technologies and Applications

8

Creating Internal Style Sheets in VS

• Select the element to be formatted

• Click FORMAT on the menu bar

• New Style

• Specify the styles

• OK or Apply

Page 9: CS 3870/CS 5870 Web Protocols, Technologies and Applications

9

Internal Style Sheets<head>

<style type="text/css">

.myStyleClass

{

font-size:x-large;

text-decoration: underline

}

</style>

<title>CS3870/CS5870 - Prog1</title>

</head>

Page 10: CS 3870/CS 5870 Web Protocols, Technologies and Applications

10

Internal Style Sheets<head>

<style type="text/css">. . .</style>

<title>CS3870/CS5870 - Prog1</title>

</head>

<body>

<p class="myStyleClass">

Using internal CSS </p>

</body>

</html>

Page 11: CS 3870/CS 5870 Web Protocols, Technologies and Applications

11

Creating External Style Sheets in VS

• Click Solution Explorer

• Right click the folder you want the CSS file to be

• Click Add

• Click Style Sheet

• Specify CSS file name

Page 12: CS 3870/CS 5870 Web Protocols, Technologies and Applications

12

External Style SheetsA text file with any name, e.g. myStyleSheet

body

{

padding-left: 11em;

}

.navbar

{

padding: 0;

margin: 0;

position: absolute;

top: 2em;

left: 1em;

width: 9em

}

Page 13: CS 3870/CS 5870 Web Protocols, Technologies and Applications

13

External Style Sheets<head>

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

<title>CS3870/CS5870 - Prog1</title>

</head>

<body>

<ul class="navbar">

<li> <a href="http://people.uwplatt.edu/~yangq/">My Home Page </a></li>

<li> <a href="http://www.uwplatt.edu/csse/">Absolute link </a></li>

<li> <a href="HtmlPage2.html"/>Relative link</a></li>

</ul>

</body>

</html>

Page 14: CS 3870/CS 5870 Web Protocols, Technologies and Applications

Prog1

Due 5:00 PM, Wednesday, September 9

Folder Name: Prog1

14

Page 15: CS 3870/CS 5870 Web Protocols, Technologies and Applications

Browsers

• Different browsers implement HTML and CSS in different ways.

• Some browsers may not implement some rules at all.

• Must make sure your pages work as expected with IE in Lab 206.

15

Page 16: CS 3870/CS 5870 Web Protocols, Technologies and Applications

Grader

https://xray.ion.uwplatt.edu/yangq/grader.aspx

It goes to the first page of the selected program of the selected student, including my sample

program at CS3870.

16