ah teaches information design (Accessible styling lecture)
Accessible styling
Lecture outline
An introduction to responsive web design and styling your HTML with CSS. Lecture slides will be made available on the day of the lecture (October 14).
Critiques
Please be back in class by 12:15 in preparation for today's lecture.
While critiques are happening please complete both of the following:
- A teamwork reflection for this week
- An in-class activity for this week
Critiques are tight this week please take notes.
- Mehru is currently meeting with Team ...
- Andrew is currently meeting with Team ...
P1 grades release
P1 grades will be released later today or tomorrow. Please review the rubric and email Andrew if you have questions or concerns. Mehru will be unable to discuss grade concerns.
HTML exercise feedback
Grades and feedback on the HTML exercise will provide you with directions for improving your code. Please make sure to read the comments as it will help explain how to improve your HTML moving forward.
CSS3
Cascading Style Sheets
While HTML defines the structure of the content on the page, CSS styles the page to ensure the user get's something usable. Good code will clearly separate semantic markup from styling.
Keeping them apart
A real Romeo/Juliet scenario
Rules for keeping them separate
- Do not use HTML to define styling; i.e.
...<br>, <i>, <b> - Do not use inline CSS styling;
<section style="color: blue;"> - Keep files separate; .html defines content, .css defines style, never shall they meet
Let's talk CSS
Oops, this code did not quite load. Please view it at https://codepen.io/andrewhaw/pen/ee24f2587ef3b5062ca772d9dd7dd589
CSS sampler
Oops, this code did not quite load. Please view it at https://codepen.io/andrewhaw/pen/62ada58a7aeb3895c7c88edaac85deed
ID vs. class
IDs must always be unique, <section id="kittens"> they can only be specified once per HTML file. While classes can be used as many times as needed — <section class="group">
Specificity
The order in which things are read
Theshould never be usedstyleattribute:- ID's: #home, #cool-stuff
- Classes, attributes & pseudo-classes: .home, [class], :hover
Units in CSS
In the journey to responsiveness, we want to aim for relative and scalable units as much as possible.
Rems
Rems — root-ems — are units responsive to the font-size set by the browser which help us establish easy relationships in type. As a general rule of thumb, setting your paragraphs to 1rem and scaling other things accordingly is better practice.
Oops, this code did not quite load. Please view it at https://codepen.io/andrewhaw/pen/4f1412454dca14e42d3e5d678d364aaf
Dev tools
Your new best friend
Ever wanted to know what the slides would look like with a red background? Right-click and 'Inspect Element' opens up the development tools to mess around with things in.
The box model
content-box vs border-box
Oops, this code did not quite load. Please view it at https://codepen.io/andrewhaw/pen/a63b4e018122c1404ed8ff7999cafc1f
Code tutorial
Get set up with today's code tutorial files at 235.ah.link/t02
Break time!
Please return for class in 10 minutes