Monday, 28 November 2011

Should I Learn HTML or Just Use a WYSIWYG Web Editor? Pros and Cons of Using a Visual Web Editor vs Learning HTML

Preliminary Matters

If you're not entirely sure what HTML is, please read Whatis HTML? What is CSS? What are JavaScript, PHP and Perl? before continuing. In fact, even if you think you know what HTML is, it may still be a good idea to at least glance at that article. From experience, I find that many webmasters-to-be only think they know what HTML is, but have actually misunderstood it. Don't worry. That ar
ticle is written in plain English. And it's short. So you can quickly pop over to that page and be back here in a jiffy.
For those who have arrived here looking for a guide on how to create a website (whether by using a visual editor or hand coding it in HTML), please read the How to Make / Create Your Own Website: The Beginner's A-Z Guide instead.

The Answer: It Depends

Whether you actually need to learn HTML or just let a WYSIWYG ("what you see is what you get") web editor do the hard work for you depends on what you're trying to achieve.

For the Incidental Webmaster (and the Casual Webmaster)

Generally speaking, the incidental webmaster doesn't really need to learn HTML. By "incidental webmaster", I mean that your website is just a means to an end. For example, you want to create a website so that you can sell some product or service, blog about something, display your resume (curriculum vitae), or show off your holiday photos, or the like. That is, you want a website so that you can accomplish some specific purpose (other than just creating a website for the sake of creating one).
For such people, I personally think that it's a bit of an overkill to learn HTML. It's like thinking that you need to know how to build and repair a car before you can drive one. While there's nothing preventing you from learning HTML, and it's certainly beneficial to know it (just as it's definitely helpful to know how to build a car from scratch before you drive it), is it really worth your time and energy to learn it? Why not just use a visual web editor?
Visual web editors are computer programs that let you design your web page without your needing any knowledge of HTML or CSS. You design them visually on your computer using your mouse and keyboard, so that what you see in your computer monitor is what you get on your website. That's why they are called What You See Is What You Get web editors, or "WYSIWYG web editors" for short. As you create your web page, these editors generate HTML and CSS code behind the scenes for you. They are an efficient and user-friendly method of making websites, since anybody, laypersons included, can create websites with these tools. No technical knowledge is needed. You can design your website quickly this way, and then devote your time and energy on what is really important to you: generating sales from your site, delivering your products or services, etc. That way, your website doesn't become your life. It remains as what it should be: a means to an end, a way for you to sell stuff (or whatever you want it for).
Visitors who write to me asking this question have usually encountered well-meaning friends who have advised them that it's really "better" to learn HTML. Let me address what is usually said about this matter.
  • (Myth) WYSIWYG web editors don't create valid code; you can do better writing HTML manually

    Some people claim that WYSIWYG web editors don't create valid HTML code (that is, code that has no errors). This may have been true in the 1990s when the Internet was new, but it is no longer the case today for the major web editors. Good commercial WYSIWYG web editors like Dreamweaver and even free web editors like KompoZer have been generating valid HTML code for many years now. Sure, it's possible to get invalid code when using those editors if you deliberately insert invalid code which you import from some website. But then, you will get invalid code if you do that when hand coding in HTML as well. In fact, with the state of sophistication of web editors today, there's a greater likelihood that you will create invalid HTML when writing HTML by hand, than by letting the web editor create it for you.
    Note that my statements above only apply to the editors I specifically mentioned, that is Dreamweaver and KompoZer. It doesn't necessarily to apply to all web editors in the known universe. I don't go around testing the code generated by every web editor, so I can't make a definitive statement about every web editor available today.
  • (Myth) WYSIWYG web editors create bloated HTML code

    While it's true that the HTML code automatically generated by a web editor may not be as highly optimised ("optimized" in US English) as hand-coded HTML code, it's not true that all code generated by modern WYSIWYG web editors are "bloated". In fact, my examination of the code produced by Dreamweaver shows that it's mostly the sort of code I would have produced had I written the code manually myself. Yes, there are situations where the code is a bit bigger than what I'll have written manually, but that's a far cry from "bloat". And the extra code usually occurs because I want the web editor to take over some of the labour-intensive activities (like automatically updating all the pages of my website when I change the overall site design) from me. I consider such a trade-off, which allows me to save a huge amount of time, a fair one.
    I've not examined the code generated by KompoZer lately, but I don't recall it generating a lot of excess, unnecessary code either.
    (Again, note that I'm talking about true web editors like Dreamweaver and KompoZer. If you use a word processor like Microsoft Word to create a website, you will get a lot of code bloat. But to be fair to Word, it is not a web editor. It merely provides the facility to convert a document into a web page for convenience of its users. It was never intended to be a proper web editor, nor does it pretend to be one.)
    Let me put it this way. Even if the code generated by web editors are a few bytes bigger than what you can create yourself, it's probably worth it. It saves you the time you take hand coding the page, and attending to the nitty-gritty. It is analogous to your washing your clothes by using a washing machine and washing them by hand. Washing your clothes by hand may lead to cleaner clothes, since you can pay special attention to specific stains you spot. But for the most part, a washing machine is more than adequate. And you're freed to attend to more important things. In the same way, WYSIWYG web editors today are more than adequate in generating good code. And they save you time.
Generally speaking, it all boils down to what you're creating a website for. Which is why I divided my answer in this way. If you are an incidental webmaster, where your site exists to serve a bigger goal, you'll probably find it frustrating if you are going to spend all your time learning HTML, just to build a website so that you can sell some product or service. Like I said, it's like having to learn to build and repair a car, just so that you can drive it to go to work.
Note that those friends that advise you to learn HTML aren't really wrong. You do lose out some things when you don't know HTML. It's the same thing you lose when you don't know how to build and repair a car and yet want to drive one. If things go wrong, or you really want to do something non-standard, you won't have the knowledge to deal with it. But those are unusual circumstances, just as they are for car drivers. And on those special occasions, which actually don't occur for most webmasters, you can always get help; for example, one way is to search a site like thesitewizard.com for answers.
Think of it this way: would the fact that you don't know how to build a car from scratch or repair one stop you from learning to drive one? What would happen if your car has a problem? Or if you want to do something really unusual with your car, like soup up your car engine? If you don't know how to do these things, does it mean that you need to learn to build a car by hand before learning to drive?
The same thing goes, in my opinion, for the incidental or casual webmaster. If you have a lot of time to kill, and you love learning new things, by all means go for it. In-depth knowledge is usually helpful in any task. But if you just want to quickly get a website up and running and focus on the things that are really important to you, then why bother? Like all other things in life, you can always consult others when there's something special you need done. In this day and age, "consulting others" may not even be literal — you can just search the Internet for the answer.

For the Professional Web Designer

On the other hand, if you plan to design websites as a profession, that is, you want to get paid by others to design websites for them, then it's probably a good idea to learn HTML and CSS. While I know of many people who have courageously started a web design business knowing nothing but how to use a WYSIWYG web editor, I personally feel that a knowledge of the nitty gritty of HTML and CSS in such a case will be extremely beneficial.
I'm not saying that professional web designers don't use WYSIWYG web editors. Far from it. Of all webmasters, they are probably the ones who want to design a website using as efficient a process as possible, so that they can attend to more customers in a short time. As such, chances are that they probably use web editors more often than casual webmasters.
Be that as it may, if you plan to design websites for a living, knowing HTML and CSS will allow you to more effectively use your web editor, since you will know what sort of underlying code is needed to create a particular result. And you can be more confident when dealing with your customers, because you will actually know what you're talking about.
It's also a matter of professionalism. It allows you to be more competent in the job you're doing.

For the Web Programmer: HTML Knowledge is Required

Of all the different categories of people I've addressed in this article, I think that a knowledge of HTML and CSS is mandatory only for the web programmer. By web programmer, I mean the person who is writing computer programs for the web, such as scripts written in PHP, Perl, Python, Ruby or whatever computer language your application is using.
(For the newcomer, note that knowing HTML does not make you a web programmer any more than knowing how to type Microsoft Word documents makes you a computer programmer. HTML is not a programming language. HTML is a simple document formatting language. See my more detailed explanation on what HTML is if you're not sure what I'm talking about.)
The reason I say that HTML is required knowledge for the web programmer is because most reasonably complex PHP programs (or Perl programs or whatever) need to be able to generate HTML / CSS code. If you don't know HTML and CSS, your programs are going to be very crippled, and they won't be able to display customised output for your visitors to see in their web browsers. Remember, after all, that web browsers don't execute PHP code. They expect to see HTML code. It doesn't matter what language your application is written in; it will still need to generate HTML code for your visitors' web browsers to display.

On the Other Hand, HTML is Actually Very Easy to Learn

However, in spite of everything I mentioned above, I must clarify that HTML is actually a very easy document formatting language to learn. It was deliberately designed that way. Even if you're an incidental webmaster, and not a computer geek, the language can usually be mastered by many people with little effort.
But like I said above, this doesn't mean that you're obliged to learn it. There are many things in life that are easy to learn. That doesn't mean that we have to learn them all, or that they're worth our time and effort to learn. It depends on your current priorities and time commitments. All I'm saying here is that if you actually want to learn HTML, it is by far the easiest document formatting language I've encountered. It's very logical and easy to understand, and it doesn't contain many constructs that you need to memorise.
Those who really want to learn to hand code your website in HTML can find more information on how to do it in the HTML Tutorial- Learn to Design a Website using HTML series.

No comments:

Post a Comment