Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>HTML is the language of the web. It is a markup language which means that the only thing we can use it for is to "markup" documents, i.e. design how content will look to the end user. </p> <p>Imagine we had a page that showed the user the date. </p> <p>We could use some HTML to do that:</p> <pre><code>&lt;p&gt;Sunday 26 August 2012&lt;/p&gt; </code></pre> <p>But say we wanted to keep that page up to date. We'd have to go and manual change the date manually everyday. Because HTML is static, it can't be changed dynamically. </p> <p>Perhaps it would be useful to be able to generate automatically adding the correct date to the page, depending on when the page is loaded. </p> <p>That is where PHP comes in. PHP is a scripting language, and while it can be used for lots of things, one of its main uses is to generate HTML dynamically. So instead of writing in today's date - what we could do is use some PHP and say. </p> <pre><code>&lt;p&gt;&lt;? echo date("l j F Y");?&gt;&lt;/p&gt; </code></pre> <p>This will print out for me "Sunday 26 August 2012" today, "Monday 27 August 2012" tomorrow, and so on. </p> <p>I'd need to save this new version of my page as page.php instead of page.html, because I need my server (which is set up use the PHP) to send the page to PHP interpreter. It will look for the special <code>&lt;?php</code> or <code>&lt;?</code> and try to process what ever it finds. In this case it spits out the correct text for the date on my page and adds it to the page before sending it to the user. </p> <p>We can do lots of cool stuff with PHP. It is "server side" technology, meaning that it does its work on the server and then sends us the finished page with all the dynamic content added. </p> <p>Sometimes we might want to control and modify a page after it has reached the user's browser. For this we will need some "client side" technology, i.e. code that runs in the user's browser. And the most common client side language of choice is javascript. </p> <p>Again we can do a lot with Javascript, but most often we use it in web pages to allow us to control elements of a HTML page after it has reached the user. </p> <p>We might want to hide something on a page and then only show it once a user has clicked a button. We can do that with javascript.</p> <p>Now because Javascript is "client side" technology, i.e. it runs in your browser it can actually be quite hard to use, because you will have to write code that works in a variety of different browsers, and now on mobile phones too! To make this job easier, very smart developers have taken a lot of the pain out of using javascript to control elements in web pages by creating libraries and frameworks to use. One of the most popular of these is the <a href="http://jquery.com/">jQuery framework</a>. I think jQuery is the most fun thing to learn, because it allows you to do all of the "cool stuff" in webpages - make stuff fade in, make stuff fade out, play sounds, move elements around etc etc </p> <hr> <p>I hope this helps you work out how different technologies can help you achieve different things. </p> <p>The <strong>TL;DR</strong> version of this would be:</p> <p>HTML &amp; CSS - sets out how your pages are going to look.</p> <p>PHP - helps you to generate HTML dynamically.</p> <p>JavaScript - helps you make your pages more interactive and can respond to clicks or other actions of your user. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload