SlideShare uma empresa Scribd logo
1 de 16
HTML for food pizza, please
      XHTML, CSS e técnicas SEO
É quase idêntico ao HTML 4
 A principal diferença é que o XHTML é
  definido como XML
 tags sempre em minúsculas

  Como já fazemos:
  <span></span>, <script></script>

  Mas também com self-closing:
  <br />, <hr />, <meta />, <img />
3 doctypes
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
   Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
   transitional.dtd">




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
Boas práticas
•   Manter semântica
•   <span> mania (span class=bold)
•   layout sem <table>, mas tabulares
•   <h1>,<h2>, <ul>...
•   Pra CSS, <link /> na <head>
•   <scripts> no fim, antes do </body>
•   <scripts> em CDNs
•   Poucas tags, menor DOM = SUCCESS
Jogo dos sete erros
<p><strong>Negrito</p></STRONG>
<ul>
 <li>Item
   <ol><li>Sub-item</ol>
</ul>
<strong><em>Alô Informant</em></strong>
  <TABLE width=100></table>
  <div><script></script></div>
<input disabled />
Jogo dos sete erros
<p><strong>Negrito</strong></p>
<ul>
 <li>Item
   <ol><li>Sub-item</li></ol>
</li></ul>
<strong><em>Alô Informant</em></strong>
  <table width="100"></table>
  <div><script></script></div>
<input disabled="disabled" />
CSS
•   Inline e/ou externo?
•   Separar em vários arquivos?
•   Minify (UI Performance, Ant)
•   Tableless ou divless (!)
    <table width="780" border="0" cellspacing="0" cellpadding="0">
     <tr bgcolor="#FF7F00">
      <td rowspan="2" width="138" align="center" valign="middle"><img
    src="http://web.archive.org/web/20011009083132im_/http://www.terra.com.br/capa/logoterra.gif" width="110"
    height="32" border="0" alt="Terra Networks"></td>
      <td width="320" align="RIGHT" valign="MIDDLE">
       <table border="0" cellspacing="0" cellpadding="0">
        <tr><td width="97" height="17" align="RIGHT">
    ...
CSS no id ou na class?
•   Tanto faz
•   E que tal nas tags?
       div.box { float:left; }
    <div class="box">...<div class="box">...
    div.boxes div { float:left; }
    <div>...<div>...<div>...
Boas práticas
•   tag#elementId
•   X.elementClass
•   Simplificação (background, font, border)
•   CSS reset
    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small,
    strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form,
    label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas,
    details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby,
    section, summary, time, mark, audio, video {
                margin: 0;
                padding: 0;
                border: 0;
                font-size: 100%;
                font: inherit;
                vertical-align: baseline;
    }
    /* HTML5 display-role reset for older browsers */
    article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
                display: block;
    }
    body {
                line-height: 1;
    }
HTML versus CSS
•   <strong> ou font-weight:bold
•   <em> ou font-style:italic
•   ...
CSS 3
•   Graceful degradation

CSS3 Generator:
• Box shadow
• Text shadow
• Border radius...

FontSquirrel:
• Gerador de fontes customizadas
SEO
•   Importância das tags
•   <meta> tags
•   Robots.txt
      User-agent: *
      Allow: /
      Disallow: /admin/
      Sitemap: http://www.informant.com.br/sitemap.xml



•   Webmaster Tools
•   Analytics
Sitemaps
•   Padrão em http://www.sitemaps.org

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <url>
      <loc>http://www.example.com/</loc>
      <lastmod>2005-01-01</lastmod>
      <changefreq>monthly</changefreq>
      <priority>0.8</priority>
   </url>
</urlset>
Estudando a interface
div.header   > div                             ul




                         div.console   div.welcome

                                                       div.getstarted



                                       div.container




             div                                             div
                                            div
                                       div.features




div.footer
                                            ul
Talk is cheap...

Mais conteúdo relacionado

Mais procurados

HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline FrameNisa Soomro
 
Introduction to Twitter Bootstrap 3.0.3
Introduction to Twitter Bootstrap 3.0.3Introduction to Twitter Bootstrap 3.0.3
Introduction to Twitter Bootstrap 3.0.3Liang-Hsuan Lin
 
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...Skilld
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3Lanh Le
 
Decoupling Your HTML, CSS & JavaScript
Decoupling Your HTML, CSS & JavaScriptDecoupling Your HTML, CSS & JavaScript
Decoupling Your HTML, CSS & JavaScriptTomislav Mesić
 
LESS CSS Pre-processor
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processorKannika Kong
 
Web Standards and Accessibility
Web Standards and AccessibilityWeb Standards and Accessibility
Web Standards and AccessibilityKarl Dawson
 
faster frontend development with textmate
faster frontend development with textmatefaster frontend development with textmate
faster frontend development with textmateMarc Tobias Kunisch
 
Haml
HamlHaml
Hamlgwmm
 

Mais procurados (20)

HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline Frame
 
Bootstrap Framework
Bootstrap Framework Bootstrap Framework
Bootstrap Framework
 
Html frames
Html framesHtml frames
Html frames
 
Introduction to Twitter Bootstrap 3.0.3
Introduction to Twitter Bootstrap 3.0.3Introduction to Twitter Bootstrap 3.0.3
Introduction to Twitter Bootstrap 3.0.3
 
LESS
LESSLESS
LESS
 
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
Build tons of multi-device JavaScript applications - Part 1 : Boilerplate, de...
 
02html Frames
02html Frames02html Frames
02html Frames
 
Html frames
Html framesHtml frames
Html frames
 
Ddpz2613 topic6 frame
Ddpz2613 topic6 frameDdpz2613 topic6 frame
Ddpz2613 topic6 frame
 
Landing Pages 101
Landing Pages 101Landing Pages 101
Landing Pages 101
 
Html frames
Html framesHtml frames
Html frames
 
Html Frames
Html FramesHtml Frames
Html Frames
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Decoupling Your HTML, CSS & JavaScript
Decoupling Your HTML, CSS & JavaScriptDecoupling Your HTML, CSS & JavaScript
Decoupling Your HTML, CSS & JavaScript
 
Css frameworks
Css frameworksCss frameworks
Css frameworks
 
LESS CSS Pre-processor
LESS CSS Pre-processorLESS CSS Pre-processor
LESS CSS Pre-processor
 
Web Standards and Accessibility
Web Standards and AccessibilityWeb Standards and Accessibility
Web Standards and Accessibility
 
faster frontend development with textmate
faster frontend development with textmatefaster frontend development with textmate
faster frontend development with textmate
 
Haml
HamlHaml
Haml
 

Semelhante a Html forfood

Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Brian Moon
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good PracticesHernan Mammana
 
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5Cengage Learning
 
Modern Web Development
Modern Web DevelopmentModern Web Development
Modern Web DevelopmentRobert Nyman
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)François Massart
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucksTim Wright
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptraghavanp4
 
Diazo: Bridging Designers and Programmers
Diazo: Bridging Designers and ProgrammersDiazo: Bridging Designers and Programmers
Diazo: Bridging Designers and ProgrammersTsungWei Hu
 
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892Deepak Sharma
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tipsChris Love
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewDiacode
 
Html&Browser
Html&BrowserHtml&Browser
Html&BrowserAlipay
 
Super stylesheets download_en
Super stylesheets download_enSuper stylesheets download_en
Super stylesheets download_enmbeatrizoliveira
 

Semelhante a Html forfood (20)

Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good Practices
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
html5
html5html5
html5
 
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
Course Tech 2013, Sasha Vodnik, A Crash Course in HTML5
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Modern Web Development
Modern Web DevelopmentModern Web Development
Modern Web Development
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.ppt
 
css.ppt
css.pptcss.ppt
css.ppt
 
css.ppt
css.pptcss.ppt
css.ppt
 
Diazo: Bridging Designers and Programmers
Diazo: Bridging Designers and ProgrammersDiazo: Bridging Designers and Programmers
Diazo: Bridging Designers and Programmers
 
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
Cssbestpracticesjstyleguidejandtips 150830184202-lva1-app6892
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tips
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
Html&Browser
Html&BrowserHtml&Browser
Html&Browser
 
MTDDC Tokyo 2011
MTDDC Tokyo 2011MTDDC Tokyo 2011
MTDDC Tokyo 2011
 
Super stylesheets download_en
Super stylesheets download_enSuper stylesheets download_en
Super stylesheets download_en
 

Último

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Último (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Html forfood

  • 1. HTML for food pizza, please XHTML, CSS e técnicas SEO
  • 2. É quase idêntico ao HTML 4  A principal diferença é que o XHTML é definido como XML  tags sempre em minúsculas Como já fazemos: <span></span>, <script></script> Mas também com self-closing: <br />, <hr />, <meta />, <img />
  • 3. 3 doctypes <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  • 4. Boas práticas • Manter semântica • <span> mania (span class=bold) • layout sem <table>, mas tabulares • <h1>,<h2>, <ul>... • Pra CSS, <link /> na <head> • <scripts> no fim, antes do </body> • <scripts> em CDNs • Poucas tags, menor DOM = SUCCESS
  • 5. Jogo dos sete erros <p><strong>Negrito</p></STRONG> <ul> <li>Item <ol><li>Sub-item</ol> </ul> <strong><em>Alô Informant</em></strong> <TABLE width=100></table> <div><script></script></div> <input disabled />
  • 6. Jogo dos sete erros <p><strong>Negrito</strong></p> <ul> <li>Item <ol><li>Sub-item</li></ol> </li></ul> <strong><em>Alô Informant</em></strong> <table width="100"></table> <div><script></script></div> <input disabled="disabled" />
  • 7. CSS • Inline e/ou externo? • Separar em vários arquivos? • Minify (UI Performance, Ant) • Tableless ou divless (!) <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#FF7F00"> <td rowspan="2" width="138" align="center" valign="middle"><img src="http://web.archive.org/web/20011009083132im_/http://www.terra.com.br/capa/logoterra.gif" width="110" height="32" border="0" alt="Terra Networks"></td> <td width="320" align="RIGHT" valign="MIDDLE"> <table border="0" cellspacing="0" cellpadding="0"> <tr><td width="97" height="17" align="RIGHT"> ...
  • 8. CSS no id ou na class? • Tanto faz • E que tal nas tags? div.box { float:left; } <div class="box">...<div class="box">... div.boxes div { float:left; } <div>...<div>...<div>...
  • 9. Boas práticas • tag#elementId • X.elementClass • Simplificação (background, font, border) • CSS reset html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; }
  • 10. HTML versus CSS • <strong> ou font-weight:bold • <em> ou font-style:italic • ...
  • 11. CSS 3 • Graceful degradation CSS3 Generator: • Box shadow • Text shadow • Border radius... FontSquirrel: • Gerador de fontes customizadas
  • 12. SEO • Importância das tags • <meta> tags • Robots.txt User-agent: * Allow: / Disallow: /admin/ Sitemap: http://www.informant.com.br/sitemap.xml • Webmaster Tools • Analytics
  • 13. Sitemaps • Padrão em http://www.sitemaps.org <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.example.com/</loc> <lastmod>2005-01-01</lastmod> <changefreq>monthly</changefreq> <priority>0.8</priority> </url> </urlset>
  • 15. div.header > div ul div.console div.welcome div.getstarted div.container div div div div.features div.footer ul