A Web Page Is Text
Welcome to the Web Development path! On it, you'll learn to build websites, put them online and make them do things. This first lesson needs no knowledge at all: in five short exercises, you'll peek at how the web works, and in each of them, you'll change something small on a page.
Let's start with the biggest secret: every web page is a text file. The editor holds one, a very small page called index.html. Its text is written in HTML, the language that says what's on a page. The words in angle brackets, like <h1>, are called tags. You don't see them on the page. They tell the browser what each part of the text is:
<h1>Hello, world!</h1>
<p>This paragraph is waiting for your text.</p>h1 marks the main heading (h for heading) and p a paragraph. Each part starts with an opening tag, such as <h1>, and ends with a closing tag with a slash, </h1>. The other lines in the editor are information for the browser, such as the title in the browser tab. Everything you see on the page is between <body> and </body>.
A browser, such as Chrome, Safari, Firefox or Edge, is a program that reads such a file and draws the page from it: the heading big and bold, the paragraph in normal text. The preview does the same: when you click Run, it reads the file again and shows the page.
By the way, "Hello, world!" is a tradition: it's the first thing most programmers make a computer say. Now it's your turn to make the page say something of your own.
Instructions
- 1
Change the text of the heading, between
<h1>and</h1>, to something of your own, for example your name. Then click Run. - 2
Change the paragraph too: write a sentence about yourself, or about anything you like, and run the page again.