HTML: Your First Web Page
We get to know HTML and learn to create a simple web page with a heading, text, a list, a link and a picture using tags.
All topics (9 of 11)
Chapter 1. Spreadsheets
Chapter 2. Databases
Chapter 3. Computer Networks and the Web
Chapter 4. Number Systems
HTML is a markup language for writing web pages. It is not a programming language: through tags, HTML tells the browser which part of the text is a heading, a paragraph, a picture or a link. A tag is written in angle brackets, and most tags come in pairs: an opening <p> and a closing </p>.
A page is structured like this: <html> wraps the whole document, <head> holds the page title (<title>), and <body> contains everything visible on the screen. The main tags are <h1>…<h6> for headings, <p> for a paragraph, <ul> and <li> for a bulleted list, <a href="..."> for a link, and <img src="..." alt="..."> for a picture. We type the text in an editor (Notepad), save the file with the .html extension and open it in a browser.
Here is the simplest example of a page:
``html
<!DOCTYPE html>
<html>
<head><title>My page</title></head>
<body>
<h1>Hello!</h1>
<p>I am learning computer science.</p>
<a href="https://informatik.uz">Go to the site</a>
</body>
</html>
`
Change the text, save the file and refresh the page in the browser (F5`): the changes appear at once.
Key takeaways
- HTML is a markup language for web pages, not a programming language.
- Tags are written in angle brackets; most come in opening and closing pairs.
- A page consists of
<html>,<head>and<body>parts. - The file is saved with the
.htmlextension and opened in a browser.
Practice tasks
- Type the example above in Notepad, save it as
sahifa.htmland open it in a browser. Change the heading to your own name. - Add to the page an
<h2>heading “My favorite subjects” and a<ul>list with at least three items. - Add one picture (
<img>) and a link (<a>) to a site to the page; do not forget thealttext for the picture.
Review questions
Test yourself: think first, then reveal the answer.
1Is HTML a programming language?Show answerHide answer
No, it is a markup language: it describes the structure of a page rather than running algorithms.2What goes inside the `<body>` tag?Show answerHide answer
Everything visible on the page: text, pictures, links.
0 of 11 topics completed
Sign in to mark