The Road to Programming is sometimes paved with Web Pages

By Elisabeth Freeman

Beth Freeman co-wrote Head First HTMLI am often asked how I first got started in programming. Recently, I was interviewed by Girls Gone Geek, a weekly podcast on technology from a women's perspective, and they asked if I got started by creating web sites. The Girls clearly have no idea how old I am! (Shhh...) I actually started programming long before the Web was a twinkle in Tim Berners-Lee's eye, but their question got me thinking, and I realized that creating a web site is a good way to get started on your way to programming.

No Dumb Questions

Now, you might be thinking, "Writing HTML and CSS is not the same thing as programming", and that's technically true. But once you've put together a basic web page, you'll have learned a lot about how the web works under the covers, and you'll be able to tackle some simple programming concepts. The next logical step is to learn a bit of Javascript, so you can create some cool effects on your web page. Before you know it, you'll be learning Ajax, and then a server side programming language like PHP or Java, and then you'll need a database, so you'll learn some SQL... and ta da! You're a web programmer. I work with several people who have taken an interesting path to programming. FarmerOne friend has an advanced degree in music and is now a business data analysis expert; another started out wanting to be a farmer, became a web application programmer, and is now a serious Java programmer.

For those of you who have no interest in the mechanics of web pages, there are lots of programs out there, like Adobe Dreamweaver and Microsoft Expression, that will help you create a web page without having to know how HTML and CSS really work. But if you want to know what's happening under the covers so you can learn about how web pages really work, and eventually write some Javascript and do more advanced programming, I definitely recommend writing your own HTML and CSS from scratch. You can use a simple editor like TextEdit (on the Mac) or TextPad (on Windows). No need for anything fancy.

Read more...

Another advantage to writing HTML and CSS yourself is that you can always write your web pages using the most current standards. When we wrote Head First HTML with CSS & XHTML, HTML 4.01, CSS 2, and XHTML 1.0 were the most current and best supported versions of these technologies, and in fact they still are. But standards development is inching along and before too long, HTML 5, CSS 3 and XHTML 2.0 will be launched and supported by browsers. If you stay up to date with these standards, you're likely to be writing far better code than programs like Dreamweaver or Expression do.

And, of course, languages like Javascript and Java are always being updated too. For example, most modern browsers support Javascript 1.6, although the most current version of Javascript is actually 1.8, and version 1.9 is under development. So there's no shortage of new things for you to learn once you get started writing your own web pages and programs.

Once the new standards for HTML, CSS and XHTML are nailed down a bit more, we'll update Head First HTML with CSS & XHTML to include some of the cool new features. HTML 5 will be more strict than HTML 4 was, but it's designed to be backwards compatible with older browsers, so you will be able to convert your HTML 4 pages to HTML 5 web pages without worrying too much about breaking them in older browsers. (However, always keep in mind that there is no substitute for lots of testing!). HTML 5 will include some new elements that help you organize and structure your documents better (e.g., header, footer, and nav (for navigation)), and some new elements for content like audio, video, graphics, and tabular data.

Sharpen your Pencil

If you've read Head First HTML with CSS & XHTML, then you already know not to use any attributes in your HTML that affect what we call the "presentation style" of a web page - things like color and font size that are technically allowed by HTML 4, but are better done with CSS instead. HTML 5 is ripping out all of those presentational attributes from the HTML language so you'll be forced to use CSS to style your web pages, which is a good thing - really!

Like HTML 5, CSS 3 is still under development. CSS 2 revision 1 (usually written CSS 2.1) is mostly complete with good support in many browsers, butsince it was designed primarily as a fix for errors in CSS 2, it is very similar to CSS 2.

CSS 3, however, will be quite different from CSS 2 and 2.1, and will contain a whole host of new features. For instance, the layout properties will change dramatically - instead of being limited to using absolute and relative positioning using x and y coordinates to layout the structure of a web page, we'll be able to use a grid to layout the page, kind of like an HTML table, only specified with CSS. Multi-page documents will allow you to create multiple "pages" within one web page, so you could, for instance, easily create a presentation with slides. New properties will also allow you have much more control over what your document looks like when it's printed. And that's just a taste.

I'm confused. It's easy to get really confused about which browsers support what versions of HTML and CSS. The W3C, the organization that is responsible for managing the development of the specifications for HTML, XHTML and CSS, has posted a list of CSS Browsers with
information about what browsers support which versions of CSS. I haven't found a good equivalent list at the W3C for HTML or XHTML yet, but I'll post it here if I do.

For more information about browser support for upcoming standards, check out these links:

In the meantime, you can write HTML 4.01, CSS 2 and XHTML 1 knowing that these standards will be the most current and the best supported for quite a while. When the new standards are released and supported by browsers, we'll help you sort through it all so you can focus on creating great web pages and building up your web skills. And once you get the hang of some of these web page skills, you might very well find yourself wanting to move from creating web pages to programming.

AddThis Feed Button

 

 

Comments


I think learning web programming is a great starting point for a would-be programmer. When I started learning C programming, I was overwhelmed by the amount I had to learn to do anything useful. That's when I switched to learning HTML and CSS. I bought the head first book and it was great! Within weeks I was creating my first web pages. It was a great introduction to computer programming.

OK, you managed to confuse me. I got your book and when to your web site and was trying to find where I can download the source files mentioned in chapt 2 page 46???????

Vinny, you can get all the source files for Head First HTML with CSS & XHTML at the bottom of this page.

I found question at the end of every section interesting. Crossword puzzle was also a nice. Exciting experience. But one thing i felt little difficult. When i had to revisit pages to peek in to a topic, i had to read all the stories (which are in fact very cool thing for a new learner or first timer). Overall it a cool read, HTML, CSS and XHTML.

i love headfirst, i'm chinese user.headfirst good.

Well I disagree about somebody learning web development, before learning the basics for an specific language. Let's say the person starts learning HTML, CCS, JavaScript. That's perfectly fine, but when it comes to learn a Server's Side language like JAVA what happens. The person will need to work with servlets, jsps, etc, without even knowing what a class, interface, is. He/She will not have the basic knowledge of how that programming language works. So, in my humble opinion I believe, people should learn a language first, then migrate to the next step - web -.

I just got the book, and I haven't been able to take my nose out of it. i am already learning the basics, and I am having so much fun doing it.

where is the source address?

I really enjoyed the book. It taught me several things I did not know and explained the "why" behind almost everything. I appreciate how in-depth the book is, especially since it's more of a beginner's guide. I am pursuing a degree in computer information technology with a concentration in art, media, and programming (which obviously includes a lot of web stuff). I definitely want to get more Head First books in the future.

 

Post a comment: