2018-4-25 HTML Basics

HTML


  1. Understand HTML elements and their composition

1. Understand HTML elements and their composition

HTML is a markup language that consists of individual tags that tell browsers how to build web pages. Just like the DNA in the human body, it controls the composition of the human body. At the same time, just as people think they are born with fat and thin genes, tags in HTML also have characteristics. They include block elements, inline elements, and empty elements.

  • Block elements are like fat man, one person has to make two stools. Block elements generally start on a new line, and the next element also starts on a new line. It is usually used to display structured content on the page, such as paragraphs, lists and the like.
  • The inline element is a skinny, two can make a stool. They usually stand in a row, and change rows when they know they can't stand any longer.
  • An empty element is a seat occupant. is used to insert something at its place. Common img tags

Each element can have its own properties, which contain additional information about the element, and are not displayed on the page. That is, everyone has their own characteristics. These characteristics are innate and acquired, but they are not explicit.

Analyze documents
  • <!DOCTYPE html> document declaration, telling the browser that this is an html file
  • Included content is no longer displayed on the page
  • set encoding format
  • Sets the page title, which appears in the tab.
  • elements displayed on the page

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324863933&siteId=291194637