The Ultimate HTML & CSS Study Guide
The Ultimate HTML & CSS Study Guide
HTML - Hypertext Markup Language is the language used on the web to tag text to build
and structure a web page.
HTML tags - HTML code that marks up, AKA tags, the text, images, links, content, and
structural elements so that your computer’s browser knows each piece of content and
understands how to render it.
Opening tag - A tag that indicates the start of an element, like <p> and <h1>.
Closing tag - A tag that indicates the end of an element, like </p> and </h1>.
Heading tags - Tags that mark important information, like the title of a website or
section name. The <h1> tag is used for the most important heading on the page. Headings
tags are also known as headline tags or header tags.
Self-closing tag - A tag that doesn't require a closing tag. Common self-closing tags
include <br> and <img>.
Text editor - A computer program where you'll write and save your code. Also called a
"code editor."
Syntax highlighting - Feature in a text editor that uses different colors and fonts to
make code easier to type, read, and debug.
Back to Top ↑
Hierarchy - Marking sections with different heading tags to show their relative
importance. There are 6 heading tags to choose from: <h1>, <h2>, <h3>, <h4>, <h5>, and
<h6>.
Browser-added styles - Default styling browsers assign to HTML tags, like font size,
font type, font weight, and spacing.
Screen reader - A software used by blind or visually impaired visitors to navigate and
read a computer screen. Popular free screen readers include NVDA and VoiceOver (built
into Macs).
Block element - Elements that, by default, take up the entire width of a page. Each block
element starts on a new line.
Inline element - Elements added inside block elements that don't start on another line.
<strong> - Inline element with a browser default bold font style. It's a semantic tag
indicating that the text is important.
<p>If you can dance and be free and not be embarrassed, you can
<em> - Inline element with a browser default style of italic. It's a semantic tag indicating
that the text is emphasized.
<p>There will come a time when you'll use the skills you've worked so hard
to learn to <em>create a better life</em> for yourself.</p>
Line break (<br>) - An inline element that breaks a line of text, returning it to the next
line.
HTML entities - Code for characters you may not have on your keyboard, like letters
with accent marks (õ) or symbols like ©. See W3 Schools page on HTML Entities for more
info.
Back to Top ↑
Lesson 3 - Lists!
Ordered lists - A list with items in a particular order, like recipe steps or a ranking of your
favorite TV shows. The default list style is numbers. You'll use the <ol> and <li> tags to
create an ordered list.
Unordered lists - A list of items with no particular order, like shopping lists or navigation
elements. The default list style is bulleted. You'll use the <ul> and <li> tags to create an
unordered list.
<ul>
<li>Red</li>
<li>Yellow</li>
<li>Blue</li>
</ul>
Code formatting - A technique for making code easier to read, faster to edit, and
simpler to debug. Examples of code formatting include indenting code and adding
whitespace between code lines.
Comments - Messages within your code with important information like reminders,
notes to other programmers, and explanations about the function and use of code. The
text in the comments isn't visible on the web page. You can create HTML comments and
CSS comments (Lesson 9).
HTML comments - Comment formatting in HTML uses <!-- and --> to surround the
comment.
<h2>What's New?</h2>
<!-- Add code for news articles here -->
To use comments to deactivate a block of HTML code, wrap the code block in the comment:
<!--
<p>The Burj Khalifa is the tallest building in the world.</p>
-->
src attribute - Attribute that determines the source of the image that will appear on the
page.
alt attribute - Attribute that contains information about the image. The "alt" is short for
"alternative" because it provides a substitute text description if the image doesn't load
properly. Alt text also describes the image to persons who are blind or visually impaired
and use assistive technology like screen readers.
<img
src="https://s3.amazonaws.com/media.skillcrush.com/skillcrush/wp-content/up
loads/2021/12/pexels-photo-4580745-400x380-1.jpeg"
alt="rabbit with a party hat and cupcake celebrating a birthday">
Alt text tips - To create alt text that's a substitute for an image:
Animated gifs - Gifs are soundless, animated, and looping images kinda like a flipbook.
Add them to a web page just like a static image.
Back to Top ↑
Lesson 5 - Links
<a> - The anchor tag is an inline element that creates links from one website to another
(external links) or links to a different part of the same website (internal links).
href attribute - Short for Hypertext REFerence, use the href attribute to indicate the
link's destination. You'll surround the link with double (" ") or single (' ') quotation marks.
<a href="https://vimeo.com/">Vimeo</a>
<ul>
<li><a href="https://www.twitch.tv/">Twitch</a></li>
<li><a href="https://www.youtube.com/">YouTube</a></li>
<li><a href="https://vimeo.com/">Vimeo</a></li>
</ul>
target attribute - An attribute that specifies where to open the linked web page. In the
value of the target attribute, you can add "_blank" or "_BLANK" (either casing works) to
tell the browser to open the page in a new tab or window.
Linking images - To link an image, wrap the <a> and </a> tags and around the <img>
tag.
Back to Top ↑
Structural tags - Tags that define and mark up the different parts of your website.
Common structural tags include <article>, <aside>, <div>, <footer>, <header>, <nav>
<main>, and <section>.
<div> - A tag that defines, bundles, and organizes content on a web page. You'll wrap the
opening and closing <div> tags around elements, like headers, images, lists, and
paragraphs, to group them together.
<div>
<h3>Largest Countries in Africa</h3>
<ol>
<li>Algeria</li>
<li>DR Congo</li>
<li>Sudan</li>
</ol>
</div>
Nested elements - Elements contained inside another element, like the <li> tags
nested inside the <ol> and <ul> elements. Nested elements are also called child elements.
You can nest div elements inside other div elements to create and style sophisticated web
page layouts.
Semantic elements - Structural tags that describe the meaning and purpose of the
content, like <article>, <aside>, <footer>, <header>, <nav>, <main>, and <section>.
<header> - Tags to define the header of a site, which often contain the main site title,
navigation, logo, and introductory information. You'll add an opening <header> tag at the
start of the section and a closing </header> tag at the end of the section, with the header's
content nested inside.
<header>
<img
src="https://cdn1.iconfinder.com/data/icons/splash-of-fruit/128/fruiticons_
buttons_apple-100.png" alt="Hayley's Nutritional Coaching logo">
<h1>Hayley's Nutritional Coaching</h1>
<ul>
<li><a href="#services">Services</a></li>
<li><a href="#faq">FAQ</a></li>
</ul>
</header>
<nav> - Tags to define the navigation area of a site, often containing an unordered list.
You'll nest the <ul> tags within a set of <nav> tags.
<header>
<img
src="https://cdn1.iconfinder.com/data/icons/splash-of-fruit/128/fruiticons_
buttons_apple-100.png" alt="Hayley's Nutritional Coaching logo">
<h1>Hayley's Nutritional Coaching</h1>
<nav>
<ul>
<li><a href="#services">Services</a></li>
<li><a href="#faq">FAQ</a></li>
</ul>
</nav>
</header>
<main> - Tags that wrap content that's specific to that page, like information about the
site and articles. You'll only use one set of <main> tags per page.
<main>
<h2>Here to Support Your Healthy Living</h2>
<h3>Do you need a coach?</h3>
<p>If you have nutritional questions or concerns, I'm here to help!
Trust your health and well-being to a professional who can set up the right
plan for you.</p>
</main>
<article> - Tags to specify self-contained content that can be read on its own, like a blog
post, news article, or comment.
<main>
<h2>Here to Support Your Healthy Living</h2>
<article>
<h3>Do you need a coach?</h3>
<p>If you have nutritional questions or concerns, I'm here to help!
Trust your health and well-being to a professional who can set up the right
plan for you.</p>
</article>
</main>
<aside>
<h4>About Hayley</h4>
<p>Hayley is a Registered Dietitian Nutritionist with 25 years
experience working with clients.</p>
</aside>
<footer> - Tags to indicate the footer of the site. The footer may include author
information, contact details, copyright dates, and important links.
<footer>
<p>Get in contact! Phone 555-321-5555 or email at
[email protected].</p>
</footer>
<section> - A generic tag that defines standalone sections of a web page. Use when more
specific tags, like <article> or <aside>, don't apply. A section will generally have at least
one heading.
Back to Top ↑
CSS - Stands for Cascading Style Sheets. A document linked to your HTML that styles how
HTML elements are displayed on the screen, like color, layout, and size.
CSS block - Consists of a selector and curly braces with property names and property
values nested inside.
Selector - The HTML element you want to style, like a paragraph (p) or heading (h1). You’ll
add curly braces after the selector to wrap around your styles.
Property - AKA property name. The property determines what style to apply to the
element, like font-size or color.
Value - How the property is styled. Add a semicolon (;) after the value.
p {
color: red;
}
font-family - Property that sets the text font. If the font is more than one word, add
single or double quotation marks around the font name. You can use uppercase or
lowercase letters in the font name.
p {
font-family: "courier new";
}
Add more than one value by separating each font with a comma. The browser will prioritize
p {
font-family: "Palatino Linotype", Palatino, "Book Antiqua", serif;
}
font-size - Property to control the size of the font. Common values for this property
include px, em, and vw.
p {
font-size: 25px;
}
color property - Property to adjust the color of text. Use a color name or hexadecimal
value (AKA hex value) to change the color. Use uppercase or lowercase letters in the color
name or hex value.
h1 {
color: FireBrick;
}
p {
color: #DB7093;
}
text-align - Property that determines the alignment of text. The default text-align value
is left. The property accepts values like left, right, center, and justify. The justify
value adds space between words to create a clean edge on the right and left sides of the
block of text.
p {
text-align: right;
}
font-style - Property that will change your text to italics. The default value is normal.
p {
font-style: italic;
}
font-weight - Property that will adjust the thickness of characters. You can use values
like lighter, normal, bold, and bolder. Or, use numbers from 100 (light) to 900 (extra
bold).
h1 {
font-weight: bold;
}
p {
font-weight: 400;
}
p {
text-transform: lowercase;
}
font-variant - Property to change the text into small uppercase letters using the
small-caps value.
p {
font-variant: small-caps;
}
text-decoration - Property to add lines over, under, and through text. The property
p {
text-decoration: line-through;
}
line-height - Property to add spacing above and below lines of text. The amount of
line-height is proportional to the font size, meaning large-sized text will have more default
line height than small-sized text. Elements like paragraphs and headings will, by default,
have space above and below the lines of text (even if you don't have the line-height
property in your CSS).
The property accepts values like px, em, numbers, and percentages.
p {
line-height: 30px;
}
h1 {
line-height: 10px;
}
word-spacing - Property to add or subtract spacing between words. Use positive values
to add spacing and negative values to subtract spacing. The property accepts values like px,
em, numbers, and percentages.
p {
word-spacing: 20px;
}
h2 {
word-spacing: -5px;
}
text-indent - Property to indent the first word in an element automatically. Use px, em,
or percents for the values.
Back to Top ↑
Google Fonts - Font hosting service that provides free fonts to link to in your HTML code
or download and install on your computer.
Serif fonts - The letters have little "feet" or "tails" that extend off the letters. Serif fonts
work great for formal, traditional sites. The little feet make it easier to read, so serif fonts
are great for blocks of text. Use the serif generic font family as a fallback font.
Sans serif fonts - The letters are made of simple lines and without (i.e., sans) the little
"feet" or "tails." Sans serif letters are seen as more slick and modern than serif letters, so
you'll often find them on tech sites. Sans serif fonts are also commonly used in headings.
Use the sans-serif generic font family as a fallback font.
Display fonts - AKA "decorative" fonts, have a strong, artistic personality. Use display
Handwriting fonts - AKA "script" fonts, have a handwritten styling. Like the
display/decorative fonts, handwriting/script fonts are great for a headline or short bits of
text but can be difficult to read in large blocks. Use the display generic font family as a
fallback font.
Monospace fonts - A font with letters at a fixed width, meaning each letter takes up an
equal amount of space. Use monospace to give your text a computer, techy look. Use the
monospace generic font family as a fallback font.
<head> - A section near the top of your code that contains information that browsers and
web servers need to render your site, like meta tags (Lesson 14) and links to style sheets,
JavaScript files, and Google Fonts.
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Rubik:wght@300&display=swap"
rel="stylesheet">
</head>
<body> - The element that contains the site's contents that will render on the page, like
headings, paragraphs, images, lists, and structural elements.
<body>
<h1>Welcome to My Site</h1>
<p>Hi, I'm so excited you made it here!</p>
<footer>Copyright 202X.</footer>
</body>
h1 {
font-family: 'Rubik', sans-serif;
}
p {
font-family: 'Dancing Script', cursive;
}
Back to Top ↑
background - Property to add color to a background element using a color name, hex
value, or image.
aside {
background: LightPink;
}
footer {
background: #FFFACD;
}
border - Property to add a border to the edge of an element. In the value, add the width,
style, and color of the border. The style can have dotted, dashed, solid, double, groove,
and ridge values.
div {
border: 10px solid seagreen;
}
You can target specific sides of the border using the border-top, border-right,
aside {
border-top: 15px dotted cornflowerblue;
border-right: 5px dashed tomato;
border-bottom: 10px double #4E7D85;
border-left: 8px solid orchid;
}
aside {
border: 10px solid seagreen;
border-radius: 20px;
}
To meet the AA level, you'll want at least 4.5:1 ratio for normal text and 3:1 ratio for large
text. To meet a AAA level, 7:1 ratio for normal text and 4.5:1 ratio for large text. Large text is
24px with a normal font-weight, or about 18.66px with a bold font-weight. The AAA level is
the best contrast rating, so aim to satisfy the AAA level when you can.
Relative URLs - A file path that says where the file is in relation to the file you're writing
code in.
body {
background: url('img/nutritional-coaching-background.jpeg');
}
<img src=".../img/cat-paw.png" alt="cat paw with pink and black toes pads">
body {
background:
url('https://images.pexels.com/photos/1323550/pexels-photo-1323550.jpeg?cs=
srgb&dl=pexels-simon-berger-1323550.jpg&fm=jpg');
}
<img
src="https://images.pexels.com/photos/909916/pexels-photo-909916.jpeg?auto=
compress&cs=tinysrgb&w=1260&h=750&dpr=1" alt="cat paw with pink and black
toes pads">
body {
background:
url('https://cdn4.iconfinder.com/data/icons/twitter-29/512/166_Heart_Love_L
ike_Twitter-48.png') repeat #FEF0F0;
}
no-repeat - A value to display only a single image in the container. By default, images will
display in the upper left corner of the container.
body {
background:
url('https://cdn4.iconfinder.com/data/icons/twitter-29/512/166_Heart_Love_L
ike_Twitter-48.png') no-repeat #FEF0F0;
}
Fallback color - Color that will appear if your image doesn't load or if the image has
transparency. Add the fallback color to the end of the background property's value.
background-size - Property to set the width of the image. Use the cover value to
extend the image to the height and width of the container.
background-position - Property to position the image in the container. Use the center
value to center your image.
body {
background:
url("https://images.pexels.com/photos/1323550/pexels-photo-1323550.jpeg?cs=
srgb&dl=pexels-simon-berger-1323550.jpg&fm=jpg") repeat #e1efe1;
background-size: cover;
background-position: center;
}
Hero image - A large background image you often see in the head of a website.
Developers will use a hero image to draw the visitor's attention and entice them to
continue browsing the website.
CSS comments - Comment formatting in CSS that uses /* and */ to surround the
comment.
p {
text-align: center;
/* Add font-size property */
}
To use comments to deactivate code, wrap the code line(s) or code block(s) in the
comment.
/* aside {
background: #EEE8AA;
border-right: 2px solid #BDB76B;
border-left: 2px solid #BDB76B;
} */
Back to Top ↑
CSS Box Model - The term "box model" refers to the box that wraps around HTML
elements, including the content (e.g., text, links, images, lists), padding (i.e., space within the
element), border, and margin (i.e., space around the element).
div {
width: 250px;
div {
height: 250px;
background: aqua;
}
When combining the width and height properties, the content could overflow the height
or width of the container. The easiest way to combat this overflowing text is to remove
either the height or width property and let the container resize to the content. Another
option is to use the overflow property with the hidden and scroll values.
overflow - Property that defines what should happen if the container overflows. The
default value, visible, will allow the text to overflow the container. The hidden value will
hide the overflowing text.
div {
width: 250px;
height: 250px;
background: aqua;
overflow: hidden;
}
The scroll value will add a horizontal or vertical scrollbar so the user can scroll and view
the text.
div {
width: 250px;
height: 250px;
background: aqua;
overflow: scroll;
}
You can also use the auto value (Lesson 13) with the overflow property when working with
padding - Property to control the padding within an element. Use a single value to add
padding equally on all sides. Be careful not to confuse padding with line-height, which is
the space automatically added above and below elements like paragraphs and headings.
See MDN's Padding page for more details.
section {
background: #e3e3e3;
border: 10px solid darkslateblue;
padding: 40px;
}
You can target specific sides of the padding using the padding-top, padding-right,
padding-bottom, and padding-left properties.
section {
background: #e3e3e3;
border: 10px solid darkslateblue;
padding-top: 40px;
padding-right: 30px;
padding-bottom: 0px;
padding-left: 10px;
}
You can also use 4-value shorthand to add different padding values to each side, in
clockwise order (top, right, bottom, and left sides).
section {
background: #e3e3e3;
border: 10px solid darkslateblue;
padding: 40px 30px 0px 10px;
}
Use 2-value shorthand to add equal padding on the top and bottom sides and equal
padding on the right and left sides.
margin - Property to control the margin between elements. Use a single value to add
margin equally on all sides. See MDN's Margin page for more details.
section {
background: #e3e3e3;
border: 10px solid darkslateblue;
margin: 12px;
}
You can target specific sides of the margin using the margin-top, margin-right,
margin-bottom, and margin-left properties.
section {
background: #e3e3e3;
border: 10px solid darkslateblue;
margin-top: 10px;
margin-right: 30px;
margin-bottom: 0px;
margin-left: 5px;
}
You can also use 4-value shorthand to add different margin values to each side, in
clockwise order (top, right, bottom, and left sides).
section {
background: #e3e3e3;
border: 10px solid darkslateblue;
margin: 10px 30px 0px 5px;
}
Use 2-value shorthand to add equal margin on the top and bottom sides and equal margin
section {
background: #e3e3e3;
border: 10px solid darkslateblue;
padding: 15px 5px;
}
Card - A common design pattern that brings attention to chunks of information on a page,
like promoted products or employee biographies.
outline - Adds an outline around the element that doesn't add to the width or height of
the elements. Great for debugging and visualizing the margin and padding of an element.
* {
outline: 3px dotted Red;
}
Back to Top ↑
Classes - A class is added to a group of elements that are styled the same. A class consists
of a CSS selector and a matching attribute you add to an opening HTML tag. In the CSS, a
class starts with a period (.). In the HTML, add the class attribute, an equal sign (=), and the
class name in quotation marks (no period).
.important-info {
background: yellow;
border: 6px solid DarkGreen;
}
You can add the same class to more than one element (even elements of different types).
Add two or more classes to an element by separating the class names with a space.
.important-info {
background: yellow;
border: 6px solid DarkGreen;
}
.appointments {
font-size: 35px;
font-weight: bold;
}
Ids - An ID is a singular identifier for one HTML tag on a page. Unlike classes, an HTML tag
can only have one ID. For styling, an ID consists of a selector in the CSS and a matching
attribute in an opening HTML tag. To create an ID in your CSS, you'll start with a pound
sign/hashtag (#) followed by the ID name. In the HTML, add the ID attribute to an opening
HTML tag. Surround the ID name with quotation marks (no #).
#new-promotion {
font-size: 18px;
font-weight: bold;
color: magenta;
}
An ID can only style one element on the page. However, you can have an ID and one or
more classes in the opening tag of an element.
Classes vs. IDs - For most styling needs, you'll use classes.
Classes IDs
HTML attributes Multiple class attributes per Only one ID attribute per
tag tag
Summary Use classes when you want Use IDs for unique elements
to style multiple elements that only appear once per
or apply multiple classes to page. Also, use IDs to create
an element. links to specific elements.
Class & ID naming tips - The names you select for classes and IDs need to identify
their purpose and be future-proof and flexible if the properties and values change.
IDs for navigation - Use IDs to create an internal link to specific elements on the page.
Start with a destination ID to tell the browser where you want the link to go. The
destination ID should start with a # sign.
<nav>
<ul>
<li><a href="#locations">Locations</a></li>
Add the anchor ID to the place you want to take the user to, like a section or image.
<section id="locations">
<h2>Locations</h2>
<p>Check out our salons in Virginia Beach and Norfolk.</p>
<p>Appointments are highly recommended.</p>
</section>
list-style - Property to change a list item's default marker (i.e., bullet point). Use with a
none value to remove the marker altogether. Combine with the padding property to adjust
the spacing before each list item.
nav ul {
list-style: none;
padding: 0;
}
You can change the default marker from a disc to a circle or square for unordered lists.
.list__one {
list-style: circle;
}
.list__two {
list-style: square;
}
Change the default numbers (e.g., 1., 2.) to numerals or alpha (letters) for ordered lists.
.list__three {
list-style: upper-roman;
}
.list__four {
list-style: upper-alpha;
display property - Property that determines how an element renders. The inline value
will place a block element on the same line as other elements. The block value will place
block and inline elements on different lines and allow you to style the width, height,
padding, and margin. Use the inline-block value to place the element on the same line as
the other elements and style them like a block element (e.g., change the width, height,
padding, and margins).
nav ul li {
display: inline-block;
margin-right: 20px;
}
p {
display: inline;
}
img {
display: block;
}
inline-block - Value with characteristics of both inline and block elements. For instance,
the element will start on the same line as other elements, and you can apply changes to the
width, height, and padding.
.flower {
display: inline-block;
}
Grouping CSS selectors - Group CSS selectors together if applying the same styles.
Separate the selectors with a comma (,).
h1,
p {
font-family: sans-serif;
Back to Top ↑
Common page layouts - Page layouts you'll often find developers use to display the
page's content.
Gridded Masonry
Layout techniques - There are multiple ways to create page layouts. The most common
are floats (beginner technique), Flexbox (intermediate technique), and CSS Grid (advanced
technique).
float - A property to position elements in a container. Use the left and right values to
float an element to the left and right inside the container.
main {
background: #6cd092;
height: 200px;
width: 200px;
float: left;
Use the inherit value to apply the float value of the parent element to the child elements.
div {
text-align: center;
width: 400px;
height: 500px;
float: left;
}
main {
background: #6cd092;
height: 200px;
width: 200px;
float: inherit;
}
aside {
background: #6cd092;
height: 200px;
width: 200px;
float: inherit;
}
When elements float inside a parent container, you may need to adjust the width or height
of an element to make it fit inside the parent container. For example, adding margin,
padding, or border to an element will expand the box size. To keep the expanded element
inside its parent container, you can subtract the additional margin, padding, or border from
one or more child elements. You can also use the box-sizing property (Lesson 13) with the
border-box value to automatically adjust the size of the container when adding padding
and border.
Back to Top ↑
Document flow - The system that dictates the arrangement and position of HTML
elements on the page (AKA the document). With the default document flow, inline elements
stay inline. Block elements stack on top of one another, align to the left side of the
container, and appear in the order they're written in the HTML (i.e., the first element in the
HTML appears first, followed by the second element, etc.).
clear - A property to control the flow of elements in the document and tell an element to
clear other elements. Use the both value to clear elements floated on the left and right.
footer {
background: #ffc999;
clear: both;
}
auto value - A value of the overflow property (Lesson 10) that directs the browser to
figure out how much background to add to the parent container based on the size of the
child elements. The browser will automatically compensate for any size differences to keep
content in the container.
.parent-container {
background: #ebebeb;
border: 5px solid black;
width: 400px;
overflow: auto;
}
box-sizing - A property that determines how the width and height of elements are
calculated. Use the box-sizing property with the border-box value to automatically
subtract the border and padding from the width and height set.
aside {
Back to Top ↑
Best practices - Agreed upon rules that help you write code in a way that will meet the
standards and expectations of other developers.
See the HTML & CSS Best Practices Checklist for a complete list of best practices.
Meta tags - Tags that tell search engines what kind of content is on your website. Meta
tags are found in the head section of a site. For valid HTML, you'll need at least the
<!doctype html>, <html lang="en">, and <title> tags. The metadata tag (<meta>) and
<link> tag are other meta tags commonly found on websites.
Back to Top ↑
<meta> - A tag that defines the metadata (i.e., information about data) about the site. Use
the <meta> tag with the charset attribute to define the character set used on a website.
<meta charset="utf-8">
<link> - A tag that defines how the current document links to an external source. The rel
attribute, which is short for "relationship", defines how the current document is related to
the linked document, like a stylesheet.
<title> - A meta tag that defines the title of the web page.
<title>Gojo's Dojo</title>
Root - The first level of the parent folder that contains all the project files, folders, and
assets.
Back to Top ↑
<span> - An inline element that surrounds content for styling. The span element isn't
semantic, and its purpose is only for styling.
<p>Stop by your local <span>Lady Lakes Car Center</span> to see the newest
models and get the best prices.<p>
GitHub - GitHub is a website developers use to host code repositories, AKA "repos."
Hosting code on GitHub is a popular and easy way to store and share code.
Back to Top ↑
Style tile - A visual reference of the colors and typography to use when styling a website.
normalize.css - A CSS file created by Nicolas Gallager that helps smooth out common
browser differences and bugs to keep your styles looking good.
QA - AKA quality assurance, is when you review a website and code to validate and test to
ensure it's working as expected. Common QAing steps include validating your code,
checking for typos, and performing a cross-browser check. See the Review Your Website
Checklist for a list of QAing steps.
Back to Top ↑
mailto link - A link that uses the anchor tag and the mailto parameter to launch the
default email client on a computer automatically.
Back to Top ↑
Developer tools - A set of web developer tools built into browsers so developers can
inspect and edit web pages within the browser. All modern browsers have developer tools.
Panels - Dedicated tools inside developer tools for viewing/editing HTML, checking site
performance, running JavaScript, and more. In Chrome DevTools, use the Elements and
Styles panels to view and edit HTML and CSS.
Chrome DevTools - The developer tools built into the Google Chrome browser.
1. Method #1
a. Click on the Chrome menu ( ⋮ ) in the upper right of the browser.
b. Select the More Tools option, then Developer Tools.
2. Method #2
a. Right-click or Command-click on a web page.
b. Select Inspect from the pop-up menu.
3. Method #3
a. Use the keyboard shortcut: Shift + Command + C on Mac or Shift + Control
You can change which side of the browser DevTools appears on. When working with sites
designed for desktops, change the DevTools docking to the bottom of the browser window:
1. Click the docking menu (⋮) in the upper right of DevTools.
2. Choose the "Dock to bottom" option.
Back to Top ↑
Add new pages - To expand your site from one page to two or more, you'll need to:
1. Create a new directory/folder for your new page in the root of your project.
2. Add a new index.html file inside the new folder.
3. On the home page, expand the site navigation:
a. The name and link to the new page(s) in their directories: <li><a
href="projects/index.html">Projects</a></li>.
b. Add a Home link using a # as the link: <li><a href="#">Home</a></li>.
4. Copy the home page's content and paste it into the index.html file you created for
the new page.
5. Update the <head> section:
a. Change stylesheet links to go up a level to the css folder in the root: <link
rel="stylesheet" href="../css/main.css">.
b. Update the <title> tag. The title should be unique for each page of the site.
6. Update the navigation:
a. The new page's link sends visitors to the top of the page: <li><a
href="#">Projects</a></li>.
b. The Home link goes to the home page in the root directory: <li><a
href="../index.html">Home</a></li>.
c. All other links go to their correct page or destination. If the link is to a
destination ID, add the ID name after the file name: <li><a
href="../index.html#about">About</a></li>.
7. Update unique content for the page, including headings, paragraphs, links, and
images. Generally, the footer and header will stay the same from page to page.
8. Style the site as needed. You should be able to reuse some styling for your new
page, like global styles. However, you may need to make new classes and IDs to
target elements specific to this page.
Back to Top ↑
vertical-align - A property that sets the vertical alignment of elements that are styled
with the display property value of inline or inline-block. Use the property to make an
element, like an image or paragraph, vertically align to the top, middle, or bottom of the
parent element:
.top {
vertical-align: top;
}
.middle {
vertical-align: top;
}
.bottom {
vertical-align: bottom;
}
Back to Top ↑
Boilerplate - Code that is often repeated and unchanged from project to project. An
HTML boilerplate generally includes the basic meta tags (i.e., <!doctype html>, <html
lang="en">, <meta charset="utf-8">), and structural elements (i.e., <head> and <body>).
Back to Top ↑