SlideShare a Scribd company logo
html & css
       the basics
tag          content


             <h1>My heading</h1>


                                   closing tag



tags
are for describing      content.
what's content?
 tex
       t                 ag es
                    im
           videos

{all the above.
more tag examples
   <h2>My subheading</h2>

   <a href=”http://google.com”>Google</a>




     {      attribute
<img src=”photo.jpg”></img>




                             where's the content?
sometimes, the attributes are enough to describe
tag – hence, no content. tags without content, can
be written in a shortened way, like so:

            <img src=”photo.jpg” />
a bunch of tags together is
called an HTML document.
checkout some popular website's HTML
                      code.


chrome & firefox

       right click anywhere on the page, and click
       “View Source” or “View Page Source”.
whoa.
                      you probably just saw a bunch of stuff you've
                      never seen before. for example, on Google or
                      YouTube you might have seen some
 function()
 { doSomething();
   uglyParentheses();                       JavaScript
 }


p { font-family:Helvetica; }                    CSS
without CSS:                           what's CSS?
 <center><p>My centered paragraph.</p></center>




with CSS:              html    css

                               p {
<p>My centered paragraph</p>
                                 align: center;
                               }
CSS is just a way of separating
                            style   content
font                                              text
color                                         images
image border                                   videos
alignment (left, center, right)                  links
using CSS
       do stuff with all p
       (paragraph) tags

                                                       set font to arial
change the              p {
                          color: white;
color to white            font-family: Arial;
                          font-size: 12px;
                        }




                                 set font size to 12

 color, font-family, and font-size are properties.
  white, arial, and 12px are values.
say I wanted to...

change all heading level 1 (h1) tags to the color black

change all link (a) tags to the color blue

change all image (img) tags to the color blue


                give me the CSS.

More Related Content

PDF
Basic HTML & CSS
KEY
Haml and Sass Introduction
PPTX
Html images and html backgrounds
DOCX
PDF
PDF
Pemrograman Web 2 - CSS
PDF
css-tutorial
PDF
CSS3 Media Queries
Basic HTML & CSS
Haml and Sass Introduction
Html images and html backgrounds
Pemrograman Web 2 - CSS
css-tutorial
CSS3 Media Queries

What's hot (20)

PDF
CSS and Layout
PDF
Css introduction
PDF
Pemrograman Web 4 - Bootstrap 3
PPTX
Your First Wordpress Theme
PPTX
Code For Every Librarian
PDF
Intro to html, css & sass
PPTX
Css & css3
PDF
Lesson 02
PDF
BEM Methodology — @Frontenders Ticino —17/09/2014
PDF
Haml. New HTML? (RU)
PPTX
From PSD to WordPress Theme: Bringing designs to life
PPTX
Building a WordPress theme
PDF
Day5
KEY
ARTDM 171, Week 5: CSS
PDF
Responsive Web Design with HTML5 and CSS3
PPTX
CSS Selectors: element, class, id
PPTX
CSS Layout Tutorial
PDF
Visualizing The Code
PPTX
HTML Lesson 5
PDF
Links and Navigation
CSS and Layout
Css introduction
Pemrograman Web 4 - Bootstrap 3
Your First Wordpress Theme
Code For Every Librarian
Intro to html, css & sass
Css & css3
Lesson 02
BEM Methodology — @Frontenders Ticino —17/09/2014
Haml. New HTML? (RU)
From PSD to WordPress Theme: Bringing designs to life
Building a WordPress theme
Day5
ARTDM 171, Week 5: CSS
Responsive Web Design with HTML5 and CSS3
CSS Selectors: element, class, id
CSS Layout Tutorial
Visualizing The Code
HTML Lesson 5
Links and Navigation
Ad

Similar to HTML & CSS Basics (20)

ODP
Introduction to css & its attributes with syntax
PPTX
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
KEY
ID01 Week 3
PPT
Intro webtechstc
PDF
cascading style sheets ppt.sildeshower phone view
PPTX
PPT
Html 5 and CSS - Image Element
PPTX
INTRODUCTION CODING - THE HTML AND CSS.pptx
PPTX
Css basics
PPTX
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
PPTX
Introduction to CSS
PDF
cascadingstylesheets
PDF
cascadingstylesheets
PDF
Introdução a CSS
PPTX
Cascading Style Sheets
PDF
Web standards pragmatism - from validation to the real world / Web Developers...
PPTX
Web development Training in Ambala ! Batra Computer Centre
PPTX
PDF
Web app development_html_css_03
Introduction to css & its attributes with syntax
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
ID01 Week 3
Intro webtechstc
cascading style sheets ppt.sildeshower phone view
Html 5 and CSS - Image Element
INTRODUCTION CODING - THE HTML AND CSS.pptx
Css basics
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
Introduction to CSS
cascadingstylesheets
cascadingstylesheets
Introdução a CSS
Cascading Style Sheets
Web standards pragmatism - from validation to the real world / Web Developers...
Web development Training in Ambala ! Batra Computer Centre
Web app development_html_css_03
Ad

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Institutional Correction lecture only . . .
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Cell Types and Its function , kingdom of life
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Pharma ospi slides which help in ospi learning
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
VCE English Exam - Section C Student Revision Booklet
GDM (1) (1).pptx small presentation for students
Renaissance Architecture: A Journey from Faith to Humanism
Institutional Correction lecture only . . .
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
human mycosis Human fungal infections are called human mycosis..pptx
Sports Quiz easy sports quiz sports quiz
Cell Types and Its function , kingdom of life
Computing-Curriculum for Schools in Ghana
Pharma ospi slides which help in ospi learning
102 student loan defaulters named and shamed – Is someone you know on the list?
2.FourierTransform-ShortQuestionswithAnswers.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
STATICS OF THE RIGID BODIES Hibbelers.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Supply Chain Operations Speaking Notes -ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Complications of Minimal Access Surgery at WLH
Chapter 2 Heredity, Prenatal Development, and Birth.pdf

HTML & CSS Basics

  • 1. html & css the basics
  • 2. tag content <h1>My heading</h1> closing tag tags are for describing content.
  • 3. what's content? tex t ag es im videos {all the above.
  • 4. more tag examples <h2>My subheading</h2> <a href=”http://google.com”>Google</a> { attribute
  • 5. <img src=”photo.jpg”></img> where's the content? sometimes, the attributes are enough to describe tag – hence, no content. tags without content, can be written in a shortened way, like so: <img src=”photo.jpg” />
  • 6. a bunch of tags together is called an HTML document.
  • 7. checkout some popular website's HTML code. chrome & firefox right click anywhere on the page, and click “View Source” or “View Page Source”.
  • 8. whoa. you probably just saw a bunch of stuff you've never seen before. for example, on Google or YouTube you might have seen some function() { doSomething(); uglyParentheses(); JavaScript } p { font-family:Helvetica; } CSS
  • 9. without CSS: what's CSS? <center><p>My centered paragraph.</p></center> with CSS: html css p { <p>My centered paragraph</p> align: center; }
  • 10. CSS is just a way of separating style content font text color images image border videos alignment (left, center, right) links
  • 11. using CSS do stuff with all p (paragraph) tags set font to arial change the p { color: white; color to white font-family: Arial; font-size: 12px; } set font size to 12 color, font-family, and font-size are properties. white, arial, and 12px are values.
  • 12. say I wanted to... change all heading level 1 (h1) tags to the color black change all link (a) tags to the color blue change all image (img) tags to the color blue give me the CSS.