*

Dear visitor! Welcome to Bad HTML. With this website we want to teach you the best web design practices to avoid Bad HTML. Find here everything you need to know to build the most user-friendly website ever!
Today is 2024 October 14, Monday
Subscribe To Our Daily Newsletter:
captcha
Play Music:
×
Raising Awareness For Bad HTML Practices
like social
facebook counter

Bad CSS Practices To Avoid

Use CSS Reset

Always use normalize.css or the Bootstrap CSS before your custom styles to reset the code to avoid browser inconsistencies defining all default styles.

Group The Elements From Top To Bottom

Try to build your stylesheet grouping page sections, beginning with body styles, and going on with header, nav, article and footer. Always group ids and classes that fall under the same element and use comments/annotations to identify a set of code. It's recommended to name your elements properly based on their use instead of their properties such as what color or font type the element has.

		/***** General *****/
		html {...}
		body {...}
		h1, h2, h3 {..}
		p {...}
		a {...}
		a:hover {...}

		/***** Header *****/
		#header {...}

		/***** Navigation *****/
		#nav {...}

		/****** Footer *****/
		#footer {...}
		

Useful Tips 

Use hex codes instead of color names.

Use browser prefixes for experimental or nonstandard CSS properties:

  • -webkit- Chrome, newer versions of Opera.)
  • -moz- (Firefox)
  • -o- (Old versions of Opera)
  • -ms- (Internet Explorer)

Validate your CSS to make sure you didn't commit one of the crimes listed above.

not supported

Install Ruwix 2024 to play plugin

not found
unfinished sidebar
Please check back later!
© 1992 - 2024 WWWEEEBBB | About | Contact | Terms & Conditions | This website is using cookies to spy on the visitors secrets and personal life.
Switch Design
Switch Design