Theory Lectures v2 SMALLER
Theory Lectures v2 SMALLER
SLIDES FOR
THEORY
LECTURES
DON’T SKIP THEM, THEY ARE
SUPER IMPORTANT 🤓)
Follow me here
(
📖 TABLE OF CONTENTS THEORY LECTURES CLICK THE TITLES
1 A High-Level Overview of Web Development 13 box-sizing: border-box 25 Web Design Rules #9 User Experience UX
3 Introduction to HTML 15 A CSS Grid Overview 27 Web Design Rules #10 I Elements and Components
4 Introduction to CSS 16 Overview of Web Design and Website Personalities 28 Switching flex-direction to column
5 Working With Colors 17 Web Design Rules #1 Typography 29 Vertical center with absolute position and transform
6 CSS Theory #1 Conflicts Between Selectors 18 Web Design Rules #2 Colors 30 Web Design Rules #10 II Layout Patterns
7 CSS Theory #2 Inheritance and Universal Selector 19 Web Design Rules #3 Images and Illustrations 31 The 7 Steps to a Great Website
8 CSS Theory #3 The CSS Box Model 20 Web Design Rules #4 Icons 32 Defining and Planning the Project Steps 1 and 2
9 CSS Theory #4 Types of Boxes 21 Web Design Rules #5 Shadows 33 Sketching Initial Layout Ideas Step 3
10 CSS Theory #5 Absolute Positioning 22 Web Design Rules #6 Border-radius 34 Responsive Design Principles
11 The 3 Ways of Building Layouts 23 Web Design Rules #7 Whitespace 35 How Media Queries Work
12 Using Floats 24 Web Design Rules #8 Visual Hierarchy 36 How to Select Breakpoints
:
:
:
:
:
:
:
:
:
:
:
:
:
:
-
-
:
:
(
(
)
(
)
)
:
(
)
SECTION 01
WELCOME AND FIRST
STEPS
—
SECTION
WELCOME AND FIRST STEPS
LECTURE
A HIGH LEVEL OVERVIEW OF WEB
DEVELOPMENT
-
FRONT END VS. BACK END DEVELOPMENT
📄 index.html 📄 style.css
📄 index.html 📄 style.css
https://omnifood.dev
📄 script.js 📄 image.jpg
📄 script.js 📄 image.jpg
REQUEST WEB
BROWSER SERVER
👩💻 🌐
RESPONSE
-
-
FRONT END VS. BACK END DEVELOPMENT
APP
REQUEST WEB ⚙
BROWSER SERVER
👩💻 🌐
RESPONSE DB
🗄 etc...
The 3 languages that
browsers understand
Back-end
The process FRONT END BACK END languages that
of writing DEVELOPMENT DEVELOPMENT run on servers
-
-
-
-
THE 3 LANGUAGES OF THE FRONT END
CONTENT NOUNS
<p></p>
means “paragraph”
ADJECTIVES VERBS
p.hide();
p {color: red}
means “hide the
means “the
paragraph”
paragraph text is red”
:
-
SECTION
WELCOME AND FIRST STEPS
LECTURE
WATCH BEFORE YOU START!
SOME QUICK CONSIDERATIONS BEFORE WE START... 🚀
😱 If this is your first time ever writing code, please don’t get overwhelmed. It’s 100% normal that you will
not understand everything at the beginning. Just don’t think “I guess coding is not for me”!
SOME QUICK CONSIDERATIONS BEFORE WE START... 🚀
👩💻 You need to code along with me! You will learn ZERO HTML and CSS skills by just sitting and watching me
code. You really have to write code YOURSELF!
SOME QUICK CONSIDERATIONS BEFORE WE START... 🚀
📝 If you want the course material to stick, take notes. Notes on code syntax, notes on theory concepts,
notes on everything!
🤓 Try all the coding challenges! Try to do your best, but if you get stuck for too long, watch the solution.
Don’t beat yourself up if you can’t figure it out! Just rewatch the lectures that were covered in the
challenge, try to understand them better, and move on.
⏳ Before moving on from a section, make sure that you understand exactly what was covered. Take a
break, review the code we wrote, review your notes, review the projects we built, and maybe even write
some code yourself.
✅ ✅ ✅
SOME QUICK CONSIDERATIONS BEFORE WE START... 🚀
⁉ If you have an error or a question, start by trying to solve it yourself! This is essential for your progress. If
you can’t solve it, check the Q&A section. If that doesn’t help, you can ask a new question. Use a short
description, and post code on codepen.io.
😲 3
SOME QUICK CONSIDERATIONS BEFORE WE START... 🚀
🖥 I recorded this course on a Mac, but everything works the exact same way on Windows or Linux. If
something doesn’t work on your computer, it’s NOT because you’re using a different OS.
SOME QUICK CONSIDERATIONS BEFORE WE START... 🚀
😍 Most importantly, have fun! It’s so rewarding to see something that YOU have built YOURSELF! So if you’re
feeling frustrated, stop whatever you’re doing, and come back later!
SECTION
HTML FUNDAMENTALS
LECTURE
INTRODUCTION TO HTML
WHAT IS HTML?
HTML
👉 Element
👉 Opening tag: Name 👉 Content: Content of the element, in 👉 Closing tag: Same as
of the element, this example text. But it might be opening tag, but with
wrapped in < and > another element (child element). Some a /. When element has
elements have no content (e.g. <img>) no content, it’s omitted
SECTION 03
CSS FUNDAMENTALS
—
SECTION
CSS FUNDAMENTALS
LECTURE
INTRODUCTION TO CSS
WHAT IS CSS?
CSS
A CSS RULE
Selector Declaration block
h1 {
color: blue;
text-align: center;
font-size: 20px; Declaration / Style
}
Property Value
SECTION
CSS FUNDAMENTALS
LECTURE
WORKING WITH COLORS
THE RGB MODEL
R G B
255 0 0
👉 RGB Model: Every color can
be represented by a R G B R G B
combination of RED, GREEN 255 255 0 255 0 255
and BLUE
0 255
0 255 R G B R G B
0 255 0 0 0 255
0 255
R G B
0 255 255
SECTION
CSS FUNDAMENTALS
LECTURE
CSS THEORY #1 CONFLICTS
BETWEEN SELECTORS
:
CONFLICTING SELECTORS AND DECLARATIONS
No inline style?
👉 Last selector in
3 ID #) selector Multiple? code applies *
No # selector?
LECTURE
CSS THEORY #2 INHERITANCE
AND THE UNIVERSAL SELECTOR
:
HOW INHERITANCE WORKS
Parent
element
OVERRIDING
INHERITED STYLES
☝ Not all properties get inherited. It’s mostly ones related to text: font-family, font-size, font-weight, font-
style, color, line-height, letter-spacing, text-align, text-transform, text-shadow, list-style, etc.
SECTION
CSS FUNDAMENTALS
LECTURE
CSS THEORY #3 THE CSS BOX
MODEL
:
THE CSS BOX MODEL
Visible part of element on the page
FILL AREA border 👉 Fill area: Area that gets filled with
background color or background
image
border
Content area
margin
padding
ELEMENT HEIGHT AND WIDTH CALCULATION
SECTION
CSS FUNDAMENTALS
LECTURE
CSS THEORY #4 TYPES OF
BOXES
:
BLOCK LEVEL ELEMENTS
INLINE ELEMENTS
👉 Elements formatted visually as 👉 Looks like inline from the 👉 Occupies only content’s space
blocks outside, behaves like block-
level on the inside 👉 Causes no line-breaks
👉 100% of parent’s width
👉 Occupies only content’s space 👉 Box model is different: heights
👉 Vertically, one after another and widths do not apply
👉 Causes no line-breaks
👉 Box-model applies as showed 👉 Paddings and margins only
👉 Box-model applies as showed horizontal (left and right)
display: inline-block
-
-
-
-
SECTION
CSS FUNDAMENTALS
LECTURE
CSS THEORY #5 ABSOLUTE
POSITIONING
:
NORMAL FLOW VS. ABSOLUTE POSITIONING
NORMAL ABSOLUTE
FLOW POSITIONING
Default positioning
position: absolute
position: relative
100px
.el {
200px position: absolute;
top: 100px;
left: 200px;
background-color: #f4b33f;
}
.container {
position: relative;
background-color: #f7e6c1;
}
SECTION 04
LAYOUTS FLOATS,
FLEXBOX, AND CSS
GRID FUNDAMENTALS
:
—
SECTION
LAYOUTS FLOATS, FLEXBOX, AND
CSS GRID FUNDAMENTALS
LECTURE
THE 3 WAYS OF BUILDING
LAYOUTS
:
WHAT DOES “LAYOUT” MEAN?
LAYOUT
PAGE
LAYOUT
COMPONENT LAYOUT
THE 3 WAYS OF BUILDING LAYOUTS WITH CSS
1 2 3
LECTURE
USING FLOATS
:
ABSOLUTE POSITIONING VS. FLOATS
NORMAL ABSOLUTE
FLOATS
FLOW POSITIONING
👉 Default positioning
SECTION
LAYOUTS FLOATS, FLEXBOX, AND
CSS GRID FUNDAMENTALS
LECTURE
BOX SIZING BORDER BOX
-
:
:
-
THE BOX MODEL WITH BOX SIZING BORDER BOX
box-sizing: border-box
Final element width = right border + right padding + width + left padding + left border
Final element height = top border + top padding + height + bottom padding + bottom border
-
:
-
SECTION
LAYOUTS FLOATS, FLEXBOX, AND
CSS GRID FUNDAMENTALS
LECTURE
A FLEXBOX OVERVIEW
:
WHAT IS FLEXBOX?
FLEXBOX
👉 The main idea behind flexbox is that empty space inside a container element
can be automatically divided by its child elements
👉 Flexbox is perfect for replacing floats, allowing us to write fewer and cleaner
HTML and CSS code
FLEXBOX TERMINOLOGY
MAIN AXIS
CROSS AXIS
display: flex
MAIN AXIS
👉 To align items along main axis (horizontally, by default) 👉 To allow an element to grow 0 means no, 1 means yes)
👉 To allow items to wrap into a new line if they are too large 👉 Recommended shorthand for flex-grow, -shrink, -basis.
LECTURE
A CSS GRID OVERVIEW
:
WHAT IS CSS GRID?
CSS GRID
👉 The main idea behind CSS Grid is that we divide a container element into
rows and columns that can be filled with its child elements
👉 CSS Grid is not meant to replace flexbox! Instead, they work perfectly
together. Need a 1D layout? Use flexbox. Need a 2D layout? Use CSS Grid.
Grid container
display: grid
ROW AXIS
1 2 3 4
1
Grid track/row
Grid lines
COLUMN
AXIS 2
Gutters (gaps)
3
Grid track/column Grid cell (might be
filled by a grid item
or not)
ROW AXIS
grid-template-rows: <track size>* grid-column: <start line> / <end line> | span <number>
1 1
grid-template-columns: <track size>* grid-row: <start line> / <end line> | span <number>
👉 To establish the grid row and column tracks. One length unit 👉 To place a grid item into a specific cell, based on line numbers.
for each track. Any unit can be used, new fr fills unused space span keyword can be used to span an item across more cells
👉 To create empty space between tracks 👉 To overwrite justify-items / align-items for single items
SECTION
WEB DESIGN RULES AND
FRAMEWORK
LECTURE
OVERVIEW OF WEB DESIGN AND
WEBSITE PERSONALITIES
WEB DESIGN VS. DEVELOPMENT
✅ Creates an immediate and lasting good 🚫 Makes users believe the brand doesn’t
impression of the brand or product; really care about their product or service;
✅ Makes the user trust the brand right 🚫 Makes the user insecure about trusting
away; the brand;
✅ Increases the user’s perceived value of the 🚫 Makes the brand or product seem
brand or product; “cheap”;
✅ Gives users exactly what they were 🚫 Leaves users confused, and makes it
looking for when coming to the site, e.g. hard to for them to reach their goal.
purchasing a product or finding information.
1 Typography 6 Border-radius
2 Colors 7 Whitespace
5 Shadows 10 Components/Layout
Plain/Neutral: Design that gets out of the way by using neutral and small
3
typefaces, and a very structured layout. Common in big corporations
OVERVIEW OF WEBSITE PERSONALITIES
Plain/Neutral: Design that gets out of the way by using neutral and small
3
typefaces, and a very structured layout. Common in big corporations
Plain/Neutral: Design that gets out of the way by using neutral and small
3
typefaces, and a very structured layout. Common in big corporations
Plain/Neutral: Design that gets out of the way by using neutral and small
3
typefaces, and a very structured layout. Common in big corporations
Plain/Neutral: Design that gets out of the way by using neutral and small
3
typefaces, and a very structured layout. Common in big corporations
LECTURE
WEB DESIGN RULES #1
TYPOGRAPHY
:
SOME CONCEPTS FIRST...
TYPOGRAPHY
Serifs
Text Text
Serif typeface Sans-serif typeface
Inter
Open Sans
Roboto
Montserrat
All tools are listed
on my resources
Work Sans page at jonas.io
Lato
-
USE GOOD TYPEFACES
SERIF 🛠 TOOLBOX
Merriweather
Aleo
Playfair Display
Cormorant
All tools are listed
on my resources
Cardo page at jonas.io
Lora
USE GOOD TYPEFACES
2 It’s okay to use just one typeface per page! If you want more, limit to 2 typefaces.
👉 Choose the right personality for your website (more on this later)
👉 Experiment with all the “good” typefaces (and other typefaces from Google Fonts! to see
which ones best fits your website’s message (this will come with experience)
👉 You can keep trying different typefaces as you design and build the page
)
USE GOOD FONT SIZES AND WEIGHTS
24px
4 When choosing font-sizes, limit choices! Use a
“type scale” tool or other pre-defined range 32px
18px
7 For headlines, you can go really big 50px+)
and bold 600 , depending on personality
64px, 700
8 For any text, don’t use a font weight
under 400 (regular)
20px
(
+
)
(
CREATE A GOOD READING EXPERIENCE
😃 😡
110 chars
95 112 chars
65 72 chars
-
-
CREATE A GOOD READING EXPERIENCE
1.31
1.52 2.2
CREATE A GOOD READING EXPERIENCE
LECTURE
WEB DESIGN RULES #2 COLORS
:
CHOOSE THE RIGHT COLOR
1 Make the main color match your website’s personality: colors convey meaning!
Red draws a lot of attention, and symbolizes power, passion, and excitement
Black symbolizes power, elegance and minimalism, but also grief and sorrow
CHOOSE THE RIGHT COLOR
1 Make the main color match your website’s personality: colors convey meaning!
2 Use a good color tone! Don’t choose a random tone or CSS named colors.
🛠 TOOLBOX
CHOOSE THE RIGHT COLOR
1 Make the main color match your website’s personality: colors convey meaning!
2 Use a good color tone! Don’t choose a random tone or CSS named colors.
🛠 TOOLBOX
ESTABLISH A COLOR SYSTEM
3 You need at least two types of colors in your color palette: a main color and a grey color
4 With more experience, you can add more colors: accent (secondary) colors (use a tool)
COLOR
PALETTE
ESTABLISH A COLOR SYSTEM
3 You need at least two types of colors in your color palette: a main color and a grey color
4 With more experience, you can add more colors: accent colors (use a tool)
5 For diversity, create lighter and darker “versions” (tints and shades)
🛠 TOOLBOX
TINTS
(“LIGHTER”)
COLOR
palleton.com
PALETTE
SHADES
(“DARKER”)
WHEN AND HOW TO USE COLORS
6 Use your main color to draw attention to the most important elements on the page
WHEN AND HOW TO USE COLORS
6 Use your main color to draw attention to the most important elements on the page
WHEN AND HOW TO USE COLORS
6 Use your main color to draw attention to the most important elements on the page
WHEN AND HOW TO USE COLORS
6 Use your main color to draw attention to the most important elements on the page
7 Use colors to add interesting accents or make entire components or sections stand out
WHEN AND HOW TO USE COLORS
6 Use your main color to draw attention to the most important elements on the page
7 Use colors to add interesting accents or make entire components or sections stand out
WHEN AND HOW TO USE COLORS
6 Use your main color to draw attention to the most important elements on the page
7 Use colors to add interesting accents or make entire components or sections stand out
WHEN AND HOW TO USE COLORS
6 Use your main color to draw attention to the most important elements on the page
7 Use colors to add interesting accents or make entire components or sections stand out
8 You can try to use your color strategically in images and illustrations
COLORS AND TYPOGRAPHY
9 On dark colored backgrounds, try to use a tint of the background (“lighter version”) for text
😃 😐
COLORS AND TYPOGRAPHY
9 On dark colored backgrounds, try to use a tint of the background (“lighter version”) for text
10 Text should usually not be completely black. Lighten if up it looks heavy and uninviting
😃 😐
COLORS AND TYPOGRAPHY
9 On dark colored backgrounds, try to use a tint of the background (“lighter version”) for text
10 Text should usually not be completely black. Lighten it up it looks heavy and uninviting
♿ 11 Don’t make text too light! Use a tool to check contrast between text and background colors
☝ Contrast ratio needs to be at least 4.5 1 for normal text and 3 1 for large text 18px+)
😃 😡
13 1 2.9 1
5.1 1 2.9 1
:
:
:
:
:
:
(
SECTION
WEB DESIGN RULES AND
FRAMEWORK
LECTURE
WEB DESIGN RULES #3 IMAGES
AND ILLUSTRATIONS
:
USE GOOD IMAGES
2 Use images to support your website’s message and story. So only use relevant images!
😃
USE GOOD IMAGES
2 Use images to support your website’s message and story. So only use relevant images!
?
🤔
?
? ?
USE GOOD IMAGES
2 Use images to support your website’s message and story. So only use relevant images!
3 Prefer original images. If not possible, use original-looking stock images (not generic ones!
2 Use images to support your website’s message and story. So only use relevant images!
3 Prefer original images. If not possible, use original-looking stock images (not generic ones!
2 Use images to support your website’s message and story. So only use relevant images!
3 Prefer original images. If not possible, use original-looking stock images (not generic ones!
2 Use images to support your website’s message and story. So only use relevant images!
3 Prefer original images. If not possible, use original-looking stock images (not generic ones!
🛠 TOOLBOX
)
USE IMAGES WELL
😃 😡
:
HANDLING TEXT ON IMAGES
10 To account for high-res screens, make image dimensions 2x as big as their displayed size
2x
x
=
SOME TECHNICAL DETAILS
10 To account for high-res screens, make image dimensions 2x as big as their displayed size
😡 Blurry image on
high-res screen
1x
😃 Looks okay on
low-res screen
x
=
SOME TECHNICAL DETAILS
10 To account for high-res screens, make image dimensions 2x as big as their displayed size
🛠 TOOLBOX
😡 😃
SOME TECHNICAL DETAILS
10 To account for high-res screens, make image dimensions 2x as big as their displayed size
12 When using multiple images side-by-side, make sure they have the exact same dimensions
😃 😡
SECTION
WEB DESIGN RULES AND
FRAMEWORK
LECTURE
WEB DESIGN RULES #4 ICONS
:
USE GOOD ICONS
1 Use a good icon pack, there are tons of free and paid icons packs
🛠 TOOLBOX
Phosphor icons
1 Use a good icon pack, there are tons of free and paid icons packs
2 Use only one icon pack. Don’t mix icons from different icon packs
😡
This icon has a
completely different
style: filled and
boxy/squared
USE GOOD ICONS
1 Use a good icon pack, there are tons of free and paid icons packs
2 Use only one icon pack. Don’t mix icons from different icon packs
3 Use SVG icons or icon fonts. Don’t use bitmap image formats (.jpg and .png)!
😡 😃
👉 “Regular images” JPG, PNG, GIF 👉 SVG images and icon fonts
1 Use a good icon pack, there are tons of free and paid icons packs
2 Use only one icon pack. Don’t mix icons from different icon packs
3 Use SVG icons or icon fonts. Don’t use bitmap image formats (.jpg and .png)!
7 Use icons associated with actions, and label them (unless no space or icon is 100% clear)
7 Use icons associated with actions, and label them (unless no space or icon is 100% clear)
9 To keep icons neutral, use same color as text. To draw more attention, use different color
USE ICONS WELL
9 To keep icons neutral, use same color as text. To draw more attention, use different color
10 Don’t confuse your users: icons need to make sense and fit the text or action!
😡
?
? ?
USE ICONS WELL
9 To keep icons neutral, use same color as text. To draw more attention, use different color
10 Don’t confuse your users: icons need to make sense and fit the text or action!
11 Don't make icons larger than what they were designed for. If needed, enclose them in a shape
😃 😡
LECTURE
WEB DESIGN RULES #5
SHADOWS
:
SOME CONCEPTS FIRST...
👉 After an era of 100% flat design, we’re now back to using shadows in UI design (“flat design 2.0”)
👉 After an era of 100% flat design, we’re now back to using shadows in UI design (“flat design 2.0”)
👉 Shadow creates depth 3D the more shadow, the further away from the interface the element is
3D VIEW
FRONT
VIEW
SIDE
VIEW
1 You don’t have to use shadows! Only use them if it makes sense for the website personality
1 You don’t have to use shadows! Only use them if it makes sense for the website personality
😡 😃
?
?
USE SHADOWS WELL
1 You don’t have to use shadows! Only use them if it makes sense for the website personality
😃 😡
USE SHADOWS IN THE RIGHT SITUATION
4 Use small shadows for smaller elements that should stand out (to draw attention)
USE SHADOWS IN THE RIGHT SITUATION
4 Use small shadows for smaller elements that should stand out (to draw attention)
5 Use medium-sized shadows for larger areas that should stand out a bit more
USE SHADOWS IN THE RIGHT SITUATION
4 Use small shadows for smaller elements that should stand out (to draw attention)
5 Use medium-sized shadows for larger areas that should stand out a bit more
USE SHADOWS IN THE RIGHT SITUATION
4 Use small shadows for smaller elements that should stand out (to draw attention)
5 Use medium-sized shadows for larger areas that should stand out a bit more
6 Use large shadows for elements that should really float above the interface
USE SHADOWS IN THE RIGHT SITUATION
4 Use small shadows for smaller elements that should stand out (to draw attention)
5 Use medium-sized shadows for larger areas that should stand out a bit more
6 Use large shadows for elements that should really float above the interface
4 Use small shadows for smaller elements that should stand out (to draw attention)
5 Use medium-sized shadows for larger areas that should stand out a bit more
6 Use large shadows for elements that should really float above the interface
LECTURE
WEB DESIGN RULES #6
BORDER RADIUS
-
:
USE BORDER RADIUS WELL
1 Use border-radius to increase the playfulness and fun of the design, to make it less serious
1 Use border-radius to increase the playfulness and fun of the design, to make it less serious
2 Typefaces have a certain roundness: make sure that border-radius matches that roundness!
1 Use border-radius to increase the playfulness and fun of the design, to make it less serious
2 Typefaces have a certain roundness: make sure that border-radius matches that roundness!
3 Use border-radius on buttons, images, around icons, standout sections and other elements
-
USE BORDER RADIUS WELL
1 Use border-radius to increase the playfulness and fun of the design, to make it less serious
2 Typefaces have a certain roundness: make sure that border-radius matches that roundness!
3 Use border-radius on buttons, images, around icons, standout sections and other elements
-
USE BORDER RADIUS WELL
1 Use border-radius to increase the playfulness and fun of the design, to make it less serious
2 Typefaces have a certain roundness: make sure that border-radius matches that roundness!
3 Use border-radius on buttons, images, around icons, standout sections and other elements
-
USE BORDER RADIUS WELL
1 Use border-radius to increase the playfulness and fun of the design, to make it less serious
2 Typefaces have a certain roundness: make sure that border-radius matches that roundness!
3 Use border-radius on buttons, images, around icons, standout sections and other elements
-
USE BORDER RADIUS WELL
1 Use border-radius to increase the playfulness and fun of the design, to make it less serious
2 Typefaces have a certain roundness: make sure that border-radius matches that roundness!
3 Use border-radius on buttons, images, around icons, standout sections and other elements
-
SECTION
WEB DESIGN RULES AND
FRAMEWORK
LECTURE
WEB DESIGN RULES #7
WHITESPACE
:
WHY WHITESPACE 😡 😃
👉 Whitespace communicates
how different pieces of
information are related to
one another
192px
1 Use tons of whitespace between
sections
192px
192px
WHERE TO USE WHITESPACE
160px
140px
WHERE TO USE WHITESPACE
152px
24px
WHERE TO USE WHITESPACE
😡
1 Use tons of whitespace between
sections
😃
3 Use whitespace between elements
5 The more some elements (or groups of elements) belong together, the closer they should be!
The “Law of
Proximity”
😡 No separation between
elements, confusing spacing
5 The more some elements (or groups of elements) belong together, the closer they should be!
5 The more some elements (or groups of elements) belong together, the closer they should be!
5 The more some elements (or groups of elements) belong together, the closer they should be!
6 Start with a lot of whitespace, maybe even too much! Then remove whitespace from there
☝ Too much whitespace looks detached, too little looks too crammed
❓❓
😡 Everything
is detached
5 The more some elements (or groups of elements) belong together, the closer they should be!
6 Start with a lot of whitespace, maybe even too much! Then remove whitespace from there
☝ Too much whitespace looks detached, too little looks too crammed
7 Match other design choices. If you have big text or big icons, you need more whitespace
5 The more some elements (or groups of elements) belong together, the closer they should be!
6 Start with a lot of whitespace, maybe even too much! Then remove whitespace from there
☝ Too much whitespace looks detached, too little looks too crammed
7 Match other design choices. If you have big text or big icons, you need more whitespace
8 Try a hard rule, such as using multiples of 16px for all spacing
96px
SECTION
WEB DESIGN RULES AND
FRAMEWORK
LECTURE
WEB DESIGN RULES #8 VISUAL
HIERARCHY
:
WHAT IS VISUAL HIERARCHY?
1 Position important elements closer to the top the page, where they get more attention
ATTENTION FLOWS
DOWN THE PAGE
AND COMPONENTS
Most important
call-to-action, close
to top of the page
(
)
VISUAL HIERARCHY FUNDAMENTALS
1 Position important elements closer to the top the page, where they get more attention
2 Use images mindfully, as they draw a lot of attention (larger images get more attention)
VISUAL HIERARCHY FUNDAMENTALS
1 Position important elements closer to the top the page, where they get more attention
2 Use images mindfully, as they draw a lot of attention (larger images get more attention)
4 For text elements, use font size, font weight, color, and whitespace to convey importance
😡 Confusing! No hierarchy
at all
4 For text elements, use font size, font weight, color, and whitespace to convey importance
20px
20px
40px
20px
Color
Bolder
Lighter
accent
font
color
weight
to to
emphasize
to
de-emphasize
emphasize text
text
text
14px
12px
14px
😡 Confusing! No
hierarchy at all 🙂 Increasing font sizes
and adding whitespace 😃 Adding font weight
and color. Perfect!
VISUAL HIERARCHY FOR TEXT ELEMENTS
4 For text elements, use font size, font weight, color, and whitespace to convey importance
Eye-catching
background color
4 For text elements, use font size, font weight, color, and whitespace to convey importance
5 What text elements to emphasize? Titles, sub-titles, links, buttons, data points, icons
☝ You can also de-emphasize less important text, like labels or secondary/additional information
Title Sub-title
Title
Icon Link
Icon
Sub-title
Link
VISUAL HIERARCHY FOR TEXT ELEMENTS
4 For text elements, use font size, font weight, color, and whitespace to convey importance
5 What text elements to emphasize? Titles, sub-titles, links, buttons, data points, icons
☝ You can also de-emphasize less important text, like labels or secondary/additional information
Important
Sub-title data points
Important Icons
data points
De-emphasizing label
De-emphasizing
additional information
Icons
Data
point
Very subtle button
De-emphasizing buttons (on
(focus is on prices)
instagram, all focus is on photos)
VISUAL HIERARCHY BETWEEN COMPONENTS
6 Emphasize an important component using background color, shadow, or border (or multiple)
VISUAL HIERARCHY BETWEEN COMPONENTS
6 Emphasize an important component using background color, shadow, or border (or multiple)
VISUAL HIERARCHY BETWEEN COMPONENTS
6 Emphasize an important component using background color, shadow, or border (or multiple)
Component A Component B
Component A has been made more
prominent simply by de-emphasizing B
VISUAL HIERARCHY BETWEEN COMPONENTS
6 Emphasize an important component using background color, shadow, or border (or multiple)
6 Emphasize an important component using background color, shadow, or border (or multiple)
6 Emphasize an important component using background color, shadow, or border (or multiple)
6 Emphasize an important component using background color, shadow, or border (or multiple)
LECTURE
WEB DESIGN RULES #9 USER
EXPERIENCE UX
(
)
:
WHAT IS USER EXPERIENCE UX ?
(
(
)
)
(
)
UI AND UX DESIGN
UX
UI UX
Design Design Each creates
a different
experience
UX DESIGN GUIDING PRINCIPLE GOALS
USER BUSINESS
GOALS GOALS Highlighting an option in the
product pricing table:
:
UX RULES FOR USABILITY
🤔 😃
UX RULES FOR USABILITY
🤔 😃
Reserve
UX RULES FOR USABILITY
3 Use blue text and underlined text only for links! Looks 100% like a
link, but isn’t one!
😃 😡
UX RULES FOR USABILITY
8 Use a descriptive, keyword-focused headline on your main page. Don’t be vague or fancy!
😃 🤔
UX RULES FOR WEBSITE CONTENT
8 Use a descriptive, keyword-focused headline on your main page. Don’t be vague or fancy!
9 Only include relevant information, efficiently! Cut out fluff and make the content 100% clear
😃
UX RULES FOR WEBSITE CONTENT
8 Use a descriptive, keyword-focused headline on your main page. Don’t be vague or fancy!
9 Only include relevant information, efficiently! Cut out fluff and make the content 100% clear
😃
UX RULES FOR WEBSITE CONTENT
8 Use a descriptive, keyword-focused headline on your main page. Don’t be vague or fancy!
9 Only include relevant information, efficiently! Cut out fluff and make the content 100% clear
LECTURE
THE WEBSITE PERSONALITIES
FRAMEWORK
-
-
THE WEBSITE PERSONALITIES FRAMEWORK
Distilled into
7 website personalities
-
-
THE WEBSITE PERSONALITIES FRAMEWORK
2 Minimalist/Simple
Choose one of the website
3 Plain/Neutral personalities accordingly
4 Bold/Confident
6 Startup/Upbeat
7 Playful/Fun
Typography Colors Images Icons Shadows Border-radius Layout
-
-
PERSONALITY 01 SERIOUS/ELEGANT
📋 OVERVIEW Design for luxury and elegance, based on thin serif typefaces,
golden or pastel colors, and big high-quality images
⚛ ICONS 🤷 Usually no icons, but thin icons and lines may be used
🌇 IMAGES Few images, which can be used to add some color to the
design. Usually no illustrations, but if, than just black
⚛ ICONS 🤷 Usually no icons, but small simple black icons may be used
📋 OVERVIEW Design that gets out of the way by using very neutral and
small typefaces, and a boxy, structured, and condensed layout
🧩 LAYOUT Structured and condensed layout, with lots of boxes and rows
-
–
PERSONALITY 04 BOLD/CONFIDENT
📋 OVERVIEW For products and services that care about the consumer, which
is transmitted by calming pastel colors and soft serif headings
✍ TYPOGRAPHY Soft serif typefaces frequently used for headings, but sans-
serif headings might be used too (e.g for software products)
🌇 IMAGES Images and illustrations are usual, matching calm color palette
🎨 COLORS Blues, greens and purples are widely used. Lots of light
backgrounds (mainly gray), gradients are also common
👻 SHADOWS ✅ Subtle shadows are quite common, but not always used
BOLD
More:
👉 Boxy/squared sans-serif
typefaces
👉 Big and bold typography
Bold/Confident
👉 Bright/flashy colors
More:
More: 👉 Colorful
Calm/Peaceful 👉 Rounded corners,
👉 Headings using soft serif
typography and icons
typefaces
👉 Shadows
👉 Pastel/washed-out colors
👉 Illustrations
👉 Illustrations
CALM
MINIMALIST/SIMPLE
BOLD/CONFIDENT
BOLD/CONFIDENT
STARTUP/UPBEAT
BOLD/CONFIDENT
PLAYFUL/FUN
CALM/PEACEFUL
👉 Illustrations in
calming pastel colors
BOLD/CONFIDENT
STARTUP/UPBEAT
CALM/PEACEFUL
👉 Illustrations in calming
pastel colors
CALM/PEACEFUL
👉 Illustrations
STARTUP/UPBEAT
SECTION 06
COMPONENTS AND
LAYOUT PATTERNS
—
SECTION
COMPONENTS AND LAYOUT
PATTERNS
LECTURE
WEB DESIGN RULES #10 PART 1
ELEMENTS AND COMPONENTS
-
:
FROM ELEMENTS TO WEBPAGE
PATTERNS
Elements Components Layouts Webpage
FROM ELEMENTS TO WEBPAGE
PATTERNS
Elements Components Layouts Webpage
:
01 TEXT A ELEMENTS
01 TEXT A ELEMENTS
02 BUTTONS A ELEMENTS
03 IMAGES A ELEMENTS
04 INPUT ELEMENTS A ELEMENTS
05 TAGS A ELEMENTS
01 BREADCRUMBS B COMPONENTS
02 PAGINATION B COMPONENTS
03 ALERT AND STATUS BARS B COMPONENTS
04 STATISTICS B COMPONENTS
05 GALLERY B COMPONENTS
05 GALLERY B COMPONENTS
06 FEATURE BOX B COMPONENTS
06 FEATURE BOX B COMPONENTS
07 PREVIEW AND PROFILE CARDS B COMPONENTS
07 PREVIEW AND PROFILE CARDS B COMPONENTS
07 PREVIEW AND PROFILE CARDS B COMPONENTS
08 ACCORDION B COMPONENTS
08 ACCORDION B COMPONENTS
09 TABS B COMPONENTS
09 TABS B COMPONENTS
10 CAROUSEL B COMPONENTS
10 CAROUSEL B COMPONENTS
11 CUSTOMER TESTIMONIALS B COMPONENTS
11 CUSTOMER TESTIMONIALS B COMPONENTS
11 CUSTOMER TESTIMONIALS B COMPONENTS
12 CUSTOMER LOGOS B COMPONENTS
12 CUSTOMER LOGOS B COMPONENTS
13 FEATURED IN LOGOS B COMPONENTS
-
14 STEPS B COMPONENTS
14 STEPS B COMPONENTS
15 FORMS B COMPONENTS
15 FORMS B COMPONENTS
15 FORMS B COMPONENTS
16 TABLES B COMPONENTS
16 TABLES B COMPONENTS
17 PRICING TABLES B COMPONENTS
17 PRICING TABLES B COMPONENTS
18 MODAL WINDOWS B COMPONENTS
18 MODAL WINDOWS B COMPONENTS
SECTION
COMPONENTS AND LAYOUT
PATTERNS
LECTURE
BUILDING AN ACCORDION
COMPONENT PART 2
-
SWITCHING FLEX DIRECTION TO COLUMN
.accordion {
display: flex; WITH FLEX DIRECTION SET
gap: 24px; 1 TO COLUMN
flex-direction: column;
}
👉 align-items aligns items
horizontally, no longer vertically
MAIN AXIS
-
:
SECTION
COMPONENTS AND LAYOUT
PATTERNS
LECTURE
BUILDING A CAROUSEL
COMPONENT PART 2
-
VERTICAL CENTERING WITH ABSOLUTE POSITION AND TRANSFORM
Ignoring the X
(horizontal) value
.btn--left {
position: absolute;
top: 50%;
transform: translate(0, -50%);
top: 50% }
.carousel {
position: relative;
}
SECTION
BUILDING BEAUTIFUL
COMPONENTS
LECTURE
WEB DESIGN RULES #10 PART 2
LAYOUT PATTERNS
-
:
GALLERY INDEX ELEMENTS, SECTIONS, PATTERNS
:
01 NAVIGATION C SECTION COMPONENTS
01 NAVIGATION C SECTION COMPONENTS
01 NAVIGATION C SECTION COMPONENTS
01 NAVIGATION C SECTION COMPONENTS
01 NAVIGATION C SECTION COMPONENTS
01 NAVIGATION C SECTION COMPONENTS
OVERLAYS
01 NAVIGATION C SECTION COMPONENTS
111
SECONDARY NAVIGATION
02 HERO SECTION C SECTION COMPONENTS
02 HERO SECTION C SECTION COMPONENTS
02 HERO SECTION C SECTION COMPONENTS
02 HERO SECTION C SECTION COMPONENTS
02 HERO SECTION C SECTION COMPONENTS
02 HERO SECTION C SECTION COMPONENTS
02 HERO SECTION C SECTION COMPONENTS
02 HERO SECTION C SECTION COMPONENTS
03 FOOTER C SECTION COMPONENTS
03 FOOTER C SECTION COMPONENTS
03 FOOTER C SECTION COMPONENTS
04 CALL TO ACTION SECTION C SECTION COMPONENTS
-
-
04 CALL TO ACTION SECTION C SECTION COMPONENTS
-
-
04 CALL TO ACTION SECTION C SECTION COMPONENTS
-
-
04 CALL TO ACTION SECTION C SECTION COMPONENTS
-
-
05 FEATURE ROW C SECTION COMPONENTS
05 FEATURE ROW C SECTION COMPONENTS
05 FEATURE ROW C SECTION COMPONENTS
05 FEATURE ROW C SECTION COMPONENTS
01 ROW OF BOXES/CARDS D PATTERNS
02 GRID OF BOXES/CARDS D PATTERNS
02 GRID OF BOXES/CARDS D PATTERNS
ASIDE NESTING PATTERNS IN COMPONENTS D PATTERNS
Grid pattern
Row pattern
Grid pattern
Grid pattern
:
03 Z PATTERN D PATTERNS
-
03 Z PATTERN D PATTERNS
-
04 F PATTERN D PATTERNS
-
04 F PATTERN D PATTERNS
-
05 SINGLE COLUMN D PATTERNS
06 SIDEBAR D PATTERNS
06 SIDEBAR D PATTERNS
07 MULTI COLUMN / MAGAZINE D PATTERNS
-
08 ASYMMETRY / EXPERIMENTAL D PATTERNS
08 ASYMMETRY / EXPERIMENTAL D PATTERNS
SECTION 07
OMNIFOOD PROJECT
SETUP AND DESKTOP
VERSION
—
–
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
THE 7 STEPS TO A GREAT
WEBSITE
–
THE PROCESS BEHIND BUILDING A WEBSITE
3 SKETCH 👉 Define WHAT the website is for. In other words, define business
and user goals of your website project (👋 See lecture on UX
4 DESIGN AND BUILD Business goal example: Selling premium dog food
User goal example: Finding high-quality dog food for good price
5 TEST AND OPTIMIZE
)
THE PROCESS BEHIND BUILDING A WEBSITE
👉 Plan and gather website content: copy (text), images, videos etc.
2 PLAN
👉 Content is usually provided by the client, but you also can help
3 SKETCH them produce and find some content (simply finding free images
is easiest, but if they want copy, charge them extra)
👉 Think about what components you need, and how you can use
2 PLAN
them in layout patterns (👋 Get inspiration in web design section)
3 SKETCH 👉 Get ideas out of your head: sketch them with pen and paper or
with some design software (e.g. Figma )
3 SKETCH 👉 Test the website on actual mobile devices, not just in DevTools
5 TEST AND OPTIMIZE 👉 Fix simple accessibility problems (e.g. color contrast issues)
6 LAUNCH 👉 Run the Lighthouse performance test in Chrome DevTools and try
to fix reported issues
)
(
👉 Once all work is done, everything is perfect, and you got approval
2 PLAN
from your client (or yourself 😁), it’s time to share your
masterpiece with the world!
3 SKETCH
👉 Upload your website files to a hosting platform. There are
countless platform, we will use one with a free plan Netlify )
4 DESIGN AND BUILD
👉 Choose and buy a great domain name, one that represents the
5 TEST AND OPTIMIZE brand well, is memorable and easy to write
6 LAUNCH
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
DEFINING AND PLANNING THE
PROJECT STEPS 1 AND 2
(
–
)
YOUR FIRST REAL WORLD PROJECT
-
STEP 1 DEFINE THE PROJECT
For a client “We are a technology company first, but with a major
focus on consumer well-being through a healthy diet.
Most people are very busy with their jobs, family and
friends, and other important activities, which doesn't
👉 Define WHAT the website is for
leave much time for cooking. This might lead to a poor
diet and lasting health consequences. We want to
Business goal: Selling monthly food subscription solve this problem by using an AI-centric approach.
User goal: Eating well effortlessly, without spending a Users can use our app to select their diet and foods
lot of time and money they like and dislike, and our AI algorithm will create a
custom and individual weekly meal plan. But we don't
stop there. We partner with restaurants and other
cooking partners to actually cook and deliver all meals
👉 Define target audience
from the generated meal plans, in selected cities. All
this will be packed up in a monthly subscription,
Busy people who like technology, are interested in a where users can choose between receiving one or
healthy diet, and have a well-paying job two meals per day, every single day of the month.”
:
STEP 2 PLAN THE PROJECT
🚫 Plan out the sitemap “We are a technology company first, but with a major
focus on consumer well-being through a healthy diet.
We will just build a one-page marketing website Most people are very busy with their jobs, family and
friends, and other important activities, which doesn't
(oftentimes called a landing page), so no sitemap
leave much time for cooking. This might lead to a poor
diet and lasting health consequences. We want to
solve this problem by using an AI-centric approach.
👉 Define website personality
Users can use our app to select their diet and foods
they like and dislike, and our AI algorithm will create a
Based on the tech-centered target audience, as well as
custom and individual weekly meal plan. But we don't
the actual product being sold, we will use the startup/
stop there. We partner with restaurants and other
upbeat personality. We might add some elements of the cooking partners to actually cook and deliver all meals
calm/peaceful personality, since the product is all about from the generated meal plans, in selected cities. All
LECTURE
SKETCHING INITIAL LAYOUT
IDEAS STEP 3
(
)
–
FIRST IDEAS AND SKETCH
👉 Logo Navigation
👉 Hero
👉 Featured in
👉 How it works
👉 Testimonials + gallery
👉 Pricing + features
👉 CTA
👉 Footer
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
RESPONSIVE DESIGN PRINCIPLES
–
WHAT IS RESPONSIVE DESIGN?
RESPONSIVE DESIGN
👉 Design technique to make a webpage adjust its layout and visual style to
any possible screen size (window or viewport size)
👉 It’s a set of practices, not a separate technology. It’s all just CSS!
VIEWPORT
WIDTH
👉 To allow webpage to adapt to the current 👉 Use rem unit instead of px for most lengths
viewport width (or even height)
👉 To make it easy to scale the entire layout down
👉 Use % (or vh / vw) unit instead of px for elements (or up) automatically
that should adapt to viewport (usually layout)
👉 Helpful trick: setting 1rem to 10px for easy
👉 Use max-width instead of width calculations
-
-
-
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE HERO PART 1
-
–
BUILDING THE HERO
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE HOW IT WORKS
SECTION PART 1
-
-
–
-
BUILDING THE HOW IT WORKS SECTION
-
-
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE FEATURED IN
SECTION
–
-
BUILDING THE FEATURED IN SECTION
✅ Logo Navigation
✅ Hero
👉 Featured in
✅ How it works
👉 Testimonials + gallery
👉 Pricing + features
👉 CTA
👉 Footer
-
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE MEALS SECTION
PART 1
–
-
MEALS DIETS SECTION
+
SWITCHING FLEX DIRECTION TO COLUMN
.meal-attributes
.accordion { {
display: flex; WITH FLEX DIRECTION SET
gap: 2rem;
24px; 1 TO COLUMN
flex-direction: column;
}
👉 align-items aligns items
horizontally, no longer vertically
MAIN AXIS
-
:
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE TESTIMONIALS
SECTION PART 1
-
–
BUILDING THE TESTIMONIALS GALLERY SECTION
+
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE PRICING SECTION
PART 1
–
-
BUILDING THE PRICING FEATURES SECTION
+
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE CALL TO ACTION
SECTION PART 1
-
-
–
-
CTA SECTION
SECTION
OMNIFOOD PROJECT SETUP
AND DESKTOP VERSION
LECTURE
BUILDING THE FOOTER PART 1
–
-
FOOTER SECTION
SECTION 08
OMNIFOOD PROJECT
RESPONSIVE WEB
DESIGN
—
–
SECTION
OMNIFOOD PROJECT
RESPONSIVE WEB DESIGN
LECTURE
HOW MEDIA QUERIES WORK
–
HOW MEDIA QUERIES WORK WITH MAX WIDTH
👉 Code outside of
any media query
0px
600px 1200px ∞
400px 1000px
Example: At a viewport Example: At a viewport width
width of 400px, CSS in of 1000px, CSS from the
both media queries applies 1200px media queries applies
(
-
)
SECTION
OMNIFOOD PROJECT
RESPONSIVE WEB DESIGN
LECTURE
HOW TO SELECT BREAKPOINTS
–
STRATEGIES FOR SELECTING BREAKPOINTS
BAD
GOOD
Design breaks
Design breaks
Design breaks
Design breaks
PERFECT