I want you to be as excited about
the current state of the web as I am!
Wikipedia says:
"The world wide web is a system of interlinked hypertext documents accessed via the Internet. With a web browser, one can view web pages that may contain text, images, videos, and other multimedia and navigate between them via hyperlinks."
Just about anything...
If you can dream if, you can build it
There’s a LOT to learn
NOBODY
<!DOCTYPE html>
<html>
<head>
<title>My Awesome Website</title>
<link rel="stylesheet" href="style.css">
<script src="application.js"></script>
</head>
<body>
<header>
<a class="logo" href="index.html">My Awesome Website</a>
<nav>
<a href="about.html">About</a>
<a href="contact.html">Contact</a>
</nav>
</header>
<main>
<h1>Header</h1>
<p>Lorem Ipsum</p>
</main>
<footer>
© Copyright 2016
</footer>
</body>
</html>
Go through the process of purchasing
the largest size of the Labyrinth rug
Finish meee (MUST be synced)
Add the link to your [yourusername].github.io/homework/
Read Building Your First Web Page by Shay Howe
Read A Dao of Web Design by John Allsopp
Read UI, UX: Who Does What? A Designer's Guide
to the Tech Industry
Hypertext markup language
It gives content structure and meaning
Hamburger Text Markup Language
In HTML you can write just the opening tag and it will
often work. Don’t do this. Unless it is a self-closing element,
always use open and close tags.
<head> describes the web page, meta info
<body> visible page content
<header> group of introductory or navigational aids (headings, logo, nav, search)
<footer> (related links, copyright)
<div> defines a division or a section, a container/wrapper
<nav> links to other pages or parts within a page
<aside> tangential content related to its surrounding content, sidebar
<section> grouping of content with heading
<article> a self-contained piece of content (forum post, article, blog entry)
<p> paragraph text
<h1> most important heading
<h2> heading less important than h1
<span> generic inline container
<ul> unordered list
<ol> ordered list
<li> list item
<a> link, stands for anchor
Read Shay Howe’s Getting to know HTML
Sign up for Codecademy and complete Unit 1 & 2
Work on HTML for Dobot shop (make sure it is VALIDATED) - Due in two weeks!
Don’t fear starting from scratch (Part 1)
Create this in a Codepen (In-class Codepen assignment #2)
Decide where on the page you want to link
Add the id="..." attribute inside the opening tag
Name the id something that makes sense
IDs are for identifying elements uniquely. Only occurs once.
In the nav, reference the anchor text using href="#id-name"
Create this in a Codepen (In-class Codepen assignment #3)
<header>
<h1>MY PAGE</h1>
<nav>
<ul>
<li><a>Home</a></li>
<li><a>About</a></li>
<li><a>Portfolio</a></li>
<li><a>Contact</a></li>
</ul>
</nav>
</header>
<section>
<h2>Bacon Ipsum</h1>
<p> Brisket chuck leberkas short ribs tenderloin tongue. Filet mignon sirloin jerky chicken strip steak t-bone. Ribeye short ribs fatback pancetta ham boudin, pork biltong tenderloin leberkas ball tip pork chop bresaola. Spare ribs kielbasa pork loin hamburger pork chop rump beef. Chuck spare ribs pork chop shank ribeye, leberkas turkey pig. Tri-tip tongue turducken, pig jowl brisket tail tenderloin flank rump bresaola pork chop short loin shoulder.</p>
<h2>About</h1>
<p>T-bone strip steak beef ribs, tenderloin drumstick pancetta biltong sirloin jowl speck kielbasa ball tip. Filet mignon leberkas jerky, cow shankle spare ribs fatback venison tri-tip short ribs kielbasa brisket. Swine pork loin beef kielbasa, prosciutto boudin beef ribs hamburger pork chop short ribs meatloaf frankfurter bresaola. Chuck kielbasa tail boudin.</p>
<h2>Portfolio</h1>
<p>Ball tip swine salami, strip steak boudin chicken fatback. Kielbasa bresaola ribeye swine speck pork belly. T-bone chuck turducken, tail pig ball tip kielbasa. Ribeye kielbasa tenderloin spare ribs, turducken beef ribs prosciutto drumstick brisket pastrami strip steak. Jerky salami biltong chicken, ground round pig pork chop meatball pork corned beef pastrami turducken shoulder.</p>
<p>Ball tip capicola chuck kielbasa prosciutto chicken. Meatloaf meatball corned beef pork belly, andouille frankfurter salami ground round biltong rump spare ribs. Capicola tail boudin, turducken pork belly ribeye bresaola bacon t-bone ball tip. Ribeye frankfurter spare ribs, ground round pork loin tail rump salami speck sirloin pastrami shank.</p>
<h2>Contact</h1>
<p>Ham hamburger capicola short loin pork loin kielbasa. Meatball biltong tri-tip pork belly speck pork loin, shankle bacon. Bacon frankfurter prosciutto, ribeye tri-tip jowl beef pork chop kielbasa bresaola t-bone pig shank short loin. Jerky brisket pork chop jowl.</p>
</section>
<style>
body {
width: 400px;
}
h1 {
padding-top: 20px;
font-size: 2em;
}
h2 {
padding-top: 20px;
font-size: 1.5em;
}
p {
line-height: 1.5;
}
nav li {
display: inline-block;
padding-right: 20px;
padding-bottom: 75px;
}
</style>
<img>
<img class="logo" src="logo.svg" alt="Google">
GIF - can be animated
PNG - supports transparency, smaller image (eg logos)
JPG - larger images
SVG - vector graphics, can be animated w/ code
ICO - favicon
Have you tried to type ampersands, copyright symbols, quotation marks, greater-than, or less-than signs into your code as text?
& © “ ” ♥ < >
There are some characters that are used in HTML that you can't just type in, the browser will think it's code and not text to be displayed. When to use escapes.
Read Shay Howe’s Getting to know CSS
Complete Codecademy Unit 3 & 4
Finish HTML for Dobot shop
Close the ones that you have fixed
You should always check how Siya and I will review your work
Everything should link from the class roster on second slide
In the future, we aren’t going to review things that have errors and warnings
Let’s go over anything you are confused about
You have to be able to ask the right questions
Cascading Style Sheets
Best practice: name with classes (`.heading`)
Starting from scratch (Part 2)
You can’t use spaces
JavaScript uses camelCase
I recommend using dashes - CSS uses dashes
(`background-color`, `font-family`, etc).
If you want to look at more complex naming conventions,
check out BEM
Be consistent! - easier to read and remember what you wrote
Name of element
p, div, h1
Class name
Prefixed with a period (.)
<div class=‘my-class-name’>This is my class name </div>
.my-class-name
Element ID
Prefixed with a hash / pound sign (#)
<div id=‘my-id’> This is my id</div>
#my-id
There are lots of them!
Two Primary types: Layout and style
(Padding is layout, color is style)
Style generally inherits, layout doesn’t
Sometimes can be combined into one (called "shorthand"):
padding: 10px 20px; = padding-top: 10px; padding-right: 20px; padding-bottom: 10px; padding-left: 20px;
Layout box properties go clockwise from midnight:
top, right, bottom, left
Colors: #fff, #ffffff, rgb(255,255,255), gray, black, red
Numbers: 0, 25px, 1.1em, 100%, vw, vh
`inherit` is a special property to force inheritence
Styles are separate from HTML
Your CSS should start with a RESET
Inline :(
Styles are written as attributes so nothing can be reused and these styles cannot be overridden
Embedded/Internal :/
Written in one place (ex: bottom) of HTML file. Styles can only be used within that HTML file
External :)
Written in a separate file and linked. Easiest to maintain
Apply styles in multiple places
Use a comma
.heading, .description, p { color: red; }
Apply styles to nested elements
Use a space
.article button { border-radius: 5px; }
Pseudo-classes / pseudo-elements
a.hover { color: blue; }
article:last-child { border-bottom: 1px solid black; }
article:not(:last-child) { border-bottom: 1px solid black; }
Apply to elements with a specific attribute
input[type="radio"] { -webkit-appearance: none; }
<header>
<h1>My Site!</h1>
<nav><ul>
<li><a href='#'>Link 1</a></li>
<li><a href='#'>Link 2</a></li>
</ul></nav>
</header>
<section>
<article>
<h1>Blog Post 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
</article>
<article>
<h1>Blog Post 1</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac elit at nisl sagittis consequat sed eget tellus. Aliquam gravida, nunc sit amet viverra dictum, nibh justo semper massa</p>
</article>
</section>
<footer>
<a href='#'>Link 1</a> | <a href='#'>Link 2</a>
</footer>
Add classes to the header and footer
Make both the header and footer have black backgrounds
with white text
Create this in a Codepen (In-class Codepen assignment #4)
Inline style (defined directly with a style='....' attribute in the tag)
Number of id selectors
Number of class selectors
Number of tag selectors
Order of appearance last to first
Style inheritance
In depth: A Specificity Battle!
Start with a reset
Set base element styles (body, p, h1, h2)
Set your class styles
Complete Codecademy Unit 5 & 6
Start CSS for Dobot shop (Have visual CSS complete by next class. Move on to layout CSS if you want to get ahead and have more time for review)
<style>
.box1 {
background-color: teal;
}
.box2 {
background-color: orange;
}
</style>
<div class="box1">I'm a box</div>
<div class="box2">I'm box 2!</div>
Set Box1 to be 100px in width with 24px of padding on all sides, and a red border of 10px.
What is the total amount of space it takes up horizontally?
Create this in a Codepen (NOT an In-class assignment)
Box model: margin, padding, width, height
Top, bottom, left, right
Border
Position [ static (default), relative, absolute, fixed ]
Float [ left, right, none ] (May have to use overflow: auto; or height will collapse. Can also use clears, but this requires an element after)
Clear [ left, right, both]
Display [ none, block, inline, inline-block ]
Create this in a Codepen (In-class Codepen assignment #6)
<style>
.container {
margin: 20px;
height: 300px;
background-color: lightgray;
}
</style>
<span>Above Container</span>
<div class="container">
<div class="top-left">I'm in the top left!</div>
<div class="bottom-right">I'm in the bottom right!</div>
<ul class="blocks">
<li class="block"></li>
<li class="block"></li>
<li class="block"></li>
<li class="block"></li>
</ul>
</div>
<span>Below Container</span>
Create this in a Codepen (In-class Codepen assignment #6)
<nav>
<a href="/">Home</a>
<a href="/about.html">About</a>
<a href="/blog.html">Blog</a>
<a href="/contact.html">Contact</a>
</nav>
body {
margin-right: auto;
margin-left: auto;
width: 960px;
}
How can this work within Dobot?
Read Shay Howe’s Opening the Box Model and Positioning Content
Finish CSS for Dobot shop
UX Audit: Pleasure to burn
Work on Dobot
Intro to UX
Intro to Accessibility w/ the other web class
Put background colors on elements to see what space it takes up.
It may not be what you expect.
.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
Wikipedia says: is the process of enhancing customer satisfaction and loyalty by improving the usability, ease of use, and pleasure provided in the interaction between the customer and the product. User experience design encompasses traditional human-computer interaction design, and extends it by addressing all aspects of a product or service as perceived by users. User experience is any aspect of a person's interaction with a given IT system, including the interface, graphics, industrial design, physical interaction, and the manual.
With modern browsers
With old browsers
Who can’t see well
Who can’t see at all
Who visit your site every day
Who are visiting for the first time
Who aren’t people, but machines (SEO, access tech)
Underline signifies a link
hi@something.com
massart.edu
Extra links - like “Privacy Policy”, “Terms of Use” are where?
Some tools:
Pen & paper, Balsamiq, Mockingbird, Omnigraffle, And More!
http://massart.andrewringler.com/
web1-f16/materials/slides/6.pdf
Complete Dobot shop (Test for accessibility)
Wireframe and sitemap for final project
Start collecting content for final project (if portfolio, gather all images of work)
Read Shay Howe’s Responsive Web Design
Wikipedia says: Responsive web design (RWD) is a web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from mobile phones to desktop computer monitors)
Example: The Great Discontent
Write the code once and have it functional
and legible across many devices.
People are using a wide range of devices to complete their tasks now. Reading on mobile phones, shopping on tablets, etc.
"The first major, high-traffic, content-heavy website to adopt a responsive design" - Beaconfire Wire
"Raise[d] public awareness of this flexible, standards-based, multi-platform and user-focused web design approach"
- Jeffrey Zeldman
In-class CodePen assignment:
The font is Montserrat and the teal is #8affbf. Write CSS that changes the font sizes at different media queries.
Why mobile first?
Responsive Dobot shop (due class after next)
Read Ethan Marcotte’s Responsive Web Design
Work on design of final project (due class after next)
Check in on responsive Dobot and final project designs
Designing for Mobile
Add at least one media query to Responsive Dobot
Test on a device or with a simulator
Did anything not appear how you wanted it to?
Don’t forget this meta tag!
Why we are seeing more flat design
Why SVG's are awesome
Don't fight the web, work with it!
Doing as much of the design with CSS makes it more editable and if images are needed, they must be flexible
No hover states for touch screens, so don't hide content that can only be viewed by hover
Touch target sizes (Recommended > 44px by 44px)
Makes text look great, but what happens to images?
Need to double height and width for crisp images
What does this mean for performance?
Don’t make users to more work than they have to
(Smart keyboards, default values, autocomplete, etc.)
Don’t make users pinch to zoom, but allow them to zoom if they need to magnify something
How should thing layout at different browser widths? Stacking combined with resizing.
Follow good conventions
Menu items all fit in a small space at the top of the screen
Pros - very scannable, no digging
Cons - multiple rows?
Tapping the hamburger icon shows a list of main menu items
Pros - can fit larger menu, scrollable
Cons - lower discoverability, less efficient
Responsive Dobot shop due
Finish visual design of final project
Check final project designs and any questions on Dobot
Introduction to web typography
For more on how to use @fontface:
https://css-tricks.com/snippets/css/using-font-face/
@font-face {
font-family: 'MyWebFont';
src: url('myfont.woff2') format('woff2'),
url('myfont.woff') format('woff');
}
We have more fonts to use!
Dynamic, selectable, printable, and easily edited text
Easy to implement
Easy to overuse
Licensing - if it’s not open sourced and
you don’t have a license - don’t use it
Can have FOUT (flash of unstyled text)
Hosted platforms
Buying a License
Free Fonts
Quality not guarantee
Unknown rendering (hinting)
Poorly drawn
Poorly kerned
Incomplete set
Make sure you own the license
Read the End User License Agreement (EULA)
Desktop licenses are not the same as web
Avoid liability issues
Does the number one, capital “i”, and lowercase “L”
need to be distinct?
At small sizes fonts with larger variation in weights
will be harder to read.
Always honor your content and audience first. Choose fonts that are relevant to your subject before choosing what’s new and trendy.
According to Robert Bringhurst 45 to 75.
Recent web studies show that 66 might be the “web ideal”
@font-face {
font-family: 'quatro';
src: url('/fonts/quatroslab_regular-webfont.eot');
src: url('/fonts/quatroslab_regular-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/quatroslab_regular-webfont.woff2') format('woff2'),
url('/fonts/quatroslab_regular-webfont.woff') format('woff'),
url('/fonts/quatroslab_regular-webfont.ttf') format('truetype'),
url('/fonts/quatroslab_regular-webfont.svg#quatro_slabregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'etica-semibold';
src: url('/fonts/lft_etica_semibold-webfont.eot');
src: url('/fonts/lft_etica_semibold-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/lft_etica_semibold-webfont.woff2') format('woff2'),
url('/fonts/lft_etica_semibold-webfont.woff') format('woff'),
url('/fonts/lft_etica_semibold-webfont.ttf') format('truetype'),
url('/fonts/lft_etica_semibold-webfont.svg#lft_etica_sbsemibold') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'etica';
src: url('/fonts/lft_etica_reg-webfont.eot');
src: url('/fonts/lft_etica_reg-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/lft_etica_reg-webfont.woff2') format('woff2'),
url('/fonts/lft_etica_reg-webfont.woff') format('woff'),
url('/fonts/lft_etica_reg-webfont.ttf') format('truetype'),
url('/fonts/lft_etica_reg-webfont.svg#lft_eticaregular') format('svg');
font-weight: normal;
font-style: normal;
}
In-class CodePen assignment:
Add your favorite Google Fonts font
to an h1 that thickens font-weight upon hover
lettering.js
typebutter.com
fittextjs.com
http://kerningjs.com/
http://www.kernjs.com/
ifontyou.com
typedia.com
https://css-tricks.com/snippets/html/open-link-in-a-new-window/
target="_blank"
Final project: Write all HTML (must validate!), have all pages connected, all images uploaded, begin CSS
Final project working session
Intro jQuery
Work on final projects
In-class CodePen assignment
In-class CodePen assignment from Poster League’s footer
Awesome if you can use inline SVG’s, but you can
also use images that are in the SVG format.
<body>
<svg display="none" width="0" height="0" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
Add your symbols here
</defs>
</svg>
...
</body>
<svg class="icon icon-twitter"><use xlink:href="#icon-twitter"></use></svg>
Final project!
Final project working session
Present your projects!
<3
Email: acacheung@gmail.com
Twitter: @acacheung