chapter 4 chapter 4 creating a simple page disclaimer: all words, pictures are adopted from...

14
Chapter 4 Creating a Simple Page Disclaimer: All words, pictures are adopted from “Learning Web Design (3rdeds.)” by Jennifer NiederstRobbins, published by O’Reilly 2007. Edited by Guoliang Liu, Only for Course CSc2320 at GSU CS Department

Upload: luke-chapman

Post on 26-Dec-2015

215 views

Category:

Documents


2 download

TRANSCRIPT

Chapter 4

Creating a Simple Page

Disclaimer: All words, pictures are adopted from “Learning Web Design (3rdeds.)” by Jennifer NiederstRobbins, published by O’Reilly 2007.Edited by Guoliang Liu, Only for Course CSc2320 at GSU CS Department

2

In this chapterAn introduction to (X)HTML

elements and attributesA step-by-step demo for simple

web pageDocument structuresBasic text and image elementsA simple style sheettroubleshooting

3

5-steps to produce a web page

Start with contentGive the document structureIdentify text elementsAdd an imageChange the look with a style

sheet

4

Launch a Text EditorCreating a new document in

Notepad (Windows)

Creating a new document in TextEdit(Mac OS)

5

Step 1: ContentType your contentSave your fileWhat Browsers Ignore?

◦Line breaks (carriage returns)◦Tabs and multiple spaces◦Un-recognized markup◦Text in comments

6

Step 2: Document StructureHTML element

7

Step 2: Document Structure

Basic document structure

8

Step 2: Document StructureTips

◦Lower cases for elements and attributes <head> …</head>, <p>…</p>

◦Use quotation marks for attribute values <content name=“The Web Design” > …

◦Closing elements every time◦Use style sheets instead of table-

based approach

9

Step 3:Identify Text Elements

10

Step 4: Add an ImageUse element <img>

11

Step 5: Set the Look (Style Sheet)Create style rules

12

TroubleshootingMissing slash?Missing ending tags?Missing left/right angle brackets?

13

HomeworkReading Chapter 4Assignment 3:

◦ Make a same or a similar web page like: The page "Black Goose Bistro" in page 67 of the

textbook You can use other pictures and text content that you like You have to use the elements we have talked about

including <img>,<h1>,<h2>,<p> and add a style sheet (the one in page 11).

For the paragraphs, it will be appreciated if you put some comments about the class so far.

Name your html file as “assignment3.html”

◦ Email to TA with the attachment◦ Due: Monday, Sep 15th, 2014

14

assignment3.html should be like