The 3 Most Important Web Languages to Learn


I have often been asked which web languages someone with no prior experience in coding, scripting, or programming should learn, and in what order. So I’ll start by giving the three most important web languages in use today, and then go on and introduce other languages that would be helpful to know once you have the basics down.

1. (X)HTML. HTML (Hypertext Markup Language) is the primary markup language of the web, and is used to build and structure web pages. Everything you see that is not styling or animation is primarily built using HTML. I’m referring here specifically to text, tables, and forms.

There are several forms HTML can commonly take: HTML 4.01 Strict or Transitional, XHTML 1.0 Strict or Transitional, and HTML 5. XHTML (Extensible Hypertext Markup Language) is really just the union of HTML and XML, and is very similar in its markup to HTML, but is designed with XML’s extensibility (and strictness) in mind. As a small example, while an HTML 4.01 image or break tag would not need a trailing slash, an XHTML image or break tag would need a space and trailing slash before the tag is closed. This is because in XHTML, every tag that is opened must be closed, even if it is an empty tag.

The difference between using Transitional or Strict for both HTML and XHTML depends largely on how well you write your code. If it is written using strict rules (and no legacy HTML from the olden days) and validates under this configuration, then it can be Strict, and will be more compliant and standardized. Otherwise, if it’s imperfect or contains some legacy HTML, it would be Transitional, so it can still be validated and the browser can know how to handle it.

At some point in the evolution of these web markup languages, there was a question of what form the future would take: XHTML 2.0 or HTML5. HTML5 was being developed by individuals from Apple, Opera, and Mozilla, while XHTML 2.0 was being developed by the World Wide Web Consortium (W3C). Somewhere along the way, HTML5 won out on being the next standard for the web. Today, HTML5 is not yet fully compliant (not until about 2014), but it is where the web is heading.

So with all these choices for HTML, what should you choose to learn first? I would suggest learning either (or both) HTML 4.01 or XHTML 1.0 first, and then go on to HTML5 if you want all the exciting new features it has. Be warned, however, that HTML5 is not fully compliant, and older browsers, especially Internet Explorer, don’t like it.

2. CSS. CSS (cascading style sheet) is a style sheet language that gives an HTML document good looks. It defines the presentation of a web page. When we refer to CSS, we’re referring to colors, background images, text fonts and sizes, and element positioning and size. Well-written web pages use HTML for structure and content only, and CSS for presentation. It allows different stylesheets to be used on the same web page for different reasons: accessibility (screenreaders), mobile devices, print media, and many other reasons. One web page can look very different depending on which stylesheet is used. Have a look at CSS Zen Garden to see this aspect of CSS in action; the HTML remains the same but the design changes depending on the stylesheet selected.

Like HTML, there are a couple of different forms (called levels) CSS can take: CSS2 (and 2.1) and CSS3. Both are very similar at the core, but CSS3 goes hand-in-hand with HTML5. Thus, though it has some great new features (like rounded corners, gradients, and shadows), some of these features are not fully compliant. Therefore, choosing what to learn in CSS is less about choosing a level and more about choosing rules and properties that are compliant to the browsers of your target audience, and Internet Explorer or older browsers are usually a large part of that audience.

3. And now we get to #3, where I must ask you why you want to learn these web languages. The third web language to learn depends on whether you want to build dynamic web pages and web applications (and become a web developer) or whether you want to design web sites (and become a web designer). Whichever path you choose, you’ll need HTML and CSS. If you wish to be a designer, and put web development on the back burner for now, I would suggest moving on to JavaScript/jQuery. But if you wish to develop dynamic sites, I would suggest going on to PHP and catching up with JavaScript/jQuery later; just know that if you go the PHP route, you will probably want to get around to JavaScript/JQuery at some point. So on to #3.

3a. JavaScript/jQuery. JavaScript is a client-side scripting language that allows animations and user interaction with the web page. Think gallery slideshows, form validation, annoying popups, tabs, tooltips, etc. You need HTML and CSS for all this, of course, but JavaScript gives it life.

JQuery, on the other hand, is not a language, but rather a JavaScript library. It’s simply a way to simplify client-side scripting. What would take JavaScript lines and lines of code, jQuery does in a few lines of code. Their motto, “Write Less, Do More”, is very true. Depending on how much you want to do or how thoroughly you want to understand JavaScript, you could easily learn just jQuery and forget all about JavaScript. There are also many tools and plugins for jQuery that simplifies the process even more, and makes learning a whole new language a less daunting experience.

3b. PHP/MySQL. When you get into PHP (PHP: Hypertext Preprocessor, originally stood for Personal Home Page), you’re no longer writing client-side code; you are now writing server-side code. PHP is a server-side scripting language that allows a user to no longer just interact with the web page, but now allows him or her to interact with the server. Coupled with MySQL, PHP allows communication with a database, where records can be created, stored, and retrieved. PHP is embedded in documents with a.php extension, but is used within HTML. So even though a file may have a.php extension, it could still work like an HTML page without PHP, or it could be used as an HTML page with embedded PHP.

Like HTML and CSS, there are different versions of PHP. Which version you choose to use depends mostly on which version the server supports. PHP5 is currently the best version, though some code that was allowed in older versions is not allowed in PHP4 or PHP5, though it’s just as well since most of these codes were security weaknesses.

There are also a couple of different ways of programming PHP: OOP (object-oriented programming) and procedural. OOP programming (introduced in PHP3 and improved in PHP4 and further changed in PHP5) borrows object-oriented methods used by other programming languages (like Java, Perl, and C++) and uses them in PHP, and helps to cut down on the amount of code used (by making code reusable). Procedural programming is mostly old-school since it is less efficient, but it may be a little easier for beginners to understand.

And what’s next? If you took the route of JavaScript/jQuery, the next language to learn would be PHP; and if you took the route of PHP, the next language to learn would be JavaScript/jQuery. After you have all of these languages under your belt, then it would be time to fuse JavaScript/jQuery and PHP with AJAX (Asynchonous JavaScript and XML). AJAX is not a language, but rather a set of technologies or methods that use JavaScript to interact with PHP, allowing a user to interact with a web server without using page reloads. AJAX is used in searching (such as when a list of suggestions appear when you’re typing), forms (again, suggestions, or checking with the server if a username is taken, or populating a dropdown list depending on previous user choices), and many other applications. It’s simply a really cool way to bring all of these languages together to create a dynamic, user-friendly application.

So those are my suggestions as to which web languages to learn when starting out, and in which order. It may seem like a lot, and for some people it may seem like too much, but I have found that learning a web language is just like learning a foreign language. Fluency comes with practice and usage, and the more languages you know, the easier it is to learn another one.



Source link