SlideShare a Scribd company logo
BEGINNING HTML AND CSS
CLASS 1HTML/CSS ~ Girl Develop It ~
WELCOME!
Girl Develop It is here to provide affordable and
accessible programs to learn software through
mentorship and hands-on instruction.
Some "rules"
We are here for you!
Every question is important
Help each other
Have fun
WELCOME!
Tell us about yourself.
Who are you?
On a scale of 1 to 10, how much do you know about
HTML?
What do you hope to get out of the class?
“1 meaning 'It's a completely foreign
language' to 10 meaning 'I can almost
code my own website'.”
WHAT IS HTML?
HTML is the language your browser speaks.
To tell the browser how we want it to "render" (display)
our website, we have to learn to speak HTML!
LET'S GET STARTED!
<!DOCTYPE html>
<html>
</html>
THE BARE BONES...
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
ADD A TITLE BETWEEN THE "HEAD" TAGS...
<!DOCTYPE html>
<html>
<head>
<title>My Web Page!</title>
</head>
<body>
</body>
</html>
ADD A HEADING BETWEEN THE "BODY" TAGS ...
<!DOCTYPE html>
<html>
<head>
<title>My Web Page!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
NOW ADD A PARAGRAPH...
<!DOCTYPE html>
<html>
<head>
<title>My Web Page!</title>
</head>
<body>
<h1>Hello World!</h1>
<p>Meet your new web designer!</p>
</body>
</html>
NOW SAVE YOUR PAGE AND GIVE IT A
NAME ...
index.html
Open it up in a browser, view your masterpiece, and
give yourself a pat on the back!
YOU HAVE JUST CREATED A WEB PAGE!
WHAT IS HTML?
Go to any page on the web, right-click and select 'view
source' and you will see HTML
WHAT WE'LL LEARN TODAY
The history of HTML and who uses it now
HTML vs. CSS
Elements and Tags
Files and folders
Organizing your code
WHAT DOES HTML STAND FOR?
HyperText Markup Language.
FROM ITS NASCENCE TO TODAY...
Early 90s
Invented by Tim Berners-Lee
Created "hypertext" to share scientific papers
First web page August 6, 1991
No layout, No styling.
A great example!
http://www.w3.org/People/Raggett/book4/ch02.html
FROM ITS NASCENCE TO TODAY...
Late 90s
HTML 4 in 1997-1998
Standardized by w3 Consortium (pack of super
nerds)
Pages still had very little styling options that
would work in every browser.
Plenty of table-based layouts around!
FROM ITS NASCENCE TO TODAY...
Early 00s
XHTML in 2000
Combined XML and HTML
Introduced stricter syntax
HTML 5 in 2008-2009
Adopted over XHTML 2.0
Still HTML, but with many new features
WHO USES HTML?
Web designers:
Plan, design and create (usually) small-scale
websites.
Front-end web developers:
Involved in programming dynamic web applications
or large sites.
Responsible for the user experience on large
sites (client-side).
Differ from Back-end web developers, who are
responsible for handling and storing data and
server file structure (server-side).
CLIENT­SIDE VS. SERVER­SIDE
How websites travel around the world
TOOLS OF THE TRADE
Browsers and their debuggers
Chrome — Chrome Developer Tool (comes with)
Firefox — Firebug (add-on)
Internet Explorer — IE Developer Tool (comes with)
Safari — Developer Tool (comes with and must be
enabled)
TOOLS OF THE TRADE
Text Editors
TextWrangler - Mac
Notepad ++ - Windows
Sublime Text - Linux, Mac or Windows
Just plain old Notepad!
TOOLS OF THE TRADE
Web Development Applications and Integration
Development Environments (IDEs)
BBEdit - Mac
DreamWeaver - Windows or Mac
Microsoft Expression
Microsoft Visual Studio
HTML AND CSS
HTML:
Came first (about 7 years before CSS).
Provides logical structure to content (words and
images) by organizing it into paragraphs, headings,
tables, etc.
Browser's default "styles", like spacing and font size,
are just enough to make the structure apparent (if not
appealing).
Before CSS, some additional "styles" were applied
with HTML. This is now considered very bad coding!
HTML AND CSS
CSS:
CSS stands for Cascading Style Sheets.
CSS was invented to remove all styles from HTML
and keep them separate.
Very flexible and powerful language that allows
websites to look the way they do today.
Describes how you want your site look —
presentation-wise.
HTML AND CSS
Concrete example
Words that make up a paragraph are content.
Putting opening and closing paragraph tags around
words create structure.
<p>Words within a paragraph.</p>
Making the font bigger and yellow using CSS is
presentation:
Words within a paragraph.
HTML ELEMENT
An element is usually composed of content (words,
images, numbers, or even other elements), and HTML
tags.
We create elements by "wrapping" chunks of content
inside an opening tag and a matching closing tag.
Example:
<p>Words within a paragraph.</p>
Some elements have no content, just tags. We call
these empty elements.
(More on that later...)
SYNTAX IS IMPORTANT!
<P>
Content goes here.
</P>
HTML is case-insensitive but the accepted convention is
to use lower-case (except for the doctype element).
CONTAINER ELEMENTS
Container elements contain content along with an
opening and a closing tag.
Commonly used container elements:
<p> (paragraph)
<h1> (heading levels 1 - 6)
<table> (table)
<ul> (unordered list)
<ol> (ordered list)
<li> (list item)
<a> (link)
EMPTY ELEMENTS
If the element does not contain content, it is said to be
an empty element.
"<br>" is an empty element that tells the browser to
insert a line break in a sentence.
It can be written three different ways:
<br></br> (open and close tag, no content)
<br /> (self-closing tag)
<br> (just an opening tag)
The first or second are required in XHTML.
EMPTY ELEMENTS
Commonly used empty elements:
<br /> (break tag)
<img /> (image tag)
<input /> (form input)
<button /> (form button)
<hr /> (horizontal rule)
HOW MANY ELEMENTS ARE IN OUR PAGE SO FAR?
<!DOCTYPE html>
<html>
<head>
<title>My Web Page!</title>
</head>
<body>
<h1>Hello World!</h1>
<p>Meet your new web designer!</p>
</body>
</html>
All elements "nest" inside other elements...except the
HTML element! (every thing else nests inside it)
NESTING
Your "p" element nests inside your "body" element,
which nests inside your "html" element.
Whichever element OPENS first CLOSES last!
BE A GOOD NESTER!
If you consistently indent your code, you will avoid "bad
nesting"!
DOCTYPE:
The first element on an HTML page. It tells the browser
which version of HTML the page is using.
Here's the old way of writing it:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
Now we can write it this way:
<!DOCTYPE html>
HTML ELEMENT
After <DOCTYPE>, the very next element on every
page is the html element. Its opening and closing <html>
tags wrap around all the rest.
<!DOCTYPE html>
<html>
Everything else goes in here!
...
</html>
HEAD AND BODY ELEMENTS
Head: Contains the title, meta information, embedded
styles, and often scripts.
Meta information is not visible to the user, but tells
search engines about your page, who created it, and
other info.
The contents of the head element are not visible on the
web page...except the title!
Body: Contains the actual content of the page. This is
the part of your page that visitors see and interact with.
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
HEADING 1
HEADING 2
HEADING 3
HEADING 4
HEADING 5
HEADING 6
HEADING ELEMENTS
* Heading number indicates hierarchy, not size.
Important for accessibility
EXAMPLE: HEADINGS
PARAGRAPHS
Very common and very useful!
<p>This is a one-sentence paragraph</p>
<p>
Imagine there's no Heaven <br/>
It's easy if you try <br/>
No hell below us <br/>
Above us only sky
</p>
LINE BREAKS
<ul>
<li>List Item</li>
<li>Another List Item</li>
</ul>
<ol>
<li>List Item</li>
<li>Another List Item</li>
</ol>
Unordered list (bullets)
List Item
Another List Item
Ordered list (sequence)
1. List Item
2. Another List Item
LISTS
LISTS: EXAMPLES
Lists can be used to organize any list of items.
You'd be surprised how often lists are used in web design.
GDI Seattle Intro to HTML and CSS - Class 1
<table>
<tr>
<th>Column Heading</th>
<th>Column Heading</th>
</tr>
<tr>
<td>data</td>
<td>data</td>
</tr>
</table>
Column
Heading
Column
Heading
Data Data
TABLES
Tables present data (information) in a grid format.
They're built row by row, so they're very hard to
edit/update.
TABLES: EXAMPLES
Tables can be styled with CSS to add zebra striping or
to highlight important rows/columns.
GDI Seattle Intro to HTML and CSS - Class 1
LET'S DEVELOP IT!
Add paragraphs, lists, headings and tables to your web
page.
Use my example and the content you brought today to
flesh out your page!
BLOCK­LEVEL VS. INLINE ELEMENTS
Block-level:
So far we've just talked about block-level elements.
Block level elements begin on a new line, and their
default width is usually the width of the browser!
Browsers give them default padding on top and
bottom.
BLOCK­LEVEL VS. INLINE ELEMENTS
Commonly used block-level elements:
<h1> thru <h6> (headings)
<ol> and <ul> (lists)
<li> (list items)
<table> (tables)
<form> (forms)
BLOCK­LEVEL VS. INLINE ELEMENTS
Inline:
Inline elements do not start on a new line and their
default width is only as wide as their contents.
They must be nested inside a block-level element.
BLOCK­LEVEL VS. INLINE ELEMENTS
Commonly used inline elements:
<img> (images)
<a> (links or "anchors")
<em> (emphasize)
<strong> (make strong)
<span> (has no effect by itself)
"DEPRECATED" (OBSOLETE) ELEMENTS:
Deprecated elements are elements that have been
phased out and will eventually no longer be supported
by browsers.
Examples:
<i> (italicize)
<b> (bold)
<i> and <b> both "style" the content so they are
discouraged in favor of using CSS.
SPAN ELEMENT
<span> has no other purpose than to provide a "hook"
to text that can't be otherwise targeted.
Most often used for styling or scripting.
By itself, has no visible or interactive affect on content.
<p>Here is a paragraph with <span>span tags</span>
in the middle.</p>
LET'S DEVELOP IT!
Select a couple of words or phrases in your content that
could be emphasized and put <em> and <strong> tags
around them.
ATTRIBUTES
Two important elements of web pages — links and
images — require attributes.
Attributes are components of an elements (just like eyes
are components of a human).
You describe an attribute by using a value (like saying
"Her eyes are brown").
think ~ person: eyes = "brown"
ATTRIBUTES
For example:
Links require an href attribute to tell where they link to
(href stands for "hypertext reference").
Here's how that looks:
<a href = "http://www.girldevelopit.com">
think ~ person: address = "123 Main Street"
Attributes are always placed inside an opening tag,
before the right angle bracket.
LINKS
The <a> (anchor) tag surrounds text or images to turn
them into links.
Links have two mandatory components:
tag: <a></a>
href attribute: "http://www.girldevelopit.com"
A third component, the title attribute, should only be
used if the link's destination isn't obvious (like clicking
on an image)
<a href ="http://www.girldevelopit.com">Girl Develop
It</a>
LINK CONTINUED...
Using target="_blank" causes the link to open in a new
window/tab.
example: <a href="home.html" target="_blank">Link
Text</a>
Inserting mailto:some_email_address.com into the href
attribute causes the link to open the default mail client.
example: <a href="mailto:info@girldevelopit.com">E-
mail us!</a>
LET'S DEVELOP IT!
Within your content, add a link to the Girl-Develop-It
website!
<a href ="http://www.girldevelopit.com">Girl Develop
It</a>
IMAGE ELEMENT
<img> is an empty element. It is also an inline element.
Image elements have three components
Tag: <img/>
Src attribute: "http://girldevelopit.com/assets/pink-
logo.png"
Alt attribute: "Girl Develop It logo"
<img src ="http://girldevelopit.com/assets/pink-logo.png"
alt = "Girl Develop It Logo"/>
LET'S DEVELOP IT!
Add the Girl Develop It logo to your webpage by putting
this code somewhere in a paragraph or heading!
<img src ="http://girldevelopit.com/assets/pink-logo.png"
alt = "Girl Develop It Logo"/>
GOOD HOUSEKEEPING: MANAGING FILES
AND FOLDERS
Create a new folder on your laptop's desktop and drag
your index.html document into it. This is your "site root
folder".
Inside, next to index.html, create a new folder called
"styles". This is where your CSS styles will go.
Create another folder next to "styles" called "images".
This is where all your images will go.
Copy your image and paste it in the "images" folder.
RELATIVE VS. ABSOLUTE PATHS FOR
LINKS & IMAGES
Absolute:
Refer to a specific location of a file on a server
src =
"http://www.girldevelopit.com/chapters/de
Typically used when pointing to a link that is not within y
domain.
Easy to use. There's no need for a starting point.
Think ~ searching for an address on MapQuest.
RELATIVE VS. ABSOLUTE PATHS FOR
LINKS & IMAGES
Relative:
Refer to a local file in your site root folder
src = "images/myimage.jpg"
Describes the location of the file relative to the file
you're in.
Think ~ using the "directions" feature on MapQuest.
What kind of path do you type into your address bar?
PROVIDING "DIRECTIONS" USING
RELATIVE PATH
If the file is in the same folder:
kitty.jpg
If the file is in a folder on the same level you're on:
images/kitty.jpg
If the file is in a folder that's one level above:
../images/kitty.jpg
Or to go straight up to the top-level folder:
/images/kitty.jpg
LET'S DEVELOP IT
Let's add one of your own images to your page!
Make sure your image is inside the "images" folder you
created. Then link to it using a relative path.
<img src ="images/your_image_name.jpg" alt =
"describe your image"/>
Replace "your_image_name.jpg" with the name and file
type of your image.
WRITING CLEAN CODE
1. Nest your tags properly!
2. Make good use of white space!
3. Leave yourself notes!
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
<p>Paragraph 1</p> <p>Paragraph
2</p> <p>Paragraph 3</p>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
2. MAKE GOOD USE OF WHITE SPACE!
Browsers don't care about white space
Paragraph 1
Paragraph 2
Paragraph 3
3. LEAVE YOURSELF NOTES!
You can add comments to your code. The browser
ignores them, but you (or another coder) can see them.
<!-- Comment goes here -->
Use them to organize your code:
<!-- Beginning of header -->
<div id="header">Header Content </div>
<!-- End of header -->
Or 'comment out' code (to hide it from the browser):
<!--
<ol>
<li>List Item</li>
<li>Another List Item</li>
</ol>
-->
QUESTIONS?
?
GDI Seattle Intro to HTML and CSS - Class 1
Ad

More Related Content

What's hot (20)

Html
HtmlHtml
Html
SBalan Balan
 
Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
NYCSS Meetup
 
Html basics
Html basicsHtml basics
Html basics
Veronica Alejandro
 
Lesson 2: Getting To Know HTML
Lesson 2: Getting To Know HTMLLesson 2: Getting To Know HTML
Lesson 2: Getting To Know HTML
Olivia Moran
 
Html css java script basics All about you need
Html css java script basics All about you needHtml css java script basics All about you need
Html css java script basics All about you need
Dipen Parmar
 
Html,javascript & css
Html,javascript & cssHtml,javascript & css
Html,javascript & css
Predhin Sapru
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorial
nikhilsh66131
 
HTML & CSS Workshop Notes
HTML & CSS Workshop NotesHTML & CSS Workshop Notes
HTML & CSS Workshop Notes
Pamela Fox
 
Website designing company in delhi
Website designing company in delhiWebsite designing company in delhi
Website designing company in delhi
Css Founder
 
Html 5
Html 5Html 5
Html 5
Prabhakaran V M
 
Class1slides
Class1slidesClass1slides
Class1slides
Alexis Goldstein
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
Trần Khải Hoàng
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
People Strategists
 
Week 6 Lecture
Week 6 LectureWeek 6 Lecture
Week 6 Lecture
Katherine McCurdy-Lapierre, R.G.D.
 
Vskills certified html designer Notes
Vskills certified html designer NotesVskills certified html designer Notes
Vskills certified html designer Notes
Vskills
 
Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 1Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 1
Katherine McCurdy-Lapierre, R.G.D.
 
An SEO’s Intro to Web Dev PHP
An SEO’s Intro to Web Dev PHPAn SEO’s Intro to Web Dev PHP
An SEO’s Intro to Web Dev PHP
Troyfawkes
 
Web design in 7 days by waqar
Web design in 7 days by waqarWeb design in 7 days by waqar
Web design in 7 days by waqar
Waqar Chodhry
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
Html beginner
Html beginnerHtml beginner
Html beginner
wihrbt
 

Viewers also liked (7)

 Using Clickers to Increase Information Literacy Outcomes in the Classroom
	Using Clickers to Increase Information Literacy Outcomes in the Classroom	Using Clickers to Increase Information Literacy Outcomes in the Classroom
 Using Clickers to Increase Information Literacy Outcomes in the Classroom
Anthony Holderied
 
melssCRM Presentation
melssCRM PresentationmelssCRM Presentation
melssCRM Presentation
morrisraja
 
Interactive Technologies in Library Instruction: Using Technology and Active ...
Interactive Technologies in Library Instruction: Using Technology and Active ...Interactive Technologies in Library Instruction: Using Technology and Active ...
Interactive Technologies in Library Instruction: Using Technology and Active ...
Anthony Holderied
 
 Instructional Design for the Active: Employing Interactive Technologies and...
	Instructional Design for the Active: Employing Interactive Technologies and...	Instructional Design for the Active: Employing Interactive Technologies and...
 Instructional Design for the Active: Employing Interactive Technologies and...
Anthony Holderied
 
Pedagogical Strategies for Synchronous Learning
Pedagogical Strategies for Synchronous LearningPedagogical Strategies for Synchronous Learning
Pedagogical Strategies for Synchronous Learning
Anthony Holderied
 
Adszens presentation1
Adszens presentation1Adszens presentation1
Adszens presentation1
Jomarslide
 
melssCRM brochure
melssCRM brochuremelssCRM brochure
melssCRM brochure
morrisraja
 
 Using Clickers to Increase Information Literacy Outcomes in the Classroom
	Using Clickers to Increase Information Literacy Outcomes in the Classroom	Using Clickers to Increase Information Literacy Outcomes in the Classroom
 Using Clickers to Increase Information Literacy Outcomes in the Classroom
Anthony Holderied
 
melssCRM Presentation
melssCRM PresentationmelssCRM Presentation
melssCRM Presentation
morrisraja
 
Interactive Technologies in Library Instruction: Using Technology and Active ...
Interactive Technologies in Library Instruction: Using Technology and Active ...Interactive Technologies in Library Instruction: Using Technology and Active ...
Interactive Technologies in Library Instruction: Using Technology and Active ...
Anthony Holderied
 
 Instructional Design for the Active: Employing Interactive Technologies and...
	Instructional Design for the Active: Employing Interactive Technologies and...	Instructional Design for the Active: Employing Interactive Technologies and...
 Instructional Design for the Active: Employing Interactive Technologies and...
Anthony Holderied
 
Pedagogical Strategies for Synchronous Learning
Pedagogical Strategies for Synchronous LearningPedagogical Strategies for Synchronous Learning
Pedagogical Strategies for Synchronous Learning
Anthony Holderied
 
Adszens presentation1
Adszens presentation1Adszens presentation1
Adszens presentation1
Jomarslide
 
melssCRM brochure
melssCRM brochuremelssCRM brochure
melssCRM brochure
morrisraja
 
Ad

Similar to GDI Seattle Intro to HTML and CSS - Class 1 (20)

"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub
kyereernest560
 
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
brianbyamukama302
 
Xhtml validation
Xhtml validationXhtml validation
Xhtml validation
clicksbazaar
 
Html
HtmlHtml
Html
yugank_gupta
 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
Joel Linquico
 
Lecture-7.pptx
Lecture-7.pptxLecture-7.pptx
Lecture-7.pptx
vishal choudhary
 
WEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptxWEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptx
OlusholaBabsAjayi
 
WEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptxWEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptx
OlusholaBabsAjayi
 
Html - Tutorial
Html - TutorialHtml - Tutorial
Html - Tutorial
adelaticleanu
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
Hameda Hurmat
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
Daniel Downs
 
web design for html to second yea for college
web design for html to second yea for  collegeweb design for html to second yea for  college
web design for html to second yea for college
shwan it
 
Class 1: Introductions
Class 1: IntroductionsClass 1: Introductions
Class 1: Introductions
Erika Tarte
 
What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtml
FkdiMl
 
IGCSE ICT (0417/0983) - Website Authoring - Ajiro Tech
IGCSE ICT (0417/0983) - Website Authoring - Ajiro TechIGCSE ICT (0417/0983) - Website Authoring - Ajiro Tech
IGCSE ICT (0417/0983) - Website Authoring - Ajiro Tech
Ajiro Ndi
 
CreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptCreatingWebPages-Part1.ppt
CreatingWebPages-Part1.ppt
HamzaAhmad861123
 
HTML
HTMLHTML
HTML
poonamBhalla5
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
vaseemshaik21
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
 
Summary of-xhtml-basics
Summary of-xhtml-basicsSummary of-xhtml-basics
Summary of-xhtml-basics
starlanter
 
"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub"Innovative Web Design & Development Hub
"Innovative Web Design & Development Hub
kyereernest560
 
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
brianbyamukama302
 
WEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptxWEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptx
OlusholaBabsAjayi
 
WEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptxWEB AUTHORING PRESENTATION FOR IGCSEpptx
WEB AUTHORING PRESENTATION FOR IGCSEpptx
OlusholaBabsAjayi
 
Sitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_templateSitepoint.com a basic-html5_template
Sitepoint.com a basic-html5_template
Daniel Downs
 
web design for html to second yea for college
web design for html to second yea for  collegeweb design for html to second yea for  college
web design for html to second yea for college
shwan it
 
Class 1: Introductions
Class 1: IntroductionsClass 1: Introductions
Class 1: Introductions
Erika Tarte
 
What is html xml and xhtml
What is html xml and xhtmlWhat is html xml and xhtml
What is html xml and xhtml
FkdiMl
 
IGCSE ICT (0417/0983) - Website Authoring - Ajiro Tech
IGCSE ICT (0417/0983) - Website Authoring - Ajiro TechIGCSE ICT (0417/0983) - Website Authoring - Ajiro Tech
IGCSE ICT (0417/0983) - Website Authoring - Ajiro Tech
Ajiro Ndi
 
CreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptCreatingWebPages-Part1.ppt
CreatingWebPages-Part1.ppt
HamzaAhmad861123
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
 
Summary of-xhtml-basics
Summary of-xhtml-basicsSummary of-xhtml-basics
Summary of-xhtml-basics
starlanter
 
Ad

More from Heather Rock (7)

GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1
Heather Rock
 
GDI Seattle Intro to HTML and CSS - Class 4
GDI Seattle Intro to HTML and CSS - Class 4GDI Seattle Intro to HTML and CSS - Class 4
GDI Seattle Intro to HTML and CSS - Class 4
Heather Rock
 
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 SlidesGDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
Heather Rock
 
GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3
Heather Rock
 
GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1GDI Seattle - Web Accessibility Class 1
GDI Seattle - Web Accessibility Class 1
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4GDI Seattle - Intro to JavaScript Class 4
GDI Seattle - Intro to JavaScript Class 4
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2GDI Seattle - Intro to JavaScript Class 2
GDI Seattle - Intro to JavaScript Class 2
Heather Rock
 
GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1GDI Seattle - Intro to JavaScript Class 1
GDI Seattle - Intro to JavaScript Class 1
Heather Rock
 
GDI Seattle Intro to HTML and CSS - Class 4
GDI Seattle Intro to HTML and CSS - Class 4GDI Seattle Intro to HTML and CSS - Class 4
GDI Seattle Intro to HTML and CSS - Class 4
Heather Rock
 
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 SlidesGDI Seattle - Intermediate HTML and CSS Class 3 Slides
GDI Seattle - Intermediate HTML and CSS Class 3 Slides
Heather Rock
 
GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3GDI Seattle Intro to HTML and CSS - Class 3
GDI Seattle Intro to HTML and CSS - Class 3
Heather Rock
 

Recently uploaded (20)

Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
5kW Solar System in India – Cost, Benefits & Subsidy 2025
5kW Solar System in India – Cost, Benefits & Subsidy 20255kW Solar System in India – Cost, Benefits & Subsidy 2025
5kW Solar System in India – Cost, Benefits & Subsidy 2025
Ksquare Energy Pvt. Ltd.
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
Connect and Protect: Networks and Network Security
Connect and Protect: Networks and Network SecurityConnect and Protect: Networks and Network Security
Connect and Protect: Networks and Network Security
VICTOR MAESTRE RAMIREZ
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
5kW Solar System in India – Cost, Benefits & Subsidy 2025
5kW Solar System in India – Cost, Benefits & Subsidy 20255kW Solar System in India – Cost, Benefits & Subsidy 2025
5kW Solar System in India – Cost, Benefits & Subsidy 2025
Ksquare Energy Pvt. Ltd.
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
Connect and Protect: Networks and Network Security
Connect and Protect: Networks and Network SecurityConnect and Protect: Networks and Network Security
Connect and Protect: Networks and Network Security
VICTOR MAESTRE RAMIREZ
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 

GDI Seattle Intro to HTML and CSS - Class 1

  • 1. BEGINNING HTML AND CSS CLASS 1HTML/CSS ~ Girl Develop It ~
  • 2. WELCOME! Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction. Some "rules" We are here for you! Every question is important Help each other Have fun
  • 3. WELCOME! Tell us about yourself. Who are you? On a scale of 1 to 10, how much do you know about HTML? What do you hope to get out of the class? “1 meaning 'It's a completely foreign language' to 10 meaning 'I can almost code my own website'.”
  • 4. WHAT IS HTML? HTML is the language your browser speaks. To tell the browser how we want it to "render" (display) our website, we have to learn to speak HTML!
  • 5. LET'S GET STARTED! <!DOCTYPE html> <html> </html>
  • 6. THE BARE BONES... <!DOCTYPE html> <html> <head> </head> <body> </body> </html>
  • 7. ADD A TITLE BETWEEN THE "HEAD" TAGS... <!DOCTYPE html> <html> <head> <title>My Web Page!</title> </head> <body> </body> </html>
  • 8. ADD A HEADING BETWEEN THE "BODY" TAGS ... <!DOCTYPE html> <html> <head> <title>My Web Page!</title> </head> <body> <h1>Hello World!</h1> </body> </html>
  • 9. NOW ADD A PARAGRAPH... <!DOCTYPE html> <html> <head> <title>My Web Page!</title> </head> <body> <h1>Hello World!</h1> <p>Meet your new web designer!</p> </body> </html>
  • 10. NOW SAVE YOUR PAGE AND GIVE IT A NAME ... index.html Open it up in a browser, view your masterpiece, and give yourself a pat on the back! YOU HAVE JUST CREATED A WEB PAGE!
  • 11. WHAT IS HTML? Go to any page on the web, right-click and select 'view source' and you will see HTML
  • 12. WHAT WE'LL LEARN TODAY The history of HTML and who uses it now HTML vs. CSS Elements and Tags Files and folders Organizing your code
  • 13. WHAT DOES HTML STAND FOR? HyperText Markup Language.
  • 14. FROM ITS NASCENCE TO TODAY... Early 90s Invented by Tim Berners-Lee Created "hypertext" to share scientific papers First web page August 6, 1991 No layout, No styling. A great example! http://www.w3.org/People/Raggett/book4/ch02.html
  • 15. FROM ITS NASCENCE TO TODAY... Late 90s HTML 4 in 1997-1998 Standardized by w3 Consortium (pack of super nerds) Pages still had very little styling options that would work in every browser. Plenty of table-based layouts around!
  • 16. FROM ITS NASCENCE TO TODAY... Early 00s XHTML in 2000 Combined XML and HTML Introduced stricter syntax HTML 5 in 2008-2009 Adopted over XHTML 2.0 Still HTML, but with many new features
  • 17. WHO USES HTML? Web designers: Plan, design and create (usually) small-scale websites. Front-end web developers: Involved in programming dynamic web applications or large sites. Responsible for the user experience on large sites (client-side). Differ from Back-end web developers, who are responsible for handling and storing data and server file structure (server-side).
  • 18. CLIENT­SIDE VS. SERVER­SIDE How websites travel around the world
  • 19. TOOLS OF THE TRADE Browsers and their debuggers Chrome — Chrome Developer Tool (comes with) Firefox — Firebug (add-on) Internet Explorer — IE Developer Tool (comes with) Safari — Developer Tool (comes with and must be enabled)
  • 20. TOOLS OF THE TRADE Text Editors TextWrangler - Mac Notepad ++ - Windows Sublime Text - Linux, Mac or Windows Just plain old Notepad!
  • 21. TOOLS OF THE TRADE Web Development Applications and Integration Development Environments (IDEs) BBEdit - Mac DreamWeaver - Windows or Mac Microsoft Expression Microsoft Visual Studio
  • 22. HTML AND CSS HTML: Came first (about 7 years before CSS). Provides logical structure to content (words and images) by organizing it into paragraphs, headings, tables, etc. Browser's default "styles", like spacing and font size, are just enough to make the structure apparent (if not appealing). Before CSS, some additional "styles" were applied with HTML. This is now considered very bad coding!
  • 23. HTML AND CSS CSS: CSS stands for Cascading Style Sheets. CSS was invented to remove all styles from HTML and keep them separate. Very flexible and powerful language that allows websites to look the way they do today. Describes how you want your site look — presentation-wise.
  • 24. HTML AND CSS Concrete example Words that make up a paragraph are content. Putting opening and closing paragraph tags around words create structure. <p>Words within a paragraph.</p> Making the font bigger and yellow using CSS is presentation: Words within a paragraph.
  • 25. HTML ELEMENT An element is usually composed of content (words, images, numbers, or even other elements), and HTML tags. We create elements by "wrapping" chunks of content inside an opening tag and a matching closing tag. Example: <p>Words within a paragraph.</p>
  • 26. Some elements have no content, just tags. We call these empty elements. (More on that later...)
  • 27. SYNTAX IS IMPORTANT! <P> Content goes here. </P> HTML is case-insensitive but the accepted convention is to use lower-case (except for the doctype element).
  • 28. CONTAINER ELEMENTS Container elements contain content along with an opening and a closing tag. Commonly used container elements: <p> (paragraph) <h1> (heading levels 1 - 6) <table> (table) <ul> (unordered list) <ol> (ordered list) <li> (list item) <a> (link)
  • 29. EMPTY ELEMENTS If the element does not contain content, it is said to be an empty element. "<br>" is an empty element that tells the browser to insert a line break in a sentence. It can be written three different ways: <br></br> (open and close tag, no content) <br /> (self-closing tag) <br> (just an opening tag) The first or second are required in XHTML.
  • 30. EMPTY ELEMENTS Commonly used empty elements: <br /> (break tag) <img /> (image tag) <input /> (form input) <button /> (form button) <hr /> (horizontal rule)
  • 31. HOW MANY ELEMENTS ARE IN OUR PAGE SO FAR? <!DOCTYPE html> <html> <head> <title>My Web Page!</title> </head> <body> <h1>Hello World!</h1> <p>Meet your new web designer!</p> </body> </html>
  • 32. All elements "nest" inside other elements...except the HTML element! (every thing else nests inside it) NESTING Your "p" element nests inside your "body" element, which nests inside your "html" element. Whichever element OPENS first CLOSES last!
  • 33. BE A GOOD NESTER! If you consistently indent your code, you will avoid "bad nesting"!
  • 34. DOCTYPE: The first element on an HTML page. It tells the browser which version of HTML the page is using. Here's the old way of writing it: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// www.w3.org/TR/html4/loose.dtd"> Now we can write it this way: <!DOCTYPE html>
  • 35. HTML ELEMENT After <DOCTYPE>, the very next element on every page is the html element. Its opening and closing <html> tags wrap around all the rest. <!DOCTYPE html> <html> Everything else goes in here! ... </html>
  • 36. HEAD AND BODY ELEMENTS Head: Contains the title, meta information, embedded styles, and often scripts. Meta information is not visible to the user, but tells search engines about your page, who created it, and other info. The contents of the head element are not visible on the web page...except the title! Body: Contains the actual content of the page. This is the part of your page that visitors see and interact with.
  • 37. <h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> HEADING 1 HEADING 2 HEADING 3 HEADING 4 HEADING 5 HEADING 6 HEADING ELEMENTS * Heading number indicates hierarchy, not size. Important for accessibility
  • 39. PARAGRAPHS Very common and very useful! <p>This is a one-sentence paragraph</p>
  • 40. <p> Imagine there's no Heaven <br/> It's easy if you try <br/> No hell below us <br/> Above us only sky </p> LINE BREAKS
  • 41. <ul> <li>List Item</li> <li>Another List Item</li> </ul> <ol> <li>List Item</li> <li>Another List Item</li> </ol> Unordered list (bullets) List Item Another List Item Ordered list (sequence) 1. List Item 2. Another List Item LISTS
  • 42. LISTS: EXAMPLES Lists can be used to organize any list of items. You'd be surprised how often lists are used in web design.
  • 44. <table> <tr> <th>Column Heading</th> <th>Column Heading</th> </tr> <tr> <td>data</td> <td>data</td> </tr> </table> Column Heading Column Heading Data Data TABLES Tables present data (information) in a grid format. They're built row by row, so they're very hard to edit/update.
  • 45. TABLES: EXAMPLES Tables can be styled with CSS to add zebra striping or to highlight important rows/columns.
  • 47. LET'S DEVELOP IT! Add paragraphs, lists, headings and tables to your web page. Use my example and the content you brought today to flesh out your page!
  • 48. BLOCK­LEVEL VS. INLINE ELEMENTS Block-level: So far we've just talked about block-level elements. Block level elements begin on a new line, and their default width is usually the width of the browser! Browsers give them default padding on top and bottom.
  • 49. BLOCK­LEVEL VS. INLINE ELEMENTS Commonly used block-level elements: <h1> thru <h6> (headings) <ol> and <ul> (lists) <li> (list items) <table> (tables) <form> (forms)
  • 50. BLOCK­LEVEL VS. INLINE ELEMENTS Inline: Inline elements do not start on a new line and their default width is only as wide as their contents. They must be nested inside a block-level element.
  • 51. BLOCK­LEVEL VS. INLINE ELEMENTS Commonly used inline elements: <img> (images) <a> (links or "anchors") <em> (emphasize) <strong> (make strong) <span> (has no effect by itself)
  • 52. "DEPRECATED" (OBSOLETE) ELEMENTS: Deprecated elements are elements that have been phased out and will eventually no longer be supported by browsers. Examples: <i> (italicize) <b> (bold) <i> and <b> both "style" the content so they are discouraged in favor of using CSS.
  • 53. SPAN ELEMENT <span> has no other purpose than to provide a "hook" to text that can't be otherwise targeted. Most often used for styling or scripting. By itself, has no visible or interactive affect on content. <p>Here is a paragraph with <span>span tags</span> in the middle.</p>
  • 54. LET'S DEVELOP IT! Select a couple of words or phrases in your content that could be emphasized and put <em> and <strong> tags around them.
  • 55. ATTRIBUTES Two important elements of web pages — links and images — require attributes. Attributes are components of an elements (just like eyes are components of a human). You describe an attribute by using a value (like saying "Her eyes are brown"). think ~ person: eyes = "brown"
  • 56. ATTRIBUTES For example: Links require an href attribute to tell where they link to (href stands for "hypertext reference"). Here's how that looks: <a href = "http://www.girldevelopit.com"> think ~ person: address = "123 Main Street" Attributes are always placed inside an opening tag, before the right angle bracket.
  • 57. LINKS The <a> (anchor) tag surrounds text or images to turn them into links. Links have two mandatory components: tag: <a></a> href attribute: "http://www.girldevelopit.com" A third component, the title attribute, should only be used if the link's destination isn't obvious (like clicking on an image) <a href ="http://www.girldevelopit.com">Girl Develop It</a>
  • 58. LINK CONTINUED... Using target="_blank" causes the link to open in a new window/tab. example: <a href="home.html" target="_blank">Link Text</a> Inserting mailto:some_email_address.com into the href attribute causes the link to open the default mail client. example: <a href="mailto:info@girldevelopit.com">E- mail us!</a>
  • 59. LET'S DEVELOP IT! Within your content, add a link to the Girl-Develop-It website! <a href ="http://www.girldevelopit.com">Girl Develop It</a>
  • 60. IMAGE ELEMENT <img> is an empty element. It is also an inline element. Image elements have three components Tag: <img/> Src attribute: "http://girldevelopit.com/assets/pink- logo.png" Alt attribute: "Girl Develop It logo" <img src ="http://girldevelopit.com/assets/pink-logo.png" alt = "Girl Develop It Logo"/>
  • 61. LET'S DEVELOP IT! Add the Girl Develop It logo to your webpage by putting this code somewhere in a paragraph or heading! <img src ="http://girldevelopit.com/assets/pink-logo.png" alt = "Girl Develop It Logo"/>
  • 62. GOOD HOUSEKEEPING: MANAGING FILES AND FOLDERS Create a new folder on your laptop's desktop and drag your index.html document into it. This is your "site root folder". Inside, next to index.html, create a new folder called "styles". This is where your CSS styles will go. Create another folder next to "styles" called "images". This is where all your images will go. Copy your image and paste it in the "images" folder.
  • 63. RELATIVE VS. ABSOLUTE PATHS FOR LINKS & IMAGES Absolute: Refer to a specific location of a file on a server src = "http://www.girldevelopit.com/chapters/de Typically used when pointing to a link that is not within y domain. Easy to use. There's no need for a starting point. Think ~ searching for an address on MapQuest.
  • 64. RELATIVE VS. ABSOLUTE PATHS FOR LINKS & IMAGES Relative: Refer to a local file in your site root folder src = "images/myimage.jpg" Describes the location of the file relative to the file you're in. Think ~ using the "directions" feature on MapQuest. What kind of path do you type into your address bar?
  • 65. PROVIDING "DIRECTIONS" USING RELATIVE PATH If the file is in the same folder: kitty.jpg If the file is in a folder on the same level you're on: images/kitty.jpg If the file is in a folder that's one level above: ../images/kitty.jpg Or to go straight up to the top-level folder: /images/kitty.jpg
  • 66. LET'S DEVELOP IT Let's add one of your own images to your page! Make sure your image is inside the "images" folder you created. Then link to it using a relative path. <img src ="images/your_image_name.jpg" alt = "describe your image"/> Replace "your_image_name.jpg" with the name and file type of your image.
  • 67. WRITING CLEAN CODE 1. Nest your tags properly! 2. Make good use of white space! 3. Leave yourself notes!
  • 68. <p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p> <p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p> <p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p> 2. MAKE GOOD USE OF WHITE SPACE! Browsers don't care about white space Paragraph 1 Paragraph 2 Paragraph 3
  • 69. 3. LEAVE YOURSELF NOTES! You can add comments to your code. The browser ignores them, but you (or another coder) can see them. <!-- Comment goes here -->
  • 70. Use them to organize your code: <!-- Beginning of header --> <div id="header">Header Content </div> <!-- End of header --> Or 'comment out' code (to hide it from the browser): <!-- <ol> <li>List Item</li> <li>Another List Item</li> </ol> -->