Theory and Practice

Why You Should Learn HTML + CSS (and Maybe Some Javascript)

Are you a content creator for the Web? If you are then you need to learn HTML, CSS, and maybe some Javascript, too.

I have spent a significant amount of my career implementing Web sites and applications for clients. A decent amount of that time has involved implementing content management systems for businesses of all sizes. And one of the most common requests in such projects is setting up a WYSIWYG editor.

The request for a WYSIWYG editor usually stems from the desire to sheild “non-technical” users from the supposed complexities of creating Web markup while still providing them with the power to produce material that take advantage of the styling and visual design of the site. The assumption is that the content creator will not want to learn the HTML markup and CSS required to make there pages “look nice” but that they still want the flexibility and additional expressiveness of something more than plain text. In fact, a common corrollary request is to provide a “paste from Word” button. “After all”, the reasoning goes, “we already know how to write the content we want in Word.” Oh, boy.

The problems with this approach are manifold. First off, there’s the false assumption the WYSIWYG editor will somehow be less complex than understanding HTML markup. In my experience that’s just not true. The theoretical simplicity of the WYSIWYG abstraction is marred by several factors in practice: the nature of HTML, the nature of WYSIWIG and the goals of the content creator. I’ll go into detail on these issues in a later post. For now, let it suffice to say that it turns out that teaching users to bend a WYSIWYG editor to their will to get the content they went often takes hours of time and is as complex—if not more so—than leanrning and applying basic markup and styling directly. And even when the user gets what they want out of that fancy editor nine times out of ten the resulting markup is a tangled hot bloated mess.

The notion that a content creator can simple “paste from Word” is also bunk. The problem here is two-fold. There’s a mismatch between the internal formatting of Word and other native word processing apps and HTML. And while it is nice to believe that you could get something out of that nifty word processor and drop it into your Web page and “Voilá, hey presto! There’s your content, formatted just the way you want it!” it never works out that way without a HUGE amount of preparation and training.

So what’s the solution? My answer is “learn the basics of HTML and CSS. And maybe a little Javascript.” My reasoning is simple: when you are working on a task you should know the tools you’re working with. In the same way you should learn the basics of using a hammer and saw if you’re going to try carpentry, you need to know HTML and CSS to build out your Web vision.

If you’re going to create content for the Web, you really do need to know what a <p> element is and how to tag your content with one (it’s a paragraph, for the uninitiated). And you need to know that if you want to make the text of that paragraph big, bold, red and in your favorite typeface, you’re going to need a style rule like this:

p.big_bold_red_and_ugly {font: 32px bold “Comic Sans"}

Javascript isn’t required, but knowing at least a bit about how to add functionality to your page will greatly increase your options for producing compelling content. This is especially true

Of course, there’s more to it than than that. The world of Web page content creation is almost infinitely variable. That’s variability is a cornerstone of the argument for WYSIWYG. But the basics are not that complex and what you can do with just a bit of knowledge can go a long way.

Having an understanding of markup and styling with HTML and CSS will help immensely if you do insist on using a WSYIWYG editor, too. You will have a better understanding of what your editor is doing—or not doing—and you can dive into the source view when you need to do things the editor makes hard or impossible to do.

As I said out the start of this post, you need to know HTML and CSS if you’re creating content for the Web. Taking the time to gain a little knowledge of the underpinnings of the Web will prove beneficial. Over the next few posts I plan to lay out some guidance on how to become Web design literate.

And I’m going to do it all in plain old HTML.