Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

What is the best way to plan a HTML/CSS website project?

Hey guys,

I'm wondering if anyone can reference a decent course/article that explains how to plan a basic HTML/CSS (or WordPress) website project?

I've done a few courses on HTML/CSS/WordPress and am reasonably comfortable with a fair few things, but I'm not sure about what the most effective method of putting them together and completing a project is.

Things that'd be handy:

  • Should I create ALL my HTML pages first with no styling and then look at CSS separetly?
  • Should I make a list/plan for all my CSS Classes/Selectors? or just write them all on the fly?
  • Should I code the entire website as mobile-first and only consider desktop afterward? or make sure that both are fine as I go the entire time?

I could probably make some assumptions and write a plan of my own, but I thought it'd be best to ask if there was a best-practice or widely accepted method for planning a project.

Thanks in advance :)

4 Answers

Craig Garrity
Craig Garrity
23,692 Points

Hi Gavin, I suppose there is no right or wrong answer but I can tell you how I go about my work, as I mainly use HTML, CSS and WordPress, hopefully it will help. After setting up my job folder etc, I usually create a variables/config partial (using SASS) and list out everything I need, fonts, paths to images etc, colour maps, widths and font sizes. Working in WordPress I will usually start with the main homepage / landing page and follow the usual template hierarchy by building out the header and footer, as more often than not these will be universal throughout the site.

I treat each part as its own module, markup first then apply styling. Then move onto the next module. I find breaking it down keeps things organised and your code cleaner and more reusable. With class names I try to keep it as descriptive as possible, but at times it can be challenging. Have you checked out Guil Hernandez CSS course here, Modular Sass? - really great course helped change my approach. You can learn about BEM that will really help you structure your markup and classes. Good luck man.

Thanks Craig!

I think that was one of the big questions that I was looking for - whether to build it all at once or language-by-language (roughly). I think I might start with something like:

1 - Draw a wireframe on pen/paper. Rough notes on layout, dimensions, classes. 2 - Create empty CSS Classes 3 - Create entire HTML (5-10 pages) 4 - Create CSS for Mobile 5 - Create CSS for Desktop

... I assume that'd be a decent starting point and then add any Javascript or integrate with WordPress after that?

Craig Garrity
Craig Garrity
23,692 Points

That sounds pretty good starting point Gavin, see how it goes. Sorry, I didn't touch on the mobile first or wireframe. I always wireframe, even if just a rough sketch and I always build mobile first and just add in styles for larger devices as you go. I personally haven't separated by doing all of the HTML, then all the CSS, but it's a personal thing (and probably project size dependent) you will know what works for yourself after a few builds with trial and error. I think you will find success as you seem to have it planned out logically...always good to have a plan! Good luck and sorry if I didn't really help your initial question! Be interested to see what you build and how it turned out.

nathaniel marquez
seal-mask
.a{fill-rule:evenodd;}techdegree
nathaniel marquez
Full Stack JavaScript Techdegree Student 2,145 Points

I am kind of wondering the same thing but also what is the best or most recommended and smallest screen resolution to start at when designing for mobile first.

I have read through like 20 different blogs and have gotten just as many different answers.

thanks in advance

I build all my sites with Foundation 6, pretty much saves having to make media queries yourself.

<div class="row> <div class="small-12 medium-6 large-4 columns" </div> </div>

easy game :')