HTML stands for Hyper-Text Markup Language. It is essentially a way of defining the structure of data on a page. in JUST html, all you would get is a blank page with text in it, organised into different 'invisible' boxes or 'divisions'. This is what we call a 'div' example:
CSS stands for cascading style-sheets CSS is where we define what a page 'looks' like. colours, position of the 'divs', font-sizes, gradients, background-images etc. example:
In an ideal world, what the page looks like, is Not connected to how the page is written in html. A good example of this is the site 'CSS Zen Garden' ALL of the pages in the above page, are the exact same HTML. Only the CSS has been changed. In a 'real-world' example this is not always practical, especially for larger sites like facebook, reddit etc.... but it proves a point. CSS is for how it looks, HTML is for how it is 'marked out' (content) Looping , While, and other 'code'
echo is essentially the same as 'print' in other languages, in php it is kind-of not a function, hense there is no need to have echo(). HOWEVER echo() and echo are the same. This is not true for all functions. Just echo.... TL;DR echo is weird, deal with it PHP on its own, is also no use, because all you would get is a page of data, with no formatting. For PHP to be useful, you must use integrate it with HTML (& CSS) eg:
This may not look useful, but as soon as you start to use PHP functions, you will see it is. for example to display the day, you could do:
Hopefully that makes some sense. So remember how earlier i spoke about servers? The PHP code (the above file) lives on the server. When you ask for it, by going to the url (eg: www.website.com/index.php ) the server runs the PHP code, and generates the output BEFORE it is sent to you. When it sent to you you will receive ONLY html code. (if you right-click>view-source on a webpage, you see the HTML) for the above index.php file, you would receive:
This would cause the page to 'update' the date in '
This would be better to do in PHP