For me, and I think the majority, memory is where you keep what your brain thinks that it will use again. If your job is to make and fix/tweak the style of a web page, and you do it practically everyday, you probably can make a pretty decent css file without even looking away from the editor. But if you then need to make a basic html page, you will probably search. If you use an ide with autocompletion, you probably…
There's some pedagogical theory around this. (I learned this through the FAA's instructor training.) Sort of common sense stuff, but it's helpful for structuring learning. Basically you'll remember things that you use a lot, have used recently, experienced intensely (e.g. actually used rather than just read about), and had fun learning. In addition, the first way you learn to do something tends to stick.