SlideShare a Scribd company logo
Coding
HTML Basics
What is HTML?
• Hypertext Markup Language
• Using HTML, text is formatted by wrapping it in a tag.
• The tags provide instructions to the browser (Safari, IE,
Firefox, Chrome, etc.) for how to render the text on screen.
<h2>Text wrapped in an heading level 2 tag looks like this</h2>
START TAG END TAG
Tags-How Tagging Works
3 Parts of an HTML Document
• An HTML document is divided into three sections:
1) Declarations 2) Head 3) Body
1
2
3
Document Type
• The <!DOCTYPE> declaration must be the very first
thing in your HTML document, before the <html> tag.
• The <!DOCTYPE> declaration is not an HTML tag; it is
an instruction to the web browser about what version of
HTML the page is written in.
Starting and Ending
your Code
• The first tag you need is:
<html>
*EVERYTHING INBETWEEN
</html>
GETTING STARTED
• OPEN UP NOTEPAD ON YOUR COMPUTERS
• IF YOU’RE WORKING FROM A MAC DOWNLOAD
TEXTWRANGLER
• Start writing your code:
<html>
</html>
Inside <html> </html>
There are 2 sections within the <html></html>tags:
• <head> </head>
The head tag contains information about the page
• <body> </body>
Actual content displayed to the user on the web page
Type that out in Notepad
<html>
<head>
</head>
<body>
</body>
</html>
Inside <head> </head>
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
</body>
</html>
Now Save it
1. Save as html file in a folder titled “HTML”
(type “.html” at end of file name if necessary)
2. OPEN FILE in WEB BROWSER-drag file into a new tab
3. You will see the TITLE on the tab (nothing on pg. yet)
Adding Content
• Inside <body> </body>
• HEADING TAGS
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
TEST THAT OUT!
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
</body>
</html>
PARAGRAPH TAG
<p><p/>
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my
students are wonderful and talented. They are all going to
understand basic coding by the end of this class.</p>
</body>
</html>
Add another paragraph
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my
students are wonderful and talented. They are all going to understand
basic coding by the end of this class.</p>
<p>This is my second paragraph. As you can see, it is below
my first paragraph.</p>
</body>
</html>
Breaking up a Paragraph
• </br> - another self closing tag
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my students are
wonderful and talented. <br/>They are all going to understand basic coding by the
end of this class. Oh, this is an example of a break tag that is dividing this
paragraph into two lines. Do you see it?</p>
<p>This is my second paragraph. As you can see, it is below my first
paragraph.</p>
</body>
</html>
Changing Text attributes
• <i></i> italics
• <em></em> italics
• <strong></strong> bold
• <b></b> Bold
• <u></u> underlined
Adding emphasis in a paragraph
<p>
This is my <i>first year</i> teaching these classes.
All of my students are <strong>wonderful and
talented.</strong>
They are all going to <em>understand</em> basic
<em><u>coding</em></u> by the end of this class.
</p>
Adding a line
• <hr/> - self closing tag
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my students are wonderful and
talented. <br/>They are all going to understand basic coding by the end of this class. Oh, this is
an example of a break tag that is dividing this paragraph into two lines. Do you see it? </p>
<p>This is my second paragraph. As you can see, it is below my first
paragraph.</p>
<hr/>
<img src="http://uhaweb.hartford.edu/aschmidt/kitten11.jpg"/>
</body>
</html>
Creating Bulleted Lists
• To create a bullet pointed list we will use an
unordered list <ul></ul>
• The whole list is wrapped in UL tags and then all of the elements in the list are
wrapped in <li></li> tags
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</body>
</html>
Creating Numbered Lists
• Instead of <ul></ul> you will use <ol></ol>
• The whole list is wrapped in OL tags and then all of the elements in the
list are wrapped in <li></li> tags
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
Creating Definition Lists
• <dl></dl>
• The whole list is wrapped in dl tags and then all of the elements in the list are
wrapped in either <dt></dt> or <dd></dd>
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<dl>
<dt>term1</dt>
<dd>definition 1</dd>
<dt>term2</dt>
<dd>definition 2</dd>
</dl>
</body>
</html>
Adding an IMAGE
• Find an image on Google
• Click on it
• Click View Image (so the image is on it’s own page)
• Copy the URL
• Now we will add it to our code
Inserting Image from Web
<img src=“INSERTLINKHERE”/>
Resize the image (below)
<img src=“LINK” alt=“displaytext” style=“width: #; #;”>
Adding Image from Folder
• Create a file in your HTML folder titled IMAGES
• Save an image in the Images folder
• <img src=”images/TitleOfYourImage.jpg"
alt=”NameYourImage" style="width:#px; height:#px”/>
Add a video from
Youtube
Get the embed code from YOUTUBE
<iframe width=”#" height=”#" src=“YOUTUBE LINK HERE"
frameborder="0" allowfullscreen></iframe>
Creating Link
Open link in new tab
<a href="http://facebook.com" target="_blank">Click
Here<a/>
Links from Icons
<a href=”WEBSITELINK"> <img src=”ICON"alt="Youtube
Link" width=”#" height=”#"></a>
HTML Text Color
<h1 style=“color:blue;”>This is a
heading</h1>
<p style="color:red;">This is a
paragraph.</p>
Change Background color
to a line of text
The <span> Element
• The <span> element is often used as a container for
some text.
• The <span> element has no required attributes, but both
style and class are common.
• When used together with CSS, the <span> element can
be used to style parts of the text:
The <span> Element
<!DOCTYPE html>
<html>
<body>
<h1>My <span style="color:red">Important</span>
Heading</h1>
</body>
</html>
HTML Fonts
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
HTML Text Size
<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>v
HTML Text Alignment
<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>
HTML Background Color
• <!DOCTYPE html>
• <html>
• <body style="background-color:powderblue;">
• <h1>This is a heading</h1>
• <p>This is a paragraph.</p>
• </body>
• </html>
HTML Background Image from File
• YOU MUST HAVE YOUR FILE SAVES AS INDEX.HTML
<html>
<head> <title>Title of my Page</title>
<body background = ”images/watercolor.jpg">
*everything else
</body>
</html>
CSS
• CSS stands for Cascading Style Sheets.
• CSS describes how HTML elements are to be displayed
on screen, paper, or in other media.
• CSS saves a lot of work. It can control the layout of
multiple web pages all at once.
CSS can be added to HTML elements in 3 ways:
• Inline - by using the style attribute in HTML elements
• Internal - by using a <style> element in the <head>
section
• External - by using an external CSS file
Inline CSS
• <h1 style="color:blue;">This is a Blue Heading</h1>
Internal CSS
• An internal CSS is used to define a style for a single HTML page.
• An internal CSS is defined in the <head> section of an HTML page, within a <style>
element:
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS Background Image from Link
<html>
<head> <title>Title of my Page</title>
<style>
body {
background-image: url(”LINKHERE");
}
</style>
</head>
<body>
CSS Border
<!DOCTYPE html>
<html>
<head>
<style>
p {
border: 1px solid powderblue;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
CSS Padding
<!DOCTYPE html>
<html>
<head>
<style>
p {
border: 1px solid powderblue;
padding: 30px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
CSS Margin
<!DOCTYPE html>
<html>
<head>
<style>
p {
border: 1px solid powderblue;
margin: 50px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
CSS id Attribute
<!DOCTYPE html>
<html>
<head>
<style>
#p01 {
color: blue;
}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p id="p01">I am different.</p>
</body>
</html>
CSS Class Attribute
<!DOCTYPE html>
<html>
<head>
<style>
p.different {
color: red;
}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p class=”different">I am different.</p>
<p>This is a paragraph.</p>
<p class=”different">I am different too.</p>
</body>
</html>
The <div> Element
• The <div> element is often used as a container for other
HTML elements.
• The <div> element has no required attributes, but both
style and class are common.
• When used together with CSS, the <div> element can be
used to style blocks of content:
The <div> Element
<!DOCTYPE html>
<html>
<body>
<p>This is some text.</p>
<div style="color:#0000FF">
<h3>This is a heading in a div element</h3>
<p>This is some text in a div element.</p>
</div>
<p>This is some text.</p>
</body>
</html>
The <div> Element
<!DOCTYPE html>
<html>
<body>
<div style="background-
color:black;color:white;padding:20px;">
<h2>London</h2>
<p>London is the capital city of England. It is the most
populous city in the United Kingdom, with a metropolitan
area of over 13 million inhabitants.</p>
<p>Standing on the River Thames, London has been a
major settlement for two millennia, its history going back
to its founding by the Romans, who named it
Londinium.</p>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
div.cities {
background-color: black;
color: white;
margin: 20px 0 20px 0;
padding: 20px;
}
</style>
</head>
<body>
<div class="cities">
<h2>London</h2>
<p>London is the capital of England. It is the most populous city in the United Kingdom, with a metropolitan
area of over 13 million inhabitants.</p>
<p>Standing on the River Thames, London has been a major settlement for two millennia, its history going
back to its founding by the Romans, who named it Londinium.</p>
</div>
<div class="cities">
<h2>Paris</h2>
<p>Paris is the capital and most populous city of France.</p>
<p>Situated on the Seine River, it is at the heart of the Île-de-France region, also known as the région
parisienne.</p>
<p>Within its metropolitan area is one of the largest population centers in Europe, with over 12 million
inhabitants.</p>
</div>
HTML LAYOUT
EXAMPLE (inside <head> tag)
nav ul {
list-style-type: none;
padding: 0;
}
nav ul a {
text-decoration: none;
}
article {
margin-left: 170px;
border-left: 1px solid gray;
padding: 1em;
overflow: hidden;
}
</style>
</head>
<!DOCTYPE html>
<html>
<head>
<style>
div.container {
width: 100%;
border: 1px solid gray;
}
header, footer {
padding: 1em;
color: white;
background-color: black;
clear: left;
text-align: center;
}
nav {
float: left;
max-width: 160px;
margin: 0;
padding: 1em;
}
Example (inside <body>)
<article>
<h1>London</h1>
<p>London is the capital city of England. It
is the most populous city in the United
Kingdom, with a metropolitan area of over 13
million inhabitants.</p>
<p>Standing on the River Thames, London
has been a major settlement for two
millennia, its history going back to its
founding by the Romans, who named it
Londinium.</p>
</article>
<footer>Copyright &copy;
W3Schools.com</footer>
</div>
</body>
</html>
<body>
<div class="container">
<header>
<h1>City Gallery</h1>
</header>
<nav>
<ul>
<li>London</li>
<li>Paris</li>
<li>Tokyo</li>
</ul>
</nav>
Html coding
See what you can come
up with!

More Related Content

PPTX
Basic HTML
PPT
Eye catching HTML BASICS tips: Learn easily
PPTX
PPTX
Html notes with Examples
PDF
Introduction to html
ODP
PPTX
Basic html structure
PPSX
Html introduction
Basic HTML
Eye catching HTML BASICS tips: Learn easily
Html notes with Examples
Introduction to html
Basic html structure
Html introduction

What's hot (20)

PPTX
Html ppt
PPTX
HTML (Web) basics for a beginner
PPTX
Html links
PPTX
Anchor tag HTML Presentation
PDF
Html / CSS Presentation
PPT
Html Slide Part-1
PPT
HTML Tags
PPTX
Complete Lecture on Css presentation
PPTX
PPT
Cascading Style Sheets (CSS) help
PPT
Intro Html
PDF
Bootstrap
PDF
Introduction to HTML5
PPTX
Basic Html Knowledge for students
PPTX
Html images syntax
PPTX
HTML Fundamentals
PDF
Php introduction
DOCX
html tags
Html ppt
HTML (Web) basics for a beginner
Html links
Anchor tag HTML Presentation
Html / CSS Presentation
Html Slide Part-1
HTML Tags
Complete Lecture on Css presentation
Cascading Style Sheets (CSS) help
Intro Html
Bootstrap
Introduction to HTML5
Basic Html Knowledge for students
Html images syntax
HTML Fundamentals
Php introduction
html tags
Ad

Viewers also liked (20)

PPT
Uploading index-sallie
PPTX
Copyright law
DOCX
Plan de clase i.e lorenzo yalí lenguaje 2017 grado 5°
DOC
Aval. diag _mat_4_ano_2014
DOCX
Antecedentes Nathalia Velandia
PPTX
Clasificacion de empresas
PDF
Ken degilio brand camp v2.key
PDF
Lời từ chối hoàn hảo -- william ury
PDF
Vía crucis 2017
DOC
Aval. diag _mat_4_ano_2014
PPTX
Seja homem! cuide se!
PPTX
La Hoja
PDF
Anatomy of Respiratory System
PDF
Etapa 1
PDF
Prueba de hipotesis estadistica
PPTX
Bootstrap
PDF
INEI - genero 2016
PDF
Circular1 17 tecnica
PPT
Introduction to html
PPTX
HTML, CSS and Java Scripts Basics
Uploading index-sallie
Copyright law
Plan de clase i.e lorenzo yalí lenguaje 2017 grado 5°
Aval. diag _mat_4_ano_2014
Antecedentes Nathalia Velandia
Clasificacion de empresas
Ken degilio brand camp v2.key
Lời từ chối hoàn hảo -- william ury
Vía crucis 2017
Aval. diag _mat_4_ano_2014
Seja homem! cuide se!
La Hoja
Anatomy of Respiratory System
Etapa 1
Prueba de hipotesis estadistica
Bootstrap
INEI - genero 2016
Circular1 17 tecnica
Introduction to html
HTML, CSS and Java Scripts Basics
Ad

Similar to Html coding (20)

PPT
Html ppt by Fathima faculty Hasanath college for women bangalore
PPTX
Introduction to HTML: Overview and Structure
PPT
Basics ogHtml
PDF
Introduction to html (912 kb)
PPTX
WEBSITE DEVELOPMENT,HTML is the standard markup language for creating Web pag...
DOCX
Web Designing.docx
PPTX
Html1
PPT
Html ppt computer
PPTX
Chapter-5.pptx introduction to HTML and CSS
PDF
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
PDF
html.pdf
PPTX
html.pptx class notes to prepare html completly
PPSX
Computer language - HTML tags
PPTX
Html basics-auro skills
DOC
Html, xml and java script
PPTX
SDP_HTML.pptx
PPTX
PPTX
html (1) (1).pptx for all students to learn
PPT
html and css- 23091 3154 458-5d4341a0.ppt
PPTX
Unit 2 Internet and web technology CSS report
Html ppt by Fathima faculty Hasanath college for women bangalore
Introduction to HTML: Overview and Structure
Basics ogHtml
Introduction to html (912 kb)
WEBSITE DEVELOPMENT,HTML is the standard markup language for creating Web pag...
Web Designing.docx
Html1
Html ppt computer
Chapter-5.pptx introduction to HTML and CSS
HSC INFORMATION TECHNOLOGY CHAPTER 1 ADVANCED WEB DESIGNING PART I.pdf
html.pdf
html.pptx class notes to prepare html completly
Computer language - HTML tags
Html basics-auro skills
Html, xml and java script
SDP_HTML.pptx
html (1) (1).pptx for all students to learn
html and css- 23091 3154 458-5d4341a0.ppt
Unit 2 Internet and web technology CSS report

More from Briana VanBuskirk (13)

PPTX
Gamification in Canvas
PPTX
How to wash your hands
PPTX
Magazine inspiration
PPTX
Midterm review
PPTX
Editor's letter
PPTX
Textual elements
PPTX
Visual Design
PPTX
Magazine elements
PPTX
Logo design
PPTX
Personal branding digital presence
PPTX
Social conscious poster
PPTX
Newsletter Inspiration
PPTX
Tessellation PPT
Gamification in Canvas
How to wash your hands
Magazine inspiration
Midterm review
Editor's letter
Textual elements
Visual Design
Magazine elements
Logo design
Personal branding digital presence
Social conscious poster
Newsletter Inspiration
Tessellation PPT

Recently uploaded (20)

PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Classroom Observation Tools for Teachers
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Cell Types and Its function , kingdom of life
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Insiders guide to clinical Medicine.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Pharma ospi slides which help in ospi learning
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Classroom Observation Tools for Teachers
Supply Chain Operations Speaking Notes -ICLT Program
Cell Types and Its function , kingdom of life
2.FourierTransform-ShortQuestionswithAnswers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
TR - Agricultural Crops Production NC III.pdf
PPH.pptx obstetrics and gynecology in nursing
O5-L3 Freight Transport Ops (International) V1.pdf
VCE English Exam - Section C Student Revision Booklet
Insiders guide to clinical Medicine.pdf
Anesthesia in Laparoscopic Surgery in India
Microbial disease of the cardiovascular and lymphatic systems
Pharma ospi slides which help in ospi learning
102 student loan defaulters named and shamed – Is someone you know on the list?

Html coding

  • 2. What is HTML? • Hypertext Markup Language • Using HTML, text is formatted by wrapping it in a tag. • The tags provide instructions to the browser (Safari, IE, Firefox, Chrome, etc.) for how to render the text on screen. <h2>Text wrapped in an heading level 2 tag looks like this</h2> START TAG END TAG
  • 4. 3 Parts of an HTML Document • An HTML document is divided into three sections: 1) Declarations 2) Head 3) Body 1 2 3
  • 5. Document Type • The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag. • The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.
  • 6. Starting and Ending your Code • The first tag you need is: <html> *EVERYTHING INBETWEEN </html>
  • 7. GETTING STARTED • OPEN UP NOTEPAD ON YOUR COMPUTERS • IF YOU’RE WORKING FROM A MAC DOWNLOAD TEXTWRANGLER • Start writing your code: <html> </html>
  • 8. Inside <html> </html> There are 2 sections within the <html></html>tags: • <head> </head> The head tag contains information about the page • <body> </body> Actual content displayed to the user on the web page
  • 9. Type that out in Notepad <html> <head> </head> <body> </body> </html>
  • 10. Inside <head> </head> <html> <head> <title>Title of my Page</title> </head> <body> </body> </html>
  • 11. Now Save it 1. Save as html file in a folder titled “HTML” (type “.html” at end of file name if necessary) 2. OPEN FILE in WEB BROWSER-drag file into a new tab 3. You will see the TITLE on the tab (nothing on pg. yet)
  • 12. Adding Content • Inside <body> </body> • HEADING TAGS <h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6>
  • 13. TEST THAT OUT! <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> </body> </html>
  • 14. PARAGRAPH TAG <p><p/> <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. They are all going to understand basic coding by the end of this class.</p> </body> </html>
  • 15. Add another paragraph <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. They are all going to understand basic coding by the end of this class.</p> <p>This is my second paragraph. As you can see, it is below my first paragraph.</p> </body> </html>
  • 16. Breaking up a Paragraph • </br> - another self closing tag <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. <br/>They are all going to understand basic coding by the end of this class. Oh, this is an example of a break tag that is dividing this paragraph into two lines. Do you see it?</p> <p>This is my second paragraph. As you can see, it is below my first paragraph.</p> </body> </html>
  • 17. Changing Text attributes • <i></i> italics • <em></em> italics • <strong></strong> bold • <b></b> Bold • <u></u> underlined
  • 18. Adding emphasis in a paragraph <p> This is my <i>first year</i> teaching these classes. All of my students are <strong>wonderful and talented.</strong> They are all going to <em>understand</em> basic <em><u>coding</em></u> by the end of this class. </p>
  • 19. Adding a line • <hr/> - self closing tag <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. <br/>They are all going to understand basic coding by the end of this class. Oh, this is an example of a break tag that is dividing this paragraph into two lines. Do you see it? </p> <p>This is my second paragraph. As you can see, it is below my first paragraph.</p> <hr/> <img src="http://uhaweb.hartford.edu/aschmidt/kitten11.jpg"/> </body> </html>
  • 20. Creating Bulleted Lists • To create a bullet pointed list we will use an unordered list <ul></ul> • The whole list is wrapped in UL tags and then all of the elements in the list are wrapped in <li></li> tags <html> <head> <title>Title of my Page</title> </head> <body> <ul> <li>Item 1</li> <li>Item 2</li> </ul> </body> </html>
  • 21. Creating Numbered Lists • Instead of <ul></ul> you will use <ol></ol> • The whole list is wrapped in OL tags and then all of the elements in the list are wrapped in <li></li> tags <html> <head> <title>Title of my Page</title> </head> <body> <ol> <li>Item 1</li> <li>Item 2</li> </ol> </body> </html>
  • 22. Creating Definition Lists • <dl></dl> • The whole list is wrapped in dl tags and then all of the elements in the list are wrapped in either <dt></dt> or <dd></dd> <html> <head> <title>Title of my Page</title> </head> <body> <dl> <dt>term1</dt> <dd>definition 1</dd> <dt>term2</dt> <dd>definition 2</dd> </dl> </body> </html>
  • 23. Adding an IMAGE • Find an image on Google • Click on it • Click View Image (so the image is on it’s own page) • Copy the URL • Now we will add it to our code
  • 24. Inserting Image from Web <img src=“INSERTLINKHERE”/> Resize the image (below) <img src=“LINK” alt=“displaytext” style=“width: #; #;”>
  • 25. Adding Image from Folder • Create a file in your HTML folder titled IMAGES • Save an image in the Images folder • <img src=”images/TitleOfYourImage.jpg" alt=”NameYourImage" style="width:#px; height:#px”/>
  • 26. Add a video from Youtube Get the embed code from YOUTUBE <iframe width=”#" height=”#" src=“YOUTUBE LINK HERE" frameborder="0" allowfullscreen></iframe>
  • 28. Open link in new tab <a href="http://facebook.com" target="_blank">Click Here<a/>
  • 29. Links from Icons <a href=”WEBSITELINK"> <img src=”ICON"alt="Youtube Link" width=”#" height=”#"></a>
  • 30. HTML Text Color <h1 style=“color:blue;”>This is a heading</h1> <p style="color:red;">This is a paragraph.</p>
  • 31. Change Background color to a line of text
  • 32. The <span> Element • The <span> element is often used as a container for some text. • The <span> element has no required attributes, but both style and class are common. • When used together with CSS, the <span> element can be used to style parts of the text:
  • 33. The <span> Element <!DOCTYPE html> <html> <body> <h1>My <span style="color:red">Important</span> Heading</h1> </body> </html>
  • 34. HTML Fonts <h1 style="font-family:verdana;">This is a heading</h1> <p style="font-family:courier;">This is a paragraph.</p>
  • 35. HTML Text Size <h1 style="font-size:300%;">This is a heading</h1> <p style="font-size:160%;">This is a paragraph.</p>v
  • 36. HTML Text Alignment <h1 style="text-align:center;">Centered Heading</h1> <p style="text-align:center;">Centered paragraph.</p>
  • 37. HTML Background Color • <!DOCTYPE html> • <html> • <body style="background-color:powderblue;"> • <h1>This is a heading</h1> • <p>This is a paragraph.</p> • </body> • </html>
  • 38. HTML Background Image from File • YOU MUST HAVE YOUR FILE SAVES AS INDEX.HTML <html> <head> <title>Title of my Page</title> <body background = ”images/watercolor.jpg"> *everything else </body> </html>
  • 39. CSS • CSS stands for Cascading Style Sheets. • CSS describes how HTML elements are to be displayed on screen, paper, or in other media. • CSS saves a lot of work. It can control the layout of multiple web pages all at once. CSS can be added to HTML elements in 3 ways: • Inline - by using the style attribute in HTML elements • Internal - by using a <style> element in the <head> section • External - by using an external CSS file
  • 40. Inline CSS • <h1 style="color:blue;">This is a Blue Heading</h1>
  • 41. Internal CSS • An internal CSS is used to define a style for a single HTML page. • An internal CSS is defined in the <head> section of an HTML page, within a <style> element: <html> <head> <style> body {background-color: powderblue;} h1 {color: blue;} p {color: red;} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 42. CSS Background Image from Link <html> <head> <title>Title of my Page</title> <style> body { background-image: url(”LINKHERE"); } </style> </head> <body>
  • 43. CSS Border <!DOCTYPE html> <html> <head> <style> p { border: 1px solid powderblue; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 44. CSS Padding <!DOCTYPE html> <html> <head> <style> p { border: 1px solid powderblue; padding: 30px; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 45. CSS Margin <!DOCTYPE html> <html> <head> <style> p { border: 1px solid powderblue; margin: 50px; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 46. CSS id Attribute <!DOCTYPE html> <html> <head> <style> #p01 { color: blue; } </style> </head> <body> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p id="p01">I am different.</p> </body> </html>
  • 47. CSS Class Attribute <!DOCTYPE html> <html> <head> <style> p.different { color: red; } </style> </head> <body> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p class=”different">I am different.</p> <p>This is a paragraph.</p> <p class=”different">I am different too.</p> </body> </html>
  • 48. The <div> Element • The <div> element is often used as a container for other HTML elements. • The <div> element has no required attributes, but both style and class are common. • When used together with CSS, the <div> element can be used to style blocks of content:
  • 49. The <div> Element <!DOCTYPE html> <html> <body> <p>This is some text.</p> <div style="color:#0000FF"> <h3>This is a heading in a div element</h3> <p>This is some text in a div element.</p> </div> <p>This is some text.</p> </body> </html>
  • 50. The <div> Element <!DOCTYPE html> <html> <body> <div style="background- color:black;color:white;padding:20px;"> <h2>London</h2> <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p> </div> </body> </html>
  • 51. <!DOCTYPE html> <html> <head> <style> div.cities { background-color: black; color: white; margin: 20px 0 20px 0; padding: 20px; } </style> </head> <body> <div class="cities"> <h2>London</h2> <p>London is the capital of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p> </div> <div class="cities"> <h2>Paris</h2> <p>Paris is the capital and most populous city of France.</p> <p>Situated on the Seine River, it is at the heart of the Île-de-France region, also known as the région parisienne.</p> <p>Within its metropolitan area is one of the largest population centers in Europe, with over 12 million inhabitants.</p> </div>
  • 53. EXAMPLE (inside <head> tag) nav ul { list-style-type: none; padding: 0; } nav ul a { text-decoration: none; } article { margin-left: 170px; border-left: 1px solid gray; padding: 1em; overflow: hidden; } </style> </head> <!DOCTYPE html> <html> <head> <style> div.container { width: 100%; border: 1px solid gray; } header, footer { padding: 1em; color: white; background-color: black; clear: left; text-align: center; } nav { float: left; max-width: 160px; margin: 0; padding: 1em; }
  • 54. Example (inside <body>) <article> <h1>London</h1> <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p> </article> <footer>Copyright &copy; W3Schools.com</footer> </div> </body> </html> <body> <div class="container"> <header> <h1>City Gallery</h1> </header> <nav> <ul> <li>London</li> <li>Paris</li> <li>Tokyo</li> </ul> </nav>
  • 56. See what you can come up with!