SlideShare a Scribd company logo
HTML & CSS
The basics
HTML CSS JavaScript
Structure Style Behaviour
HyperText Markup Language
HTML
Common HTML terms
Elements Tags Attributes
<h1>I’m a HTML Element</h1>
<p>so am I!</p>
<a>We’re a tag</a>
<h2>because I</h2>
<p>have brackets</p>
<a href="http://shayhowe.com/">
You find me
</a>
<p title="I'm a tooltip">
after an equal sign
</p>
HTML document
structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
<p>This is a web page.</p>
</body>
</html>
HTML CHEAT SHEET
DOCUMENT OUTLINE
<!DOCTYPE>
<html>
<head>
<body>
Version of html
HTML document
Page information
Page documents
COMMENTS
<!--comment text-->
PAGE INFORMATION
<base/>
<meta/>
<title>
<link/>
<style>
<script>
Base URL
Meta data
Title
Relevant resource
Style resource
Script esource
DOCUMENT STRUCTURE
<h[1-6]>
<div>
<span>
<p>
<br/>
<hr/>
Heading
Page section
Inline section
Paragraph
Line break
Horizontal rule
LINKS
<a href=””>
<a href=”mailto:”>
<a href=”name”>
<a href=”#name”>
Page link
Email link
Anchor
Link to anchor
TEXT MARKUP
<strong>
<em>
<blockquote>
<q>
<abbr>
<acronym>
<address>
<pre>
<dfn>
<code>
<cite>
<del>
<ins>
<sub>
<sup>
<bdo>
Strong emphasis
Empahasis
Long quotation
Short quotation
Abrreviation
Acronym
Address
Pre-formatted text
Definition
Code
Citation
Deleted text
Inserted text
Subscript
Superscript
Text direction
<form>
<fieldset>
<legend>
<label>
<input/>
<select>
<optgroup>
<option>
<textarea>
<button>
Form
Collection of fields
Form legend
Input label
Form input
Drop-down box
Group of options
Drop-down options
Large text input
Button
FORMS
IMAGES AND IMAGE MAPS
<img/>
<map>
<area/>
Image
Image map
Area of image map
LISTS
<ol>
<ul>
<li>
<dl>
<dt>
<dd>
Ordered list
Unordered list
List item
Definition list
Definition term
Term description
TABLES
<table>
<caption>
<thead>
<tbody>
<tfoot>
<colgroup>
<col/>
<tr>
<th>
<td>
Table
Caption
Table header
Table body
Table footer
Column group
Column
Table row
Header cell
Table cell
CORE ATTRIBUTES
class
id
style
title
*<br/> empty tags
EMPTY ELEMENTS
<br>
<embed>
<hr>
<img>
<input>
<link>
<meta>
<param>
<source>
<wbr>
Break
Embed
thematic break
image
input
lnk
meta
parameter
source
thematic break
EXERCISE 1
Create a HTML document
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
</body>
</html>
1. Create a folder
1.1 Create a file called index.html
2. Make the file a html readable document:
3. Inside the <head> element, let’s add <meta> and <title> elements.
<head>
<meta charset="utf-8">
<title>Hello World</title>
</head>
4. Inside the <body> element, add <h1> and <p> elements.
<body>
<h1>Put a header here</h1>
<p>And some text here</p>
</body>
5. Let’s check it out!
Double-clicking this file or dragging it into a web browser
will open it for us to review.
Cascading Style Sheets
CSS
Common CSS terms
Selectors Properties Values
p { ... }
h1 { ... }
p {
color: ...;
font-size: ...;
}
h1 {
font-family: ...;
font-size: ...;
}
p {
color: green;
font-size: 16;
}
h1 {
font-family: Arial;
font-size: 24;
}
Selectors
Type Selectors
Type selectors target elements by their element type
div { ... }
<div>...</div>
CSS
HTML
<div>...</div>
Class selectors allow us to select an element based on
the element’s class attribute value.
Class Selectors
.awesome { ... }
<div class=”awesome”>...</div>
CSS
HTML
ID Selectors
#anacidre { ... }
<div id=”anacidre”>...</div>
CSS
HTML
ID selectors are even more precise than class selectors, as they
target only one unique element at a time.
Additional Selectors
Many more advanced selectors
exist and are readily available
Referencing CSS
In order to get our CSS talking to our HTML, we need to reference our
CSS file within our HTML.
<head>
<link rel="stylesheet" href="main.css">
</head>
Create a StyleSheet
EXERCISE 2
1.1 Inside of our “styles-conference” folder, let’s create a new
folder named “assets.”
1. Create a folder named “styles-conference” inside our initial
folder.
1.2 For our style sheets, let’s go ahead and add another
folder named “stylesheets” inside the “assets” folder.
1.3 A new file named main.css and save it within the
“stylesheets” folder we just created.
1.4 Head over to Eric’s website, copy his reset, and paste
it at the top of our main.css file:
http://meyerweb.com/eric/tools/css/reset/
2. Let’s connect our stylesheet to our index.html file.
<head>
<meta charset="utf-8">
<title>Your title here</title>
<link rel="stylesheet" href="main.css">
</head>
3. Do some CSS-ing!
color
background
background-color
background-attachment
background-repeat
background-image
background-position
CSS CHEAT SHEET
FONTS
font
font-family
font-style
font-variant
font-weight
font-stretch
font-size
font-size-adjust
TEXT
COLOR/BACKGROUND
BOX MODEL
TEXT MARKUP
margin
margin-top
margin-right
margin-bottom
margin-left
padding
padding-top
padding-right
padding-bottom
padding-left
border
border-top
border-bottom
border-right
border-left
border-color
border-top-color
border-right-color
border-bottom-color
border-left-color
border-style
border-top-style
border-right-style
border-bottom-style
border-left-style
border-width
border-top-width
border-right-width
border-bottom-width
border-left-width
:first-child
:first-line
:first-letter
:hover
:active
:focus
:link
:visited
:lang(var)
:before
:after
PSEUDO-SELECTORS /CLASSES
TABLES
caption-side
table-layout
border-collapse
border-spacing
empty-cells
speak-header
DIMENSIONS
POSITIONING
SELECTORS
*
div
div*
div span
div, span
div > span
div + span
.class
div.class
#itemid
div#itemid
a[attr]
a[lang|=‘en’]
All elements
<div>
All elements within <div>
<span> within <div>
<div> and <span>
<span> with parent <div>
<span> preceded by <div>
Elements of class “class”
<div> of class “class”
<div> with “itemid”
<a> with attribute “attr”
<a> when lang begins “en”
display
position
top
right
bottom
left
float
clear
z-index
direction +
unicode-bidi
overflow
clip
visibility
text-indent
text-align
text-decoration
text-shadow
letter-spacing
word-spacing
text-transform
white-space
line-height width
min-width
max-width
height
min-height
max-height
vertical-align
Content
Padding
Border
Margin

More Related Content

What's hot

Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Mario Hernandez
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
Walid Ashraf
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
veena parihar
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
abhilashagupta
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
IT Geeks
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
Html n CSS
Html n CSSHtml n CSS
Html n CSS
Sukrit Gupta
 
Html
HtmlHtml
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
Manoj kumar Deswal
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
Mai Moustafa
 
Html for beginners
Html for beginnersHtml for beginners
Html for beginners
Florian Letsch
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
Amit Kumar Singh
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Ajay Khatri
 
Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
Biswadip Goswami
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Sanjeev Kumar
 

What's hot (20)

Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Html n CSS
Html n CSSHtml n CSS
Html n CSS
 
Html
HtmlHtml
Html
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 
CSS
CSSCSS
CSS
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
Html for beginners
Html for beginnersHtml for beginners
Html for beginners
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 

Similar to HTML and CSS crash course!

Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Terry Ryan
 
HTML & CSS 2017
HTML & CSS 2017HTML & CSS 2017
HTML & CSS 2017
Colin Loretz
 
SharePointfest Denver - A jQuery Primer for SharePoint
SharePointfest Denver -  A jQuery Primer for SharePointSharePointfest Denver -  A jQuery Primer for SharePoint
SharePointfest Denver - A jQuery Primer for SharePoint
Marc D Anderson
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
Thinkful
 
UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20Rafael Alvarado
 
Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5
Terry Ryan
 
Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standardsJustin Avery
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
Christopher Ross
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Ahsan Rahim
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
Hernan Mammana
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
Rahul Mishra
 
46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world
hemi46h
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateInventis Web Architects
 
Html, css and jquery introduction
Html, css and jquery introductionHtml, css and jquery introduction
Html, css and jquery introduction
cncwebworld
 

Similar to HTML and CSS crash course! (20)

Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
HTML & CSS 2017
HTML & CSS 2017HTML & CSS 2017
HTML & CSS 2017
 
CSS.pdf
CSS.pdfCSS.pdf
CSS.pdf
 
Html intro
Html introHtml intro
Html intro
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
SharePointfest Denver - A jQuery Primer for SharePoint
SharePointfest Denver -  A jQuery Primer for SharePointSharePointfest Denver -  A jQuery Primer for SharePoint
SharePointfest Denver - A jQuery Primer for SharePoint
 
Creative Web 2 - CSS
Creative Web 2 - CSS Creative Web 2 - CSS
Creative Web 2 - CSS
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
 
UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20UVA MDST 3073 CSS 2012-09-20
UVA MDST 3073 CSS 2012-09-20
 
Semantic HTML5
Semantic HTML5Semantic HTML5
Semantic HTML5
 
Darwin web standards
Darwin web standardsDarwin web standards
Darwin web standards
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
HTML CSS and Web Development
HTML CSS and Web DevelopmentHTML CSS and Web Development
HTML CSS and Web Development
 
46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world46h interaction 1.lesson Hello world
46h interaction 1.lesson Hello world
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-template
 
Html, css and jquery introduction
Html, css and jquery introductionHtml, css and jquery introduction
Html, css and jquery introduction
 
Web
WebWeb
Web
 
Css
CssCss
Css
 

Recently uploaded

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

HTML and CSS crash course!

  • 1. HTML & CSS The basics
  • 4. Common HTML terms Elements Tags Attributes <h1>I’m a HTML Element</h1> <p>so am I!</p> <a>We’re a tag</a> <h2>because I</h2> <p>have brackets</p> <a href="http://shayhowe.com/"> You find me </a> <p title="I'm a tooltip"> after an equal sign </p>
  • 6. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Hello World</title> </head> <body> <h1>Hello World</h1> <p>This is a web page.</p> </body> </html>
  • 7.
  • 8. HTML CHEAT SHEET DOCUMENT OUTLINE <!DOCTYPE> <html> <head> <body> Version of html HTML document Page information Page documents COMMENTS <!--comment text--> PAGE INFORMATION <base/> <meta/> <title> <link/> <style> <script> Base URL Meta data Title Relevant resource Style resource Script esource DOCUMENT STRUCTURE <h[1-6]> <div> <span> <p> <br/> <hr/> Heading Page section Inline section Paragraph Line break Horizontal rule LINKS <a href=””> <a href=”mailto:”> <a href=”name”> <a href=”#name”> Page link Email link Anchor Link to anchor TEXT MARKUP <strong> <em> <blockquote> <q> <abbr> <acronym> <address> <pre> <dfn> <code> <cite> <del> <ins> <sub> <sup> <bdo> Strong emphasis Empahasis Long quotation Short quotation Abrreviation Acronym Address Pre-formatted text Definition Code Citation Deleted text Inserted text Subscript Superscript Text direction <form> <fieldset> <legend> <label> <input/> <select> <optgroup> <option> <textarea> <button> Form Collection of fields Form legend Input label Form input Drop-down box Group of options Drop-down options Large text input Button FORMS IMAGES AND IMAGE MAPS <img/> <map> <area/> Image Image map Area of image map LISTS <ol> <ul> <li> <dl> <dt> <dd> Ordered list Unordered list List item Definition list Definition term Term description TABLES <table> <caption> <thead> <tbody> <tfoot> <colgroup> <col/> <tr> <th> <td> Table Caption Table header Table body Table footer Column group Column Table row Header cell Table cell CORE ATTRIBUTES class id style title *<br/> empty tags
  • 10. EXERCISE 1 Create a HTML document
  • 11. <!DOCTYPE html> <html lang="en"> <head> </head> <body> </body> </html> 1. Create a folder 1.1 Create a file called index.html 2. Make the file a html readable document:
  • 12. 3. Inside the <head> element, let’s add <meta> and <title> elements. <head> <meta charset="utf-8"> <title>Hello World</title> </head>
  • 13. 4. Inside the <body> element, add <h1> and <p> elements. <body> <h1>Put a header here</h1> <p>And some text here</p> </body>
  • 14. 5. Let’s check it out! Double-clicking this file or dragging it into a web browser will open it for us to review.
  • 16. Common CSS terms Selectors Properties Values p { ... } h1 { ... } p { color: ...; font-size: ...; } h1 { font-family: ...; font-size: ...; } p { color: green; font-size: 16; } h1 { font-family: Arial; font-size: 24; }
  • 17.
  • 19. Type Selectors Type selectors target elements by their element type div { ... } <div>...</div> CSS HTML <div>...</div>
  • 20. Class selectors allow us to select an element based on the element’s class attribute value. Class Selectors .awesome { ... } <div class=”awesome”>...</div> CSS HTML
  • 21. ID Selectors #anacidre { ... } <div id=”anacidre”>...</div> CSS HTML ID selectors are even more precise than class selectors, as they target only one unique element at a time.
  • 22. Additional Selectors Many more advanced selectors exist and are readily available
  • 24. In order to get our CSS talking to our HTML, we need to reference our CSS file within our HTML. <head> <link rel="stylesheet" href="main.css"> </head>
  • 26. 1.1 Inside of our “styles-conference” folder, let’s create a new folder named “assets.” 1. Create a folder named “styles-conference” inside our initial folder. 1.2 For our style sheets, let’s go ahead and add another folder named “stylesheets” inside the “assets” folder. 1.3 A new file named main.css and save it within the “stylesheets” folder we just created. 1.4 Head over to Eric’s website, copy his reset, and paste it at the top of our main.css file: http://meyerweb.com/eric/tools/css/reset/
  • 27. 2. Let’s connect our stylesheet to our index.html file. <head> <meta charset="utf-8"> <title>Your title here</title> <link rel="stylesheet" href="main.css"> </head>
  • 28. 3. Do some CSS-ing!
  • 29. color background background-color background-attachment background-repeat background-image background-position CSS CHEAT SHEET FONTS font font-family font-style font-variant font-weight font-stretch font-size font-size-adjust TEXT COLOR/BACKGROUND BOX MODEL TEXT MARKUP margin margin-top margin-right margin-bottom margin-left padding padding-top padding-right padding-bottom padding-left border border-top border-bottom border-right border-left border-color border-top-color border-right-color border-bottom-color border-left-color border-style border-top-style border-right-style border-bottom-style border-left-style border-width border-top-width border-right-width border-bottom-width border-left-width :first-child :first-line :first-letter :hover :active :focus :link :visited :lang(var) :before :after PSEUDO-SELECTORS /CLASSES TABLES caption-side table-layout border-collapse border-spacing empty-cells speak-header DIMENSIONS POSITIONING SELECTORS * div div* div span div, span div > span div + span .class div.class #itemid div#itemid a[attr] a[lang|=‘en’] All elements <div> All elements within <div> <span> within <div> <div> and <span> <span> with parent <div> <span> preceded by <div> Elements of class “class” <div> of class “class” <div> with “itemid” <a> with attribute “attr” <a> when lang begins “en” display position top right bottom left float clear z-index direction + unicode-bidi overflow clip visibility text-indent text-align text-decoration text-shadow letter-spacing word-spacing text-transform white-space line-height width min-width max-width height min-height max-height vertical-align Content Padding Border Margin