Advice on keeping my HTML and CSS code cleaner

Hello there great folks,

I am working with HTML5 and CSS3 now fulltime since 3 years. I would really appreciate it, if somebody can give me some positive critique. Why? Because i want to improof my front-end skills. May i ask you guys, to review my code HTML5 and CSS3 and get your toughts…

Why am i asking, because i really have the feeling that i can do it even with LESS code, shorter, better… and don’t want to repeat my self and keep code cleaner.

  • What is the best way to use custom fonts, and not USE font-family all the time for each section?
  • What is the best and cleanest way not to repeat my self with H1H2,H3, and default tags?
  • What NOT to do in CSS3 and HTML?

My latest project is a great example for review.

http://sandbox.shokuninserver.com/~shefilm/orangeworx/

Thanks all in advance!

Have a nice evening.

Kind regards,
Nino

If you want the font-family to apply to all of your H2s, for example, you don’t have to specify this for every section. This will do the job:

h2 {
  font-family: "Vaud-Regular", sans-serif;
}

What is the best and cleanest way not to repeat my self with H1H2,H3, and default tags?

Not quite sure if you mean what I was referring to above, but anyhow, be careful about usig headings like this:

<h2>Text</h2>
<h3>More text</h3>

That H3 text probably isn’t h3 content. It’s more of a paragraph, or even just a div of text.

Hah, a very open question—too general to answer here without writing a whole book. :stuck_out_tongue:

For CSS: SASS/LESS helps keep things DRY not to mention variables/loops/mixins…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.