Can't get template of photo gallery at w3schools.com to work

I’m just starting out. I have the book How to Build Your Website the Right Way under my belt and that’s about it. I’ve been getting pretty good information off of www.w3school.com, so that’s where I went for photo gallery help. I found http://www.w3schools.com/CSS/css_image_gallery.asp and like the way it’s set up. Simple right? just copy and paste the code/markup, whatever the technical term is, into website page and play around with it. I can’t get it to look like it’s “supposed to” look. Any suggestions? Am I going about it the wrong way by using w3schools? I’ve tried both Safari and Firefox and get the same result. The pictures end up going straight down the page with no formatting of the text at all. The link works and that’s about it.

Any insights?
Thx
Becky

Got it, only took 8 hrs this time. Continually putting tools in my belt!