Understanding of HTML and CSS

1, know HTML tags

 HTML stands for Hyper text markup language, HTML , used to define the content and structure of the document. In HTML, all tags are in pairs.

<Html> tag: HTML is the root element of the document, at the beginning, indicating the start page of the document.

<Head> tag: appears at the beginning of the document, the header information indicating the document, such as title information.

<Body> tag: the contents of the main area pages of the document are to be displayed in this tag.

 

 

2, part of the HTML elements

3, the hierarchy of elements

A content of the element may contain other elements, nested hierarchical structure formation; but not nested within each other between the two elements, such as:

 

4, using basic HTML tags

   (1) Title tag: h1-h6, the larger the number the smaller the font, as shown below:

 

Effect is shown below:

 

 

 

 (2) paragraph tag: p (automatically wrap)

(3) within the block-level labels and row labels, tags within the block-level row:

Block-level tags: no matter how much content will be on a separate line, width and height may be provided, and padding the padding, such as h1-h6, p, div, ul and the like;

Inline Label: width height is automatically adjusted according to how much their own content, that is, the size of the content is being stretched, will not on its own line, how much content accounted for, can not adjust the width height; you can set padding, margins only You can set about margins.

                For example: a, strong like;

Inline block-level tags: Comprehensive block elements and inline elements, may be provided height width, may be provided inside and outside margins. For example, the img element.

(4) img: image tag, you can display the picture on the screen, alt (in place of the text), src (path picture).

     

 

(5) br tag, inserts a line break.

(6) hr tab, insert a dividing line, the document can then visually separated into individual portions.

(7) a label, create hyperlinks elements, jump pages or web pages anchor.

 

 

 (8) an ordered list and unordered list

ul> li: unordered list, no order

ol> li: an ordered list, automatically generates a sequence, can be selected and sorted.

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/czy18227988114/p/11486705.html