SlideShare uma empresa Scribd logo
1 de 23
(Fast) Introduction to HTML & CSS Dave Kelly ( @davkell  ) for @091Labs
What are HTML & CSS? HTML structures documents on the web Tells browser what content is (not what it means) CSS = presentation (how things look) JavaScript adds interaction / behaviours Peanut lifted from http://www.alistapart.com/articles/understandingprogressiveenhancement/ Why separate? http://www.ambientage.com/blog/091labs : 1
Standards....  define the mark-up you use  tell the browser what to do with it HTML 4.01 (Don’t use) xHTML1.0 Frameset  (nope) Transitional  (nope) Strict	* HTML5 (New. Not fully supported / implemented. It’s the future.) All those defined standards....do all browsers work the same?
Tools Firefox (wide support for standards) Firebug (Firefox add-on, Chrome also, but weak). Your best friend with front-end web dev. Web Developer Toolbar (Firefox add-on) Validators HTML: http://validator.w3.org CSS: http://jigsaw.w3.org Development environment Netbeans / Aptana for me.... Your choice (not WYSIWYG!!) (My) Development process Firefox -> Webkit (chrome / safari) -> IE8 -> IE7 -> (IE6?) Browsershots.org http://www.ambientage.com/blog/091labs : 2
HTML Made up of “tags”  (elements) <h1>I’m an important heading</h1> (Heading level 1)   <img src=”images/myprofilepic.jpg” alt=”It’s a picture of me!!” /> (Image tag) Elements can contain plain text, other elements, or both No state / no logic (Mark-up content only, not programming) xHTML Strict elements... must be properly nested must be closed must be lower case attributes must have a value
HTML Tags Tags are usually paired (e.g..., <h1> and </h1>)  Some elements are “self-closing” e.g. <br /> <img … /> Some elements may include attributes, (additional information that is included inside the start tag). Every HTML document contains standard tags.  Each document consists of a head and body  The head contains the title (and more…), and  The body contains the actual text that is made up of paragraphs, lists, images, and other elements
Simple HTML Example http://www.ambientage.com/blog/091labs : 3
Some HTML tag examples ,[object Object]
 <h1></h1>  , <h2> </h2> ……  <h6> </h6>
Paragraph: <p>Some text </p>
Lists
 Ordered List <ol> <li>I’m a list item</li></ol>
 Unordered list <ul>  <li>I’m a list item</li> </ul>
Document Section <div></div>   (Important for page layouts!)
Image <img src=“../images/mypic.jpg” alt=“My Picture” title=“It’s me!” />
Links <a href=“http://www.google.com”>Google</a>
Table  <table><tr><td>table cell</td></tr>                          <tr><td>second row cell</td></tr>              </table> http://www.ambientage.com/blog/091labs : 4 & 5
Some HTML attribute examples ,[object Object]
Most can have:<h1 id=“mainHeading” class=“myHeadingClass” title=“Website title” style=“color: #000000;”>My Heading</h1>
HTML Forms Forms are used to accept information from the Web page user Forms can use text boxes, password boxes, check boxes, radio buttons, text areas, drop-down lists, hidden fields, as well as Submit and Clear buttons. To create a form, the <form></form> element is used. Forms have 2 basic attributes: action & method, e.g.,  <form name=“myForm” action=“processPage.php” method=“post”> action = “where’s the data going?” method = “how’s it getting there? (post vs get)”
HTML Forms
HTML Forms
CSS (Cascading Style Sheets) ,[object Object]

Mais conteúdo relacionado

Mais procurados

1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
apnwebdev
 

Mais procurados (20)

Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
 
CSS
CSSCSS
CSS
 
Html
HtmlHtml
Html
 
Advanced Cascading Style Sheets
Advanced Cascading Style SheetsAdvanced Cascading Style Sheets
Advanced Cascading Style Sheets
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
css.ppt
css.pptcss.ppt
css.ppt
 
Css
CssCss
Css
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Html and css presentation
Html and css presentationHtml and css presentation
Html and css presentation
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Css3
Css3Css3
Css3
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
HTML CSS JS in Nut shell
HTML  CSS JS in Nut shellHTML  CSS JS in Nut shell
HTML CSS JS in Nut shell
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 

Destaque

Destaque (11)

HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Html5 i css3
Html5 i css3Html5 i css3
Html5 i css3
 
HTML with a little CSS
HTML with a little CSS HTML with a little CSS
HTML with a little CSS
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1Front-end development introduction (HTML, CSS). Part 1
Front-end development introduction (HTML, CSS). Part 1
 
HTML5 & CSS3
HTML5 & CSS3 HTML5 & CSS3
HTML5 & CSS3
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
 

Semelhante a (Fast) Introduction to HTML & CSS

Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Marc Steel
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML Basics
Shawn Calvert
 

Semelhante a (Fast) Introduction to HTML & CSS (20)

Mdst 3559-02-01-html
Mdst 3559-02-01-htmlMdst 3559-02-01-html
Mdst 3559-02-01-html
 
CSS Part I
CSS Part ICSS Part I
CSS Part I
 
Css 2010
Css 2010Css 2010
Css 2010
 
Css 2010
Css 2010Css 2010
Css 2010
 
Web Designing
Web DesigningWeb Designing
Web Designing
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
 
Session ii(html)
Session ii(html)Session ii(html)
Session ii(html)
 
Week 2-intro-html
Week 2-intro-htmlWeek 2-intro-html
Week 2-intro-html
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Before start
Before startBefore start
Before start
 
Html & Html5 from scratch
Html & Html5 from scratchHtml & Html5 from scratch
Html & Html5 from scratch
 
Class Intro / HTML Basics
Class Intro / HTML BasicsClass Intro / HTML Basics
Class Intro / HTML Basics
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
Week3 css
Week3 cssWeek3 css
Week3 css
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
Presentation html
Presentation   htmlPresentation   html
Presentation html
 
Empowerment Technologies Lecture 10 (Philippines SHS)
Empowerment Technologies Lecture 10 (Philippines SHS)Empowerment Technologies Lecture 10 (Philippines SHS)
Empowerment Technologies Lecture 10 (Philippines SHS)
 
Html
HtmlHtml
Html
 

Último

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

(Fast) Introduction to HTML & CSS

  • 1. (Fast) Introduction to HTML & CSS Dave Kelly ( @davkell ) for @091Labs
  • 2. What are HTML & CSS? HTML structures documents on the web Tells browser what content is (not what it means) CSS = presentation (how things look) JavaScript adds interaction / behaviours Peanut lifted from http://www.alistapart.com/articles/understandingprogressiveenhancement/ Why separate? http://www.ambientage.com/blog/091labs : 1
  • 3. Standards.... define the mark-up you use tell the browser what to do with it HTML 4.01 (Don’t use) xHTML1.0 Frameset (nope) Transitional (nope) Strict * HTML5 (New. Not fully supported / implemented. It’s the future.) All those defined standards....do all browsers work the same?
  • 4. Tools Firefox (wide support for standards) Firebug (Firefox add-on, Chrome also, but weak). Your best friend with front-end web dev. Web Developer Toolbar (Firefox add-on) Validators HTML: http://validator.w3.org CSS: http://jigsaw.w3.org Development environment Netbeans / Aptana for me.... Your choice (not WYSIWYG!!) (My) Development process Firefox -> Webkit (chrome / safari) -> IE8 -> IE7 -> (IE6?) Browsershots.org http://www.ambientage.com/blog/091labs : 2
  • 5. HTML Made up of “tags”  (elements) <h1>I’m an important heading</h1> (Heading level 1)   <img src=”images/myprofilepic.jpg” alt=”It’s a picture of me!!” /> (Image tag) Elements can contain plain text, other elements, or both No state / no logic (Mark-up content only, not programming) xHTML Strict elements... must be properly nested must be closed must be lower case attributes must have a value
  • 6. HTML Tags Tags are usually paired (e.g..., <h1> and </h1>) Some elements are “self-closing” e.g. <br /> <img … /> Some elements may include attributes, (additional information that is included inside the start tag). Every HTML document contains standard tags. Each document consists of a head and body The head contains the title (and more…), and The body contains the actual text that is made up of paragraphs, lists, images, and other elements
  • 7. Simple HTML Example http://www.ambientage.com/blog/091labs : 3
  • 8.
  • 9. <h1></h1> , <h2> </h2> …… <h6> </h6>
  • 11. Lists
  • 12. Ordered List <ol> <li>I’m a list item</li></ol>
  • 13. Unordered list <ul> <li>I’m a list item</li> </ul>
  • 14. Document Section <div></div> (Important for page layouts!)
  • 15. Image <img src=“../images/mypic.jpg” alt=“My Picture” title=“It’s me!” />
  • 17. Table <table><tr><td>table cell</td></tr> <tr><td>second row cell</td></tr> </table> http://www.ambientage.com/blog/091labs : 4 & 5
  • 18.
  • 19. Most can have:<h1 id=“mainHeading” class=“myHeadingClass” title=“Website title” style=“color: #000000;”>My Heading</h1>
  • 20. HTML Forms Forms are used to accept information from the Web page user Forms can use text boxes, password boxes, check boxes, radio buttons, text areas, drop-down lists, hidden fields, as well as Submit and Clear buttons. To create a form, the <form></form> element is used. Forms have 2 basic attributes: action & method, e.g., <form name=“myForm” action=“processPage.php” method=“post”> action = “where’s the data going?” method = “how’s it getting there? (post vs get)”
  • 23.
  • 24. It allows document authors to specify the look of a web page (e.g. fonts, spacing, margins,etc.) separately from the structure of the web page (e.g. body, text, links, etc.)
  • 25.
  • 26.
  • 27. The Selector ~ tells the rule what elements it should apply to
  • 28. The Rule ~ does the formatting of the element
  • 29. Made up of a property:value pair
  • 30. The formatting of rules: Selector { property1: value1; property2: value2; propertyN: valueN; } http://www.ambientage.com/blog/091labs : 6
  • 31.
  • 32. p { color: #000000; }
  • 33. Doing this causes all the tags of that name (i.e.<p>) to be formatted according to the style rule declared.
  • 34. Possible to do this for multiple elements
  • 35.
  • 36. If the page you’re working with has 2 colours in its background, you need to put light text on the dark background, and dark text on the light background
  • 37. Classes are defined using a dot (.) and a given name, e.g.
  • 39. To use the class in the document:
  • 40.
  • 41. If you need an element on a page presented in a particular way, you can use an Identifier (remember an element’s id attribute is unique to a page)
  • 42. Identifiers are defined using a hash (#) and a given name, e.g.
  • 43. #siteTitle{ font-family: ‘Times New Roman’, serif}
  • 44. To use the class in the document:
  • 45.
  • 46. Internal Style Rules …only apply to the current page… still slightly nightmarish to maintain
  • 47.
  • 48. customise & alter the look of multiple web pages
  • 49. ensure continuity of design throughout the website
  • 50. To link an external style sheet to a HTML page use the <link> tag in the <head> section of the document, e.g.http://www.ambientage.com/blog/091labs : 7
  • 51.