Live data from Hacker News

Ask HN: Best way to learn HTML and CSS for web design?

news.ycombinator.com

51–60 of 68 posts

Re: Ask HN: Best way to learn HTML and CSS for web design?

#51
I would just like to point out that people tend to take the most practical approach possible when learning HTML and CSS. So they learn JQuery, Bootstrap, Wordpress, Rails, etc. because it's the fastest way to get things done.

It is my opinion that this leaves a large gap in ones education, and so supplemental / lower-leveled resources should be sought out if one wants to have an "expert-level" understanding of HTML and CSS.

Re: Ask HN: Best way to learn HTML and CSS for web design?

#52
One year ago I was working as a frontend engineer and although my JS skills were good, my CSS skills were pitiful. Over the course of the year, I sat down and implemented most of material design. Now I can take a look at basically any mockup and wire it up.

I found it very helpful to look at how other people implemented certain components.

Re: Ask HN: Best way to learn HTML and CSS for web design?

#53
post #25

While not a perfect site, http://www.w3schools.com/ is my to-go place whenever I need check something. Its content might not be all fully correct, but strangely it gets to the point very efficiently for me.

I've found w3schools very useful when I forget fundamental little HTML and Javascript things.

Re: Ask HN: Best way to learn HTML and CSS for web design?

#55
Mid-level web student here.

I've read several HTML/CSS books and gone through half a dozen courses. I'm comfortable with your basic HTML/CSS page, have a basic handle on Javascript (assuming I'm not doing anything more complicated than using getElementById to change some attributes on a click), and I can use jQuery/Bootstrap when I need to.

Right now the biggest hump for me is figuring out how to make mobile-friendly sites WITHOUT resorting to a framework. I feel like the vast majority of books or e-courses right now will go the following route:

1) Teach basic HTML/CSS for barebones basic and legacy pages

2) Introduce HTML5 syntax

3) Briefly show how to do a "pure" mobile-friendly page using viewports, flexbox, and media queries.

4) Spend fifteen minutes on the above, and then say, "But that's too much work. So now we're gonna use Bootstrap and never do Step #3 again!"

That above has happened consistently, and it disappoints me. I can do Bootstrap, but frankly I hate writing it. I feel like I have to go five or six div's in deep before I'm actually writing any text that's going to be visible to the end-user.

I'd really like to find more resources on making a mobile-friendly webpage that doesn't rely on Javascript to resize itself. In particular, I've got a few webpages that I built as past projects or coding exercises that I otherwise think look fine, and I'd like to figure out how to easily retro-fit them so that, say, the images don't stretch more than 100% of the screen width without having to rewrite the entire page using jQuery.

Anyone have any suggested resources for building mobile-friendly pure HTML/CSS sites?

Re: Ask HN: Best way to learn HTML and CSS for web design?

#56
I graduated graphic design in 2009, I worked from 2009-2011 building Joomla and WordPress websites for companies, then went freelance and I’ve been doing responsive front-end web stuff for about five years now. Here’s how I got from where you’re at to where I am now.

The web is built using three technologies: HTML, CSS, and JavaScript. Literally every other technology that gets used with the web has to interface to one or more of these three, so focus your learning on the foundational technologies. If you try to learn React and Bootstrap and Flux and Grunt and Parse and Node and SASS and everything else you’ll get worn out just trying to get started. By learning the foundational technologies you can quickly adopt any tool you truly need to use, but you could never keep up with all the tools available out there.

Here are some simple rules and attitude changes I adopted in my own discipline that resulted in rapid learning in CSS, then HTML, then JavaScript:

- when building new projects, don’t automatically include bootstrap, or other libraries. Only include what you need AS you need it

- don’t look at other people’s code before trying to write your own solution first, this helps you clarify your needs!

- when you do look at other people’s code, NEVER copy/paste it, read and earn and rewrite what you need

- only ever copy/paste code you have personally written in the past

- don’t be afraid to rewrite code at any time

- code is expendable, and the more code you write the better you will write code

- avoid preprocessors and compilers, they create extra work

- anything that can be built depending on a library can be built more efficiently without it

HTML Questions for Learning:

- can I still do it without that containing as a wrapper?

- is there any HTML like trying to solve CSS problems using markup?

- how could this be rewritten without using any classes at all?

- what’s the fewest amount of tags I would need to mark up this design from scratch?

- what’s the most relevant or correct HTML5 tag for this ([and there are a lot of them!) https://developer.mozilla.org/en/docs/Web/HTML/Element

CSS Questions for Learning:

- how could I write this CSS without using any classes at all?

- if I remove this line, does anything break?

- what styles can this element inherit from other CSS rules?

JS Questions for Learning:

- if jQuery does this, what regular JavaScript does jQuery use internally to do this?

- if jQuery didn't exist, what would the solution designed to meet my needs look like?

And in addition to that, all I can say is that the more you do it the better you will get! Create some basic templates and get used to creating throwaway HTML pages to test one thing, or check something. Don’t get invested in and finesse and polish every project or page you build or you’ll have a very shallow level of skill and spend too much time on too few pieces.

One good habit would be to start pushing code to Github. You can view the traffic there, so if people are viewing and using your code you can be motivated by that.

Also, CodePen is like a social front-end coding playground. I would highly recommend you check that out and get the habit of testing and trying things out in the open.

The other last thing I will say is this: simplify! in 2013 my idea of a barebones HTML page was a whole site template like this: https://github.com/tomhodgins/5keleton

By 2015 I had it pared down to this: https://gist.github.com/tomhodgins/c09dd6f9485d77d14e55

But that was still so heavy it was slowing down my learning. Now when I want to test something here’s the HTML snippet I pop into a new text file:

    
    
    
      
      
      
    
    
      
    
    
Only when you distill it down to the basics can you do it at the scale you need to really experiment and learn.

Resources:

- Mozilla Developer Network for CSS: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference, and JavaScript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Reference

- HTML5 Specification for HTML reference: https://www.w3.org/TR/html5

- You Might Not Need jQuery for learning JS: http://youmightnotneedjquery.com

- Ditching jQuery for learning JavaScript basics: http://gomakethings.com/ditching-jquery

Re: Ask HN: Best way to learn HTML and CSS for web design?

#57
post #32

I run a group with almost 600 JavaScript learners. With this many people, we've been through the vast majority of self-study resources. My goto recommendation for learning HTML, CSS, & JavaScript is http://www.freecodecamp.com/ This has consistently had the best results for our learners! It (a) assumes no knowledge coming in, (b) provides a linear progression from no knowledge to a portfolio of web applications, (c)…

Just want to point out that http://flexboxfroggy.com doesn't work properly on Safari Version 8.0.8 (10600.8.9)(Mac OS) On a side note, is it okay just to know Flexbox, or would a requirement be that you can manage without? Without ready made grid classes as well?

I'd definitely recommend learning the traditional css (i.e. not flexbox) because that is what most existing sites are written in and most front-end developers know, so you're likely to need it.

Re: Ask HN: Best way to learn HTML and CSS for web design?

#58

Mid-level web student here. I've read several HTML/CSS books and gone through half a dozen courses. I'm comfortable with your basic HTML/CSS page, have a basic handle on Javascript (assuming I'm not doing anything more complicated than using getElementById to change some attributes on a click), and I can use jQuery/Bootstrap when I need to. Right now the biggest hump for me is figuring out how to make mobile-friendly…

The only thing you really need to know is how to use media queries.

https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queri...

http://www.w3schools.com/css/css_rwd_mediaqueries.asp

Re: Ask HN: Best way to learn HTML and CSS for web design?

#59
post #26
post #25

While not a perfect site, http://www.w3schools.com/ is my to-go place whenever I need check something. Its content might not be all fully correct, but strangely it gets to the point very efficiently for me.

Please try to support free and open resources like MDN ( https://developer.mozilla.org/en-US/ ) and http://www.webplatform.org instead of w3schools

I like to use both. Sometimes MDN gives an excellent technical description of something, but W3Schools tends to give a bit more examples, and lets me play with the code.

Once I know how it works, I can look at the technical description and fill in any gaps that W3S had.

Re: Ask HN: Best way to learn HTML and CSS for web design?

#60

Mid-level web student here. I've read several HTML/CSS books and gone through half a dozen courses. I'm comfortable with your basic HTML/CSS page, have a basic handle on Javascript (assuming I'm not doing anything more complicated than using getElementById to change some attributes on a click), and I can use jQuery/Bootstrap when I need to. Right now the biggest hump for me is figuring out how to make mobile-friendly…

Some tips.

Keep your layouts flexible: * Avoid specifying widths and especially heights of individual elements unless really necessary. Allow the content to determine dimensions. * Set percentage based widths on overall containers (columns / grids). Allow these to constrain the dimensions of elements within. (Simplify your page structure as much as possible and don't overuse these.) * Use max-width to prevent elements from exceeding the dimensions of their containers: img {max-width: 100%;}

Post reply on HN