Computer languages and HTML
To give instructions to a computer, we write code in a programming language. The first languages were close to the way a machine works: only 0 and 1, like a switch that is off or on. This is machine language, and it is very hard for people. Over time, languages grew closer to human speech, with words like ‘print’ and ‘repeat’. A programmer chooses a language by its purpose. One is good for games, another for science, another for pages on the web. Once you have learned one language, the next is easier, because many ideas repeat. HTML is the language for making web pages. It works with text, links, pictures, audio and video, and every browser can read it. Look at the puzzle below. The tags in angle brackets tell the browser what each part is. The browser shows only the content.
1<h1>My kite</h1> 2<p>It is red.</p> 3<p>It flies high.</p>
My kite It is red. It flies high.
1<h1>Cats</h1>Cats
1<h1>Camels</h1> 2<p>They live in deserts.</p> 3<p>They store fat.</p>
Camels They live in deserts. They store fat.
Page puzzle. Draw what the browser shows for these lines: a heading ‘My town’, a paragraph ‘We have a market.’ and another paragraph ‘There is a river.’ Then write the code that makes that page, using h1 and p tags with opening and closing tags. Swap with a partner and check.
1<h1>Nile</h1> 2<p>It is long.</p>