Here’s the situation: You want to become a web developer and you’ve set aside the time to learn HTML/CSS and PHP. But you’re not quite sure where to start.
So you googled the question and stumbled upon this site. Well, it’s good that you stopped by! Because in a moment, we’re about to discuss exactly that.
Let’s get right into it.
What Is HTML/CSS?
HTML and CSS are client-side languages for structuring the information on web pages and giving those web pages a particular look and feel. If you want to have anything to do with web development, you need at least a basic understanding of HTML/CSS.
A client-side language, if you’re coming across the term for the first time, is a language that’s executed on the client side. In the case of HTML/CSS, the client side is the browser on the user’s computer, tablet, or phone.
HTML is a markup language. It works by wrapping regular text into HTML elements, called “tags”, that indicate the parts of a page they belong to (say, an article, a sidebar, a heading, a paragraph, and others).
CSS is a stylesheet language. It targets the HTML elements on a web page with CSS rules that determine their appearance through CSS properties. For example, if you assign the property
font-size: 16px to all paragraph tags, they will have a font size of 16 pixels.
Technically, neither HTML nor CSS are programming languages. They tell web browsers important information about the structure and appearance of web pages, but they don’t allow you to develop web apps per see.
In other words, with HTML/CSS you can create static sites. You know, the kind that appears the same to every visitor—and doesn’t change unless you make edits to it.
That doesn’t mean you shouldn’t master these two languages, though, and we’ll get into why that is in a minute or two.
What Is PHP?
Some of the most visited websites in the world, including Etsy and Wikipedia, are written in PHP. The same is true for many of the most popular platforms for building websites and online stores, including WordPress and Magento.
PHP is a server-side scripting language and one of the most widely used programming languages in web development. If you want to become a full-stack web developer or a backend web developer, then you absolutely have to learn PHP.
A server-side language is a language that runs on the web server. When the web server receives an HTTP request, it executes the code and produces an output. In the case of PHP, that output is an HTML document that gets displayed in the website visitor’s browser.
PHP allows you to create dynamic websites and web applications whose content is dynamically generated based on predefined logic.
Which Should You Learn First?
You don’t need to know PHP to learn HTML/CSS, just as you don’t need to know HTML/CSS to learn PHP. So it’s only natural to wonder… which of these languages should you learn first?
Since HTML, CSS, and PHP are all languages used in web development, it’s a good idea to learn HTML/CSS before you learn PHP. This will give you a good foundation because, in a real-world project these, languages can interact in many different ways.
For example, you can use PHP to dynamically generate HTML elements (and their contents) and CSS rules (and the values of their properties). If you already have an understanding of HTML/CSS, you will be able to handle these kinds of tasks more easily.
Don’t miss: How to Use CSS With PHP
What Else Should You Learn?
Knowing Git and the basics of version control is a non-negotiable.
As you are learning client-side web development, you will probably want to familiarize yourself with the tools of the trade, including the HTML5 boilerplate, reset.css and normalize.css, and one or more of the most popular HTML/CSS/ JS frameworks, be it Bootstrap or Foundation.
When learning server-side development, consider going beyond vanilla PHP and mastering one of the most popular PHP frameworks, such as Zend or Symfony, which can take your work (and your code, and your PHP websites and web applications) to the next level.
It isn’t really necessary to learn HTML before PHP, and vice versa. That said, we think it makes sense to know the basic client-side languages for building websites before turning to more advanced programming languages for server-side web development.