Website Development. 2 Text. 2.1 Fonts. Terry Marris September 2007. We see how to format text and separate structure from content.



Similar documents
Creating a Resume Webpage with

ITNP43: HTML Lecture 4

CSS - Cascading Style Sheets

Create Webpages using HTML and CSS

{color:blue; font-size: 12px;}

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

Cascading Style Sheets (CSS)

How to code, test, and validate a web page

ICE: HTML, CSS, and Validation

HTML, CSS, XML, and XSL

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

Contents. Downloading the Data Files Centering Page Elements... 6

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

HTML and CSS. Elliot Davies. April 10th,

Outline of CSS: Cascading Style Sheets

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

HTML5 and CSS3 Design with CSS Page 1

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

CIS 467/602-01: Data Visualization

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

CHAPTER 10. When you complete this chapter, you will be able to:

Cascading Style Sheets

Colgate University Website Content Style Guide

Advanced Web Design. Zac Van Note.

GUIDE TO CODE KILLER RESPONSIVE S

Using Style Sheets for Consistency

Creating Web Pages with Dreamweaver CS 6 and CSS

Graphic Design Basics. Shannon B. Neely. Pacific Northwest National Laboratory Graphics and Multimedia Design Group

COMP519 Web Programming Autumn Cascading Style Sheets

CST 150 Web Design I CSS Review - In-Class Lab

Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:

Base template development guide

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

Creating a Web Page Using HTML, XHTML, and CSS: The Basics

Contents. Introduction Downloading the Data Files... 2

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

Responsive Design

HTML TIPS FOR DESIGNING

Web Design and Development ACS Chapter 9. Page Structure

A send-a-friend application with ASP Smart Mailer

Website 101: Visual Design And Content

Web Design for Print Designers WEB DESIGN FOR PRINT DESIGNERS: WEEK 6

Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

customer community Getting started Visual Editor Guide!

Designing HTML s for Use in the Advanced Editor

Joomla! Class Suffix Guides

Create Your own Company s Design Theme

Table of Contents THE DESIGNER S GUIDE TO CREATING NEWZAPP DRAG AND DROP TEMPLATES... 6 THE NEWZAPP SYSTEM... 7

Producing accessible materials for print and online

Web Reporting by Combining the Best of HTML and SAS

Microsoft Expression Web Quickstart Guide

Mobile Web Site Style Guide

8 STEPS TO CODE KILLER RESPONSIVE S

MCH Strategic Data Best Practices Review

JJY s Joomla 1.5 Template Design Tutorial:

How to Display Weather Data on a Web Page

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

standards graphic standards manual

In this tutorial, you learn how to create a new view master page and create a new view content page based on the master page.

Introduction to Adobe Dreamweaver CC

01/42. Lecture notes. html and css

An Attribute is a special word used inside tag to specify additional information to tag such as color, alignment etc.

Guide to design and layout

Appendix for Tx5xx and P85x1 manuals

POS Design. RTI HTML and Graphical User Interface (GUI) Direct Mail Maintenance. Discussion Document

Creating, Installing & Using Signatures Technical Considerations By Rex Weston

BLACKBOARD 9.1: Text Editor

Advanced Drupal Features and Techniques

Campaign Guidelines and Best Practices

Selectors in Action LESSON 3

How to craft a modern, mobile-optimized HTML template. Jason Samuels, NCFR IT Manager DrupalCamp Twin Cities May 2012

LEAGUE OF WOMEN VOTERS NAME & LOGO GUIDELINES

Implementing Specialized Data Capture Applications with InVision Development Tools (Part 2)

Introduction to XHTML. 2010, Robert K. Moniot 1

Web Authoring CSS. Module Descriptor

Cascading Style Sheets

SellerDeck 2014 Responsive Design Guide

web fontfont user guide

Transcription:

Terry Marris September 2007 Website Development 2 Text We see how to format text and separate structure from content. 2.1 Fonts Professionally written websites, such as those by Google and Microsoft, use either Arial or Helvetica as the font of choice. Sans-serif typefaces such as Arial are easier to read on a screen than serif typefaces such as Times New Roman. Serifs are the little lines at the end of strokes - compare serif with sans serif We specify that the typeface to be used with our paragraphs is Arial; if Arial is not available then Helvetica; if neither is available then any sans-serif font. Not every font is installed on every computer system. There are, of course other font families, such as: font-family: "Times New Roman", Times, serif; If a font-name comprises several words, e.g. Times New Roman, we enclose them all with quotation marks. But we shall stay with Arial as the font of choice. 1

2.2 Size We specify the height of characters in em. An em is the height of the default text on the user's computer system. As a general rule, we set the line-height to 1.5 times the type size. There are other units well suited for screen display such as percent (%) and pixels (px). 2.3 Validating a Style Sheet The entire style sheet file, created with Notepad and named textstyle.css, looks like this: The first line is just a descriptive comment for our benefit. We use http://jigsaw.w3.org/css-validator to upload our style sheet file and check for errors. 2

2.4 Include a Style Sheet in HTML Style sheets determine the structure of a web page. HTML determines the content of a web page. One way to include the style sheet in HTML is to use the @import statement. This statement must be enclosed within <style type="text/css"> and </style> because it is a Cascading Style Sheet (CSS) statement and not an HTML one. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>little Red Rooster</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <style type="text/css"> @import url(textstyle.css); </style> </head> 2.5 Line Breaks One way to force line breaks in text (when displayed by a browser on the screen) is to use the <br> element at the end of each line. <p>i had a little red rooster, too lazy to crow for day<br> Keep everything in the barnyard, upset in every way<br> Oh, them dogs begin to bark, hounds begin to howl<br> Oh, watch out strange kin, little red rooster's on the prowl</p> 3

2.6 Headings We determine the size, style and colour in the style sheet. p, h1, h2 { h1 { font-size: 3em; color: blue; text-align: center; h2 { font-size: 2em; font-weight: bold; font-style: italic; color: black; h1 represents the most important headings. Here we specify its size to be 3em, the text colour to be blue, the background colour to be the colour of its container (in our case that is the screen) and the heading to be in the centre. Whenever we specify a font colour we are obliged to specify its background. Headings at level 2 are bold, italic and 2em in size. The font family is specified along with the paragraph settings (at the top of the style sheet). In the body of the HTML file we write: <h1>little Red Rooster</h1> <h2>words and music by Willie Dixon and Chester Burnett aka Howlin' Wolf</h2> <h1> introduces the top-level heading, e.g. the title, and </h1> terminates it. <h2> introduces the second level heading, </h2> ends it. 4

2.7 The Style Sheet The entire style sheet, named textstyle.css, is shown below. p, h1, h2 { h1 { font-size: 3em; color: blue; text-align: center; h2 { font-size: 2em; font-weight: bold; font-style: italic; color: black; 5

2.8 The HTML File The entire HTML file, named text.html, is shown below. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>little Red Rooster</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <style type="text/css"> @import url(textstyle.css); </style> </head> <body> <h1>little Red Rooster</h1> <h2>words and music by Willie Dixon and Chester Burnett aka Howlin' Wolf</h2> <p>i had a little red rooster, too lazy to crow for day<br> Keep everything in the barnyard, upset in every way<br> Oh, them dogs begin to bark, hounds begin to howl<br> Oh, watch out strange kin, little red rooster is on the prowl.</p> </body> </html> 6

2.9 Exercise 1. Complete the following tasks: Write a web page that displays four lines of a song or poem of your choice. Remember to acknowledge the source of your song or poem. Check your CSS with http://jigsaw.w3.org/css-validator and your HTML with http://validator.w3.org and remove any errors found. Experiment with the font, size and line height to find a combination you like the look of. 7