SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Some Frequent Mistakes made with html and css Bazlur Rashid Tasawr Interactive 9th March 2010
Issues to be discussed -Not initializing  the tags -By-passing writing css with html -Ignoring Relevant Tags -Not Concentrating on reducing the number of tags -Using inline styling -Writing Identical Styles Separately -Not declaring generic font family.  -Not using semantic class names -Using px for font size -Not Using  alter tags for images
Not initializing  the tags * {      margin: 0;    padding: 0; } a { color: #f00; text-decoration: none} a: hover { color: #0f0; text-decoration: underline} We can also apply various style to other tags like headers, label, textareaand other input types
By-passing writing css with html When need to leave a gap to the top of a box easy to write <div>&nbsp;</div> or <br /> than writing “margin-top” in the css file
Ignoring Relevant Tags Make a div like heading rather using the tags h1, h2 ….  Making a div like label, p, span rather using those tags Making a div like label, p, span rather using those tags
Not Concentrating on reducing the number of tags
Using inline styling The ability to add style to a tag by using the style=”" attribute can be handy, but it also sort of defeats the whole purpose of using CSS
Writing Identical Styles Separately It's common to see a style applied to many different elements, even though the style is the same. Leave the style off each separate element and style them all in one go later on, like this: h1, p, #footer, .intro {  font-family:Arial,Helvetica,sans-serif; }
Not declaring generic font family.  Often we just write  font-family: ‘Myriad Pro’;  instead of  font-family: ‘Myriad Pro’, ‘Tahoma’ ,’Arial’;
Not using semantic class names Again going back to being able to easily change  the style of a site using CSS, keep in mind that  your site will likely change when naming your  tag classes. Using the class name “bigyellowbox”  might seem like a good idea now, but in a couple  of years will it still make sense when you change  the colour to blue?
Using px for font size Deprives IE to change the font-size: 1em is equal to the current font size. The default  text size in browsers is 16px. Set font-size to  62.5% in body style if the default font-size to be  set is 12px.  So, the default size of 1em is 12px.
Not Using  alter tags for images  Happy to leave like  <imgsrc="images/logo.jpg" width="23" height="13" border="0" alt="" /> <imgsrc="images/user.jpg" width="23" height="13" border="0" alt=“tasawr" />
                          Questions ?

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to css
Introduction to cssIntroduction to css
Introduction to csseShikshak
 
Intro to css & sass
Intro to css & sassIntro to css & sass
Intro to css & sassSean Wolfe
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursYannKlein2
 
CSS For Backend Developers
CSS For Backend DevelopersCSS For Backend Developers
CSS For Backend Developers10Clouds
 
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)Tom Hapgood
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)Harshita Yadav
 
Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1Jesus Obenita Jr.
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksAndolasoft Inc
 

Was ist angesagt? (18)

Html css
Html cssHtml css
Html css
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Intro to SASS CSS
Intro to SASS CSSIntro to SASS CSS
Intro to SASS CSS
 
Intro to css & sass
Intro to css & sassIntro to css & sass
Intro to css & sass
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hours
 
CSS
CSSCSS
CSS
 
CSS For Backend Developers
CSS For Backend DevelopersCSS For Backend Developers
CSS For Backend Developers
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
PHP - Introduction to PHP CSS
PHP -  Introduction to PHP CSSPHP -  Introduction to PHP CSS
PHP - Introduction to PHP CSS
 
Html & CSS
Html & CSSHtml & CSS
Html & CSS
 
Rakshat bhati
Rakshat bhatiRakshat bhati
Rakshat bhati
 
Css introduction
Css   introductionCss   introduction
Css introduction
 
Html and css
Html and cssHtml and css
Html and css
 
Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1
 
Css intro
Css introCss intro
Css intro
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
 

Andere mochten auch

Eco-friendly Folktale 1
Eco-friendly Folktale 1Eco-friendly Folktale 1
Eco-friendly Folktale 1skhill
 
Map Of Authentic Learning
Map Of Authentic LearningMap Of Authentic Learning
Map Of Authentic Learningskhill
 
S U R V I V I N G F I S H F R I E N D S
S U R V I V I N G  F I S H  F R I E N D SS U R V I V I N G  F I S H  F R I E N D S
S U R V I V I N G F I S H F R I E N D Sskhill
 

Andere mochten auch (6)

Eco-friendly Folktale 1
Eco-friendly Folktale 1Eco-friendly Folktale 1
Eco-friendly Folktale 1
 
Localization in Rails
Localization in RailsLocalization in Rails
Localization in Rails
 
Map Of Authentic Learning
Map Of Authentic LearningMap Of Authentic Learning
Map Of Authentic Learning
 
Magento Exclusive
Magento ExclusiveMagento Exclusive
Magento Exclusive
 
aa
aaaa
aa
 
S U R V I V I N G F I S H F R I E N D S
S U R V I V I N G  F I S H  F R I E N D SS U R V I V I N G  F I S H  F R I E N D S
S U R V I V I N G F I S H F R I E N D S
 

Ähnlich wie Html Css Mistakes (20)

Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common MistakesBasics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
CSS Basic and Common Errors
CSS Basic and Common ErrorsCSS Basic and Common Errors
CSS Basic and Common Errors
 
css-tutorial
css-tutorialcss-tutorial
css-tutorial
 
css-tutorial
css-tutorialcss-tutorial
css-tutorial
 
20130909_GODEL Style Guide Guide
20130909_GODEL Style Guide Guide20130909_GODEL Style Guide Guide
20130909_GODEL Style Guide Guide
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Sacramento web design
Sacramento web designSacramento web design
Sacramento web design
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for css
 
HTML Bootcamp
HTML BootcampHTML Bootcamp
HTML Bootcamp
 
Css 2010
Css 2010Css 2010
Css 2010
 
Css 2010
Css 2010Css 2010
Css 2010
 
CSS
CSSCSS
CSS
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Creative Guidelines
Creative GuidelinesCreative Guidelines
Creative Guidelines
 
Css
CssCss
Css
 
CSS
CSSCSS
CSS
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Btk creative-web-03
Btk creative-web-03Btk creative-web-03
Btk creative-web-03
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
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...DianaGray10
 
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, ...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
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 TerraformAndrey Devyatkin
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
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, Adobeapidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Kürzlich hochgeladen (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 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...
 
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, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Html Css Mistakes

  • 1. Some Frequent Mistakes made with html and css Bazlur Rashid Tasawr Interactive 9th March 2010
  • 2. Issues to be discussed -Not initializing the tags -By-passing writing css with html -Ignoring Relevant Tags -Not Concentrating on reducing the number of tags -Using inline styling -Writing Identical Styles Separately -Not declaring generic font family. -Not using semantic class names -Using px for font size -Not Using alter tags for images
  • 3. Not initializing the tags * { margin: 0; padding: 0; } a { color: #f00; text-decoration: none} a: hover { color: #0f0; text-decoration: underline} We can also apply various style to other tags like headers, label, textareaand other input types
  • 4. By-passing writing css with html When need to leave a gap to the top of a box easy to write <div>&nbsp;</div> or <br /> than writing “margin-top” in the css file
  • 5. Ignoring Relevant Tags Make a div like heading rather using the tags h1, h2 …. Making a div like label, p, span rather using those tags Making a div like label, p, span rather using those tags
  • 6. Not Concentrating on reducing the number of tags
  • 7. Using inline styling The ability to add style to a tag by using the style=”" attribute can be handy, but it also sort of defeats the whole purpose of using CSS
  • 8. Writing Identical Styles Separately It's common to see a style applied to many different elements, even though the style is the same. Leave the style off each separate element and style them all in one go later on, like this: h1, p, #footer, .intro {  font-family:Arial,Helvetica,sans-serif; }
  • 9. Not declaring generic font family. Often we just write font-family: ‘Myriad Pro’; instead of font-family: ‘Myriad Pro’, ‘Tahoma’ ,’Arial’;
  • 10. Not using semantic class names Again going back to being able to easily change the style of a site using CSS, keep in mind that your site will likely change when naming your tag classes. Using the class name “bigyellowbox” might seem like a good idea now, but in a couple of years will it still make sense when you change the colour to blue?
  • 11. Using px for font size Deprives IE to change the font-size: 1em is equal to the current font size. The default text size in browsers is 16px. Set font-size to 62.5% in body style if the default font-size to be set is 12px. So, the default size of 1em is 12px.
  • 12. Not Using alter tags for images Happy to leave like <imgsrc="images/logo.jpg" width="23" height="13" border="0" alt="" /> <imgsrc="images/user.jpg" width="23" height="13" border="0" alt=“tasawr" />
  • 13. Questions ?