Introduction to HTML

  • <!DOCTYPE html> is declared as an HTML5 document
  • The <html> element is the root element of the HTML page
  • The <head> element contains the meta data of the document. For example, <meta charset=”utf-8″> defines the encoding format of the web page as utf-8 .
  • The <title> element describes the title of the document
  • The <body> element contains the visible page content
  • The <h1> element defines a headline
  • The <p> element defines a paragraph

Note: On the browser page, use the F12 key on the keyboard to turn on the debugging mode, and you can see the composition tags.

What is HTML?

HTML is a language used to describe web pages.

  • HTML refers to Hypertext Markup Language: H yper T ext M arkup L anguage
  • HTML is not a programming language, but a markup language
  • Markup Language is a set of markup tags (markup tag)
  • HTML uses markup tags to describe web pages
  • HTML document contains HTML tags and text content
  • HTML documents are also called web pages

HTML tags

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

  • HTML tags are keywords surrounded by angle brackets , such as <html>
  • HTML tags usually appear in pairs , such as <b> and </b>
  • The first tag in the tag pair is the start tag , and the second tag is the end tag
  • Start and end tags are also called open tags and closed tags

<label> content </label>

HTML elements

“HTML tags” and “HTML elements” usually describe the same meaning.

But strictly speaking, an HTML element contains a start tag and an end tag, as in the following example:

HTML elements:<p> This is a paragraph. </p>

Web browser

Web browsers (such as Google Chrome, Internet Explorer, Firefox, Safari) are used to read HTML files and display them as web pages.

Browsers are not directly displayed HTML tags, but you can use tags to decide how to display the content of the HTML page to the user:

Leave a Comment