The Designer’s Guide to
Web Programming

Chapter 1

What’s a website?

To a designer, typography is everything. But unlike on other mediums, typography on the web is fluid because it has to adapt to a changing canvas — your screen size. This fluidity means that we can’t use traditional software to design a website. Instead, we have to use two programming languages: HTML and CSS.

Programming may seem scary, but web code is actually pretty simple. HTML and CSS basically just describe what should appear on your screen, and the most basic form of visual content is typography. So let’s jump right into coding and start making websites!

Chapter 2

The Box Model

On the Internet, everything is a box. Even though we have different HTML elements, each one is essentially a preset style for the same boxy element. And each boxy element shares the same CSS properties, which together form the “CSS box model.”

By learning how the box model works, you’ll have the power to move beyond typography and begin laying out your page graphically.

Chapter 3

Layout

Websites are vertical — as you add content, your page gets taller. That works great for basic articles, but what about non-vertical layouts? Help!

The need for more complicated web layouts arose, so CSS evolved to meet these needs. It became capable of changing depending on your screen size. On top of that, designers gained two brand new ways to lay out content: in two-dimensional grids, and a quirky little thing called flexbox.

Chapter 4

Interaction

Once you’re comfortable with HTML and CSS, you might find yourself asking a question: is this really all a website can do? Organize and present information?

Of course not! Websites are incredible not just because they give us information, but because they also make that information interactive. Unfortunately for us developers, that means we’re going to have to learn yet another language, namely JavaScript. Get ready for something a little different!

Chapter 5

Loops

JavaScript is pretty darn powerful. Not only can we use it to make websites interactive, we can use JavaScript to make things happen on their own! To leverage this kind of power, we need to learn about a fundamental concept of computer science: loops.

In this section, we’ll use loops to automate repetitive tasks and make full use of the web medium.

Chapter 5

Data

One way JavaScript is so different from HTML and CSS is that it can actually write HTML and CSS for you. Once you realize that, you might ask yourself: how much of my website can I code just using JavaScript? The answer is quite a lot, but it helps to have some data to pull from.

In this final chapter, we’ll look at how we can use JavaScript and data to create complex websites without having to write much HTML or CSS by hand.

Even though this is the last chapter, remember that there isn’t really a finish line to web programming. You can always run into a problem that requires learning a new skill. After this, you’ll at least have all the basics you need to solve those problems.