HTML Introduction

Example

<html>
<body>
<h1>My first title</h1>
<p>My first paragraph.</p>
</body>
</html>

Try it yourself

What is HTML?

HTML is a language used to describe web pages.

  • HTML refers to HyperText Markup Language (Hyper Text Markup Language)
  • HTML is not a programming language, but amarkup language (markup language)
  • A markup language is a set ofmarkup tags (markup tag)
  • HTML usesmarkup tagsto describe web pages

HTML tags

HTML markup tags are usually called HTML tags (HTML tag).

  • HTML tags are made up ofangle bracketssurrounding keywords, such as <html>
  • HTML tags are usuallyoccur in pairssuch as <b> and </b>
  • The first tag in a tag pair isOpening tags,the second tag isClosing tags
  • are also known asOpening tagsandClosing tags

HTML documents = web pages

  • HTML documentsdescribe web pages
  • HTML documentscontaining HTML tagsand plain text
  • HTML documents are also known asWeb Page

The role of a web browser is to read HTML documents and display them as web pages. Browsers do not display HTML tags but use tags to interpret the content of the page:

<html>
<body>
<h1>My first title</h1>
<p>My first paragraph.</p>
</body>
</html>

Example Explanation

  • Text between <html> and </html> describes a web page
  • Text between <body> and </body> is visible page content
  • Text between <h1> and </h1> is displayed as a title
  • Text between <p> and </p> is displayed as a paragraph