About the Web ============= The internet is a big network of computers, all connected. Here's a picture: .. image:: images/the_internet.jpg :width: 90% In reality there are many more, of course! Let's think about what needs to happen for you to see this web page. This page is on another computer -- saved on a disk just as it would be on your computer. The other computer's name on the network is: **softdev.ppls.ed.ac.uk** Requests and responses ---------------------- Your computer (or phone) needs to send a request for this information. This will pass through many other computers on the way. Once the request is received, the information will be sent back. It doesn't have to go the same way each time! We refer to the computer making the request as a **client** and the computer responding to it as a **server**. Usually servers don't have a screen or keyboard, they are just connected straight to the network -- that's how they interact with the world. They are sometimes powerful, in order to quickly handle large numbers of requests. Other than that they are very similar to the computer on your desk, they have files on a disk, and can run programs. The web browser --------------- For this class, I recommend that you use Microsoft Edge, Google Chrome or Mozilla Firefox. I don't recommend Safari as it can have trouble with some online experiments. Edge `https://www.microsoft.com/en-gb/edge `_ Chrome `https://www.google.co.uk/chrome/ `_ Firefox `https://www.firefox.com/en-GB/ `_ HTML ---- When a web page is sent to your computer, it will be in HTML. This is a language which can represent the content and structure of a page -- how text is divided, which images will be included, and so on. To see what it looks like, you can ask your web browser. Right-click anywhere on the page and select "View Page Source". You'll see that all the content of the page is in there. The extra information in the tags help to give the document structure. For example: .. code-block:: html About the Web This sets the text that appears in the tab for the web page. To give another example, a `link to this page `_ looks like this: .. include:: site_specific/link_to_this_page.rst CSS --- That's not the whole story, though. As well as the text, there also need to be instructions on how to show it. This includes things like font, colour, line spacing and so on. Near the top of the page you'll see: .. code-block:: html This tells the browser to use a stylesheet, telling it how to format the page. Let's take a look at it. Click on the text after ``href=`` in your "view source" window. (If that doesn't work, use `this link here `_). Just after the heading "body styles", you'll see this: .. code-block:: css a { color: #004B6B; text-decoration: underline; } This relates to an ``a`` tag, which is a text link. Remember that the link we saw above used a tag starting with `` element does in HTML. Thanks! ------- With gratitude to the `DjangoGirls intro `_, which was itself inspired by the talk "How the Internet works" by by `Jessica McKellar `_. Internet image: By The Opte Project CC BY 2.5 (http://creativecommons.org/licenses/by/2.5 ), via Wikimedia Commons, `original source here `_ .