How websites work
What happens when you open a website, and the three languages that build every web page.
What happens when you open a website? Let's look behind the screen.
When you visit a website
You type a website's address, or tap a link. Your browser sends a request across the internet, asking for that page. A server, a computer that holds the website, sends back the files. And your browser reads those files and builds the page on your screen, all in a second or two.
The three languages of the web
H T M L describes the content and structure, the headings, paragraphs, pictures and links. C S S describes the style, the colours, fonts and layout. And JavaScript adds behaviour, like buttons that do something when you tap them. Think of a website like a house. H T M L is the walls and rooms. C S S is the paint and decoration. And JavaScript is the electricity that makes things work, like the lights and the switches.
HTML uses tags
H T M L uses tags inside angle brackets. H one means the biggest heading. Most tags come in pairs, an opening tag, and a closing tag with a slash. P means a paragraph. And A makes a link. The h ref part says where the link goes.
New word: Domain name
A domain name is a website's address, like Tokanny Faith Foundation dot org. People pay a small yearly fee for a domain name, then connect it to a server that holds their website.
Quick check
Quick check. Which language controls colours and fonts? C S S, the style language of the web. Options: CSS; HTML; JavaScript; English.
Recap
Your browser asks a server for the page, and the server sends the files. H T M L is the content. C S S is the style. And JavaScript is the behaviour.
Key points
- When you open a website, your browser asks a server for the page, and the server sends back the files.
- HTML is the content (headings, text, images, links), CSS is the style (colours, fonts, layout) and JavaScript is the behaviour.
- HTML uses tags in angle brackets, like <h1>, <p> and <a>. Most come in pairs with a closing tag like </p>.
- A domain name is a website's address, like tokannyfaithfoundation.org.
Try it: HTML, CSS or JavaScript?
Sort each part of a website into the language that makes it.