Vous êtes sur la page 1sur 9

www.netskills.ac.

uk

CSC1014

Web Content Creation


Key Principles

CSC1014

Web page basics


Source code delivered to client (browser)
Flat file, dynamic generation, via HTTP, via local file system etc.

Browser processes document and renders display to user


Final appearance is a combination of source construction (by the author) and rendering capability (in web browser

All web documents use (X)HTML Hypertext Mark-up Language


With other embedded technologies to enhance display and behaviour

JISC Netskills

CSC1014

Web page delivery

JISC Netskills

CSC1014

HTML: A Simple view


Content
Text (and images) Core structure for the content Focus on semantics and organisation Default rendering conventions allow for basic (functional) display Additional information/semantics about elements

Elements (Tags)

Attributes

JISC Netskills

CSC1014

A simple web page (HTML 4.01)


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>A Simple (HTML) Document 1</title> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> </head> <body> <div><img src="logo.gif" alt="My Logo"></div> <h1> <font face="Georgia, Times New Roman, serif" color="green" size="5"> Creating Web Pages</font> </h1> <p> <font face="Arial, Helvetica, sans-serif" color="red"> A <strong>one-day workshop</strong> run by:<br> <a href="http://www.netskills.ac.uk/">Netskills</a></font> </p> </body> </html>
JISC Netskills

CSC1014

Presentation-oriented markup
Web pages have:
Structured content An appearance (or presentation) (Optional) behaviour(s) Confusion of structure with style Presentation of each page must be managed separately Users cannot consistently adapt pages Evolution and extension is difficult!

Specifying all 3 in a single mark-up (like HTML) is problematic

JISC Netskills

CSC1014

Separation of concerns
Content (in XHTML)
The information conveyed by a page Meaningful structure (section headings, paragraphs, emphasis etc.) and subject matter tags and attributes for presentation removed from standard (deprecated) The appearance of a page (fonts, multi-column layout, colours, alignments etc.) To respond to user input To manage external data manipulation and browser inconsistencies

Presentation (in CSS)

Behaviour (in JavaScript)

JISC Netskills

CSC1014

Benefits of separation
Separation of content from presentation tells you (and your device) something meaningful about a page independently of its appearance
Semantic markup versus stylistic instructions Heading level versus large font Strong emphasis versus bold New paragraph versus line break

Plus consistency, accessibility, ease of maintenance etc.

JISC Netskills

CSC1014

One degree of separation


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>A Simple (HTML) Document</title> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <style type="text/css"> h1 { font-family: Georgia "Times New Roman", serif; color: green; font-size: 155%; } p { font-family: Arial, Helvetica, sans-serif; color: red; } </style> </head> <body> <div><img src="logo.gif" alt="My Logo"></div> <h1>Creating Web Pages</h1> <p>A <strong>one-day workshop</strong> run by: <br> <a href="http://www.netskills.ac.uk/">Netskills</a></p> </body> </html>
JISC Netskills

Vous aimerez peut-être aussi