- This image is pure CSS.
By Chen Hui Jing / @hj_chen
The entire network of networks that connect all the world's devices to each other
Internet | World wide web | |
---|---|---|
Estimated year of origin | 1969 | 1993 | Name of first version | ARPAnet | NSFnet |
Comprises | Network of devices, copper wires, fibre-optic cables and wireless networks | Files, folders & documents stored in various computers |
Governed by | Internet Protocol (IP) | Hypertext Transfer Protocol (HTTP) |
Dependency | None, everything else depends on it | The internet |
Nature | Hardware | Software |
A protocol is an agreed set of rules and standards that allow devices to communicate with each other.
Internet Protocol (IP) | To route information to the proper address |
---|---|
Hypertext Transfer Protocol (HTTP) | For the transmission of web pages over the internet |
Transmission Control Protocol (TCP) | To create packets, reassemble them, make sure none were lost in transmission |
Simple Mail Transfer Protocol (SMTP) | For computers to send email |
Post Office Protocol (POP) | For computers to receive email |
File Transfer Protocol (FTP) | For copying files over a network from one computer to another |
The process of building websites
A clear mind
Regardless of what programming language you use, all code can be read in any text editor.
Javascript
close: function () {
this.ul.setAttribute("hidden", "");
this.index = -1;
$.fire(this.input, "awesomplete-close");
},
Code credit: Lea Verou
C
#include "8cc.h"
static int count_leading_ones(char c) {
for (int i = 7; i >= 0; i--)
if ((c & (1 << i)) == 0)
return 7 - i;
return 8;
}
Code credit: Rui Ueyama
Assembly
ctable segment para public 'DATA
db 9 dup(' ')
db 9,10,' ',12,13
db 13 dup(' ')
db 27
db 4 dup(' ')
db ' !"#$%&',39,'()*+,-./0123456789:;<=>?@'
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`'
Code credit: Happy codings
Client-side
Server-side
<p>This is an example of a paragraph element</p>
<!DOCTYPE html>
<html>
<head>
<title>Example page</title>
</head>
<body>
<h1>Hello world</h1>
</body>
</html>
<!DOCTYPE html>
<html>
tag
<html>
element<html lang="en">
// HTML code for web page
</html>
<head>
element<head>
<meta charset="utf-8">
<title>Your site title</title>
<meta name="description" content="A short description of your website">
<meta name="author" content="Your name">
<link rel="stylesheet" href="css/styles.css?v=1.0">
</head>
<body>
element<body>
<header>
<img src="img/logo.png" alt="Site logo">
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<h1>Page header</h1>
<p>Some content in a paragraph. Brownie tiramisu toffee sweet roll sesame snaps halvah. Fruitcake donut pie ice cream jujubes danish dragée. Bear claw jelly dessert lemon drops bonbon donut. Sugar plum sugar plum candy canes ice cream powder tootsie roll sweet. Sugar plum biscuit macaroon fruitcake cookie cupcake jelly-o cupcake. </p>
<main>
</body>
<body>
element on a web page<address>
<article>
<footer>
<header>
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<hgroup>
<nav>
<section>
<dd>
<div>
<dl>
<dt>
<figcaption>
<figure>
<hr>
<li>
<main>
<ol>
<p>
<pre>
<ul>
<caption>
<col>
<colgroup>
<table>
<tbody>
<td>
<tfoot>
<th>
<thead>
<tr>
<button>
<datalist>
<fieldset>
<form>
<input>
<keygen>
<label>
<legend>
<meter>
<optgroup>
<option>
<output>
<progress>
<select>
<details>
<dialog>
<menu>
<menuitem>
<summary>
<abbr>
<b>
<bdi>
<bdo>
<br>
<cite>
<code>
<data>
<dfn>
<em>
<i>
<kbd>
<mark>
<q>
<rp>
<rt>
<rtc>
<ruby>
<s>
<samp>
<small>
<span>
<strong>
<sub>
<sup>
<time>
<u>
<var>
<wbr>
<area>
<audio>
<map>
<track>
<video>
<embed>
<object>
<param>
<source>
<canvas>
<noscript>
<script>
<del>
<ins>
Visit Web Accessibility Initiative (WAI) to understand more about this important aspect of the web
selector {
property1: value;
property2: value;
property3: value;
}
p {}
<div class="example">
.example {}
<div id="example">
#example {}
Inline styles
IDs
Classes, attributes and pseudo-classes
Elements and pseudo-elements
ul {
// CSS properties
}
0, 0, 0, 1
.class-1 .class-2 p {
// CSS properties
}
0, 0, 2, 1
#id-1 .class-3 div {
// CSS properties
}
0, 1, 1, 1
Client-side Javascript
Server-side Javascript
// 20160211134054
// http://api.openweathermap.org/data/2.5/weather?id=1880251&appid=44db6a862fba0b067b1930da0d769e98
{
"coord": {
"lon": 103.8,
"lat": 1.37
},
"weather": [
{
"id": 803,
"main": "Clouds",
"description": "broken clouds",
"icon": "04d"
}
],
"base": "stations",
"main": {
"temp": 302.15,
"pressure": 1010,
"humidity": 74,
"temp_min": 302.15,
"temp_max": 302.15
},
"visibility": 10000,
"wind": {
"speed": 5.1,
"deg": 30
},
"clouds": {
"all": 75
},
"dt": 1455166800,
"sys": {
"type": 1,
"id": 8145,
"message": 0.0091,
"country": "SG",
"sunrise": 1455146219,
"sunset": 1455189666
},
"id": 1880251,
"name": "Republic of Singapore",
"cod": 200
}