Administrivia
Discuss Accessible Design
Finish discussing HTML
Start CSS
Sections and Labs
Things that are relevant
From Wikipedia
Content
Words and images
Structure
HTML
Style
CSS
Behavior
Javascript & Server programs
Describes the content and structure of information on a web page
Surrounds text content with opening and closing tags
Each tag's name is called an element
<element> content </element>
<p>This is a paragraph</p>
Most whitespace is insignificant in HTML (ignored or collapsed to a single space)
We will use a newer version called HTML5
<!DOCTYPE html>
<html>
<head>
information about the page
</head>
<body>
page contents
</body>
</html>
The <head>
tag describes the page and the <body>
tag contains the page's content
An HTML page is saved into a file ending with extension .html
The DOCTYPE
tag tells the browser to interpret our page's code as HTML5, the lastest/greatest version of the language
There are many different types of HTML tags used to structure web pages (we can't possibly cover all of them within lecture).
A comprehensive list is here (it's a great bookmark page for reference this quarter!)
Unless otherwise specified, all of the tags listed are required to be in the <body>
of an HTML page rather than the <head>
Our compiled list is here and here
<!
like is <!DOCTYPE html>
is considered
Markup
Declaration
<hr>
can either have the slash in the tag or not, but BE CONSISTENT IN YOUR
CODE.
<hr />
<hr>
<!DOCTYPE html>
<html>
<head>
<title>About Me: Nicole Riley</title>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h2>About Me: Nicole Riley</h2>
</div>
<p>Hello, everyone! My name is ......</p>
...
</body>
</html>
Recall: some tags can contain additional information called attributes
<element
attribute="value"
attribute="value">
content </element>
<a href="page2.html">Next page</a>
Where else did you see attributes yesterday?
<html lang="en">
<meta charset="UTF-8">
<img src="" alt="insert descriptive text for screenreaders" />
<img src="" alt="insert descriptive text for screenreaders" />
Everyone has different abilities
Nearly 1 in 5 people have a disability in the U.S. (from the U.S. Census)
Disabilties can be temporary
Disabilties can be situational
Disabilty affects all of us
Designs that account for all abilities are called accessible designs
Enable your phone's screen reader
Input works differently now. For example, tap now reads the screen and double-tap selects. Use two or three fingers to scroll by page. Play with it for a minute.
Try closing your eyes and reading a webpage or a social networking site. Try writing an email.
Medical view
Legal view
Sociocultural view
Design for as many users as possible, not just the average user
Example: Airplane cockpits:
Universal Design is often used in architecture
Instead of focusing on the abilities that someone lacks (dis-ability), and trying to compensate
Focus on making systems work with what abilities people have
Don't make people adapt to the system
Make the system adapt to the abilities of the user
First two are required, other five are recommended
From the A11y Project
Tools
Resources
What did you learn from the readings?
Update to aboutme.html demo
<article>
,
<strong>
<b>
<html lang="en">
Note: These design prinicples help in other ways as well
<img src="img/koalafications.jpg" alt="Koalified koala" />
The src
attribute specifies the image URL
HTML5 also requires an alt
attribute describing the image, which
improves
<a href="http://en.wikipedia.org/wiki/Koala/">
<img src="images/irrelephant.jpg" alt="Irrelephant elephant"
title="dumbo!" />
</a>
What's the title attribute?
title
attribute is an optional tooltip (on ANY element)
title
attribute doesn't always work well for mobile and accessibility, so its usage and future are debated
White space usually doesn't matter in HTML pages, except apparently here
Preview of imagelinktext.html
Content
Words and images
Structure
HTML
Style
CSS
Behavior
Javascript & Server programs
<p>
<font face="Arial">Welcome to Greasy Joe's.</font>
You will <b>never</b>, <i>ever</i>, <u>EVER</u> beat
<font size="+4" color="red">OUR</font> prices!
</p>
Welcome to Greasy Joe's. You will never, ever, EVER beat OUR prices!
Tags such as b, i, u
and font
are discouraged in strict HTML
Why is this bad?
<head>
...
<link href="filename" rel="stylesheet" />
...
</head>
<link href="style.css" rel="stylesheet" />
CSS describes the appearance and layout of information on a web page (as opposed to HTML, which describes the content)
Can be embedded in HTML or placed into separate .css
file (preferred)
selector {
property: value;
property: value;
...
property: value;
}
p {
color: red;
font-family: sans-serif;
}
A CSS file consists of one or more rules
A rule selector specifies HTML element(s) and applies style properties
*
selects all elements