Getting started: a brief introduction to the basic tags and attributes of HTML

Time:2022-1-7

Html is composed of flags and attributes, which are used together to tell the browser how to display a page of document. Flags are used to refer to document parts such as a paragraph of text or a picture. Attributes are the options of the flag and are decorated in the flag, such as color, alignment, height and width. Many flags appear in pairs. For example, if there is one, the former indicates the start and the latter indicates the table
HTMLIt consists of flags and attributes, which are used together to tell the browser how to display a page of document. Flags are used to refer to document parts such as a paragraph of text or a picture. Attributes are the options of the flag and are decorated in the flag, such as color, alignment, height and width. Many signs appear in pairs. For example, if there is < title >, there is < / Title >, the former indicates the beginning, the latter indicates the end, and the content is placed between the two.
Basic structure mark

<HTML>———- indicates that the file isHTMLfile
< head > ————— contains the title of the file, the script used, the style definition, etc
<TITLE>HELLO WORLD!</ Title > – contains the title of the file, which appears in the browser title bar
< head > ————— < / head > end flag
< body > ——– place all flags and attributes of information displayed in the browser, where the content displays < / body > in the browser
</HTML> ———-<HTML>End flag of
Other main signs all the following signs are used in < body > < / body >

< a href = “…” > < / a > ———– link flag, “…” is the file address of the link
< img SRC = “…” > ————— display the picture flag, “…” is the address of the picture
< br > ———– line break flag
<P> ———- segment mark
<B> < / b > ———– bold font
<1> < / I > ———– use italics
< HR > ———– horizontal line drawing
< Table > < / Table > ———– define the table,HTMLImportant signs in
< tr > < / TR > ———– defines the row of the table, which is used in < Table > < / Table >
< td > < / td > ———– table cell, used in < tr > < / TR >
< font > < / font > ————— font style flag
Property usage:

The attribute is used to decorate the flag, and the attribute is placed in the start flag.
For example, the attribute bgcolor = “black” indicates that the background color is black. Examples of reference attributes: < body bgcolor = “black” > < / body > indicates that the page background color is black, < table bgcolor = “black” > < / Table > indicates that the table background color is black.
Common attributes: alignment attribute range attribute
Align = left align left (default) width = pixel value or percentage object width
Align = center center height = pixel value or percentage object height
Align = right right align color attribute
Color = #rrggbb foreground color reference color comparison table
Bgcolor = #rrggbb background color