Simple HTML tags

HTML tags

Bilateral mark

l tell the browser what the format in which the code translation.

l tell the browser what pages of kanji characters display, do not use the correct character set, the page will be garbled.

L display area of ​​the main content of the page, the middle of the background color bgcolor, background image background (must be in the same file)

title of the page (plain text only)

bold font bold

underline underlined

italic Italic

strike strikethrough

Superscript

subscript

A title, heading up to six, the middle horizontal alignment align.

Paragraph, the level of the middle of its way align (left left, center center, right and right)


 Pre-layout mark, leave all whitespace characters (spaces, line breaks) 
 

Font tag, the middle color color, font size, font face

Generally used in conjunction with css, it is a block element (no matter how much content is always one row) have

Is an inline element, a plurality of line elements will be ranked on the same line, there are , , , , ,

When tag nesting l, typically within the block elements nested row elements.

L, so that the contents of the rolling up direction of the middle of direction (up, down, left, right), the width of the width, height height, background color bgcolor rolling, rolling scrollamount step value, the residence time between the two steps scrolldelay (ms), the number of cycles through the loop

Unilateral mark


Wrap

l which add character set charset, details of the type of content, content type content-type, the page is a text format, HTML text in a small format, utf-8 is a multi-lingual.


Horizontal, it acts as a vertically divided, the middle of the thickness of the horizontal size unit px, color color, the width of the width, to the shadow noshade (no attribute values ​​in HTML).

Character Entities


spaces: represents a half-size space, a character is two bytes, one byte is a half-size space.


<:<

l

:>


&:&


¥:¥


×:×


÷:÷

Bullets

  • Contents 1
  • Content 2
  • The middle of the type of type (tiny black disc, hollow round circle, solid squares square)

    Numbering system

  • Contents 1
  • Content 2
  • No. Type middle of type (value of 1, a, A, i, I), numbered from several start (a number)

    Image tag

    l Syntax: <img attribute = "value">

    l properties: wide width, high height, border thickness border, the src path (relative path), image alignment align (left of text left, middle center text, right text right), the left and right images from hspace text, pictures vspace distance between the upper and lower text.

    hyperlink

    l syntax: <a 属性="值"> ....... Inline elements can not be nested.

    l Properties: display window target address href, target file of the target file (opens in new window _blank, open _self (default) in the current window, _parent opens in the parent window, in the top window open _top), defined anchor link the name of the name

    Divided into absolute and relative addresses.

    Absolute Address: 1, remote absolute address with http: // host domain name.

    2, the absolute address to the local file: /// beginning.

    Relative address: 1, current and target files are siblings, the link address written directly target file name.

    2, the current file and folder where the target is the same level, first find "folder name", find the "File name."

    3, the target file is located in the parent directory, looking up the corresponding directory, find the files in the directory, use the "... /" symbol, the symbol represents a level.

    Special links: 1 Download link: In addition to .html, .htm, .txt, .png, will be prompted to download .gif, .jpg among other browsers can not perform.

    2, E-mail Link:

    3, ordinary air links (#)

    4, JS Link: Add JS function code. The href = "javascript: window.close ()" command to close the window. (You can change the advanced settings of Firefox about: config)

    Html color representation

    Representation: Color word: blue, green, red, yellow

    Decimal: rgb (255,0,0) red, rgb (0,255,0) green, rgb (0,0,255) Blue

    Hex: # FF0000 (red), # 00FF00 (Green), # 0000FF (blue)

    Anchor link

    Meaning: The jump in different areas of a web page. That is the definition of a mark

    Defined anchor point (make a mark):. Naming: may contain letters, numbers, underscores, but can only begin with a letter. Such as:With no content, that this is not a sign to let us see.

    Jump to anchor (mark): ...... Here there must be content, if you do not need the same page in the file name.

    Computer code (character sets)

    The computer can only handle binary data, so we need to encode each character. The so-called coding is that every character can be used to represent different binary.

    ASCII code: one byte (8 bits binary) to represent a character, may represent a total of 2 ^ 8 = 256.

    ANSI code: other countries, are to be extended ASCII encoding used to display native language. ANSI in the Chinese operating system, on behalf of gb2312. Represented, it may represent a total of 2 ^ 16 = 65536 2-byte characters (16 bits binary).

    mark

    Role: provide meta information about the page. For example: search keywords given page.

    l http-equiv functions: analog http protocol header information, when the information to the client from the server tell the browser how to properly display web content. Generally used with the content property, content attribute to specify detailed parameter information.

    n Set Web page character set.

    n pages automatically refresh

    Every two seconds, automatically refresh the page again. 2 seconds, to jump to Phoenix.

    l name attribute: used to set the web search keywords, copyright information, author, etc.

    n Set web search keywords:

    n page description information is provided:

    Table tags

    Structure of a table (row four, the number of unit cell for each row must be equal.)

    Content content content content content content content content

    Form of property

    l border thickness border

    width width l

    l height height

    l table level on its way to align

    l Border Color bordercolor

    l background color bgcolor

    l background image URL Background

    The distance l between the contents of the cell to the edge (filling distance) cellpadding

    The distance l between the cells and the cell cellspacing

    l merged cell border lines, the value all, but good compatibility, preferably substituted with CSS rules

    Line marking property

    Background color line bgcolor l

    The height of the line height l

    L horizontal lines align content center

    Valign l vertical center line, top upper value, in the middle, the bottom

    Cell or attributes

    l is an ordinary cell, a cell header, centered bold.

    cell width width l

    l cell height heigth

    l cell background color bgcolor

    l cell background picture background

    The align level l

    l vertically aligned valign

    l vertically merge cells rowspan

    l colspan about merged cells, combined property must be placed in the first cell, several cells, deletion of some value later.

    Forms

    l concept: mainly used to get the client user data (information). Such as: registration forms, queries, forms, login form.

    l How it works: a form of production in two parts, one is making front page, and the second is the background of the PHP processing form data.

    1, there is a form of web browsing, fill in the necessary information, and then click a button to submit.

    2, the form data, through the Internet, is transmitted to the server.

    3, a dedicated server program, form data validation. If authentication is successful, the data stored in your database (MySQL) to verify the success of the information returned; if the validation fails, the reason for the failure to return verification.

    l form a structure:

    username:

    password:

    <Input type = "submit" value = "submit form" />

    Attribute tag (block elements)

    l name: a name to the form. The name for the main Javascript to use. JS mainly used for client-side form validation.

    l method: submission form, value:

    n get (default): the form data in the form of the address bar, the specified action is added to the processing program, mode request sent to the server. If a form element, do not want to transfer data to the server, then we can not add to it the name attribute.

    u can not submit sensitive data, such as: password.

    u submit only a small amount of data, because of limited length, only transmit about 100 characters.

    u can not upload attachments.

    n post: not append data to form an address, but directly passed to form handler.

    u submit data relative safety

    vast amounts of data can be transmitted u

    u can upload attachments

    l action: to specify the form handler, usually PHP file. If the action is empty, then send the form data to the current file to handle

    l enctype: designated form data encoding (encryption). This property can only be used in the case of method = "post" is. There are two values

    n application / x-www-form  -urldecoded
    default encryption

    n multipart / form-data if you want to upload files, this value must be its own

    Single-line text fields

    l syntax: <input type = "text" attribute = "value" />

    l common attributes:

    n Name: name of the text box. Rules: can contain letters, numbers, underscores and can only begin with a letter.

    n Type: the type of form elements.

    n Value: the value of the text box.

    n Size: length of the text box, the "character" as a unit.

    n Maxlength: maximum number of characters can be entered.

    n Readonly: read-only attribute, you can select, but can not be modified. Value is its own.

    n Disabled: Disable property is not selected, can not be modified. Value is its own.

    n placeholder is the attribute value of the input string text box prompts displayed

    n required = "required" prompt appears, please fill in this field

    One-way password fields

    l syntax: <input type = "password" attribute = "value" />

    l common attributes:

    n Name: name of the password box. Rules: can contain letters, numbers, underscores and can only begin with a letter.

    n Type: the type of form elements.

    n Value: the value of the password box.

    n Size: length of the password box, the "character" as a unit.

    n Maxlength: maximum number of characters can be entered.

    n Readonly: read-only attribute, you can select, but can not be modified. Value is its own.

    n Disabled: Disable property is not selected, can not be modified. Value is its own.

    single button

    l syntax: <input type = "radio" attribute = "value" />

    l common properties

    Name of the element: n Name

    Value n: value of the element, the value of the data sent to the server.

    n Checked: which one is selected by default. Value is its own.

    l Note: a group of radio buttons, only choose one, but the value of the name must be consistent. Radio buttons the user can not enter their own content, the user can select, so you must specify a default value value for it.

    Check button

    l syntax: <input type = "checkbox" attribute = "value" />

    l common attributes:

    Name of the element: n Name

    Value n: value of the element, the value of the data sent to the server.

    n Checked: which one is selected by default. Value is its own.

    l Note: The check box is a set of options, so the name of values ​​must also be consistent. To obtain a plurality of values ​​using an array name of the same name. You can select multiple check boxes at the same time, you can also choose none.

    drop-down list

    l syntax:

    text

    l select only attribute name. option value and attributes are selected by default selected value

    Text area

    l syntax:

    l common attributes:

    Name of the element: n name

    n cols: width, it refers to the number of characters wide.

    n rows: height, it refers to a few lines higher.

    l Tip: between a default text.

    Various buttons

    l submit button:

    l reset button:

    l Picture button: <input type = "image" src = "images relative position" /> function is to submit the form.

    l push button:

    n Normal button itself does not have any function, generally used with JS procedures, the corresponding function.

    Upload file field

    l syntax: <input type = "file" attribute = "value" />

    l common attributes:

    Name of the element: n name

    value n: value of the element, this value is the name of the file to upload, value property is read-only attribute, the value of content only from a manual option to upload a file, not a path is specified by users.

    Hidden Field

    l Function: a box invisible, some values ​​or data transfer, and the content does not want others to see.

    l syntax:

    Table header

    l syntax: Content

    l Tip: Mark is

    Hot picture (image map)

    FIG l is added to a plurality of connected, by default, can only add a link to a map.

    l grammatical structure:

    Labeled common attributes

    n shape: shape of the heat zone, the values: rect (rectangle), Circle (circle), Polygon (polygon)

    n coords: coordinate (position) of the hot zone, if the shape = rect, then, coords = "x1, y1, x2, y2" where (x1, y1) is the upper left corner coordinate value, (x2, y2) for the lower right corner coordinate values. If the shape = cicrle time, then, coords = "x, y, r" where (x, y) coordinates as the center, r is the radius of the circle.

    General framework

    Conceptual framework: a browser window is divided into several small windows, each window displays a small independent website.

    Frameset and frame pages: frameset: mainly used to divide the window. Framework Page: The main window is used to specify the web address displayed by default.

    DTD must be the type of frame:

    l frameset properties (a property with only)

    n cols: left and right divided type frame. Value of "200, " meaning the left frame width of 200px, the rest are right frame. A value of "180 , 180" is intended for the left frame and the right frame 180px respectively, are the remaining intermediate frame. Value "20%, *" is intended to divide a frame to be expressed as a percentage.

    n rows: vertically divided type frame. Value is "200 *" value of the left upper value, a lower value of the right value.

    n frameborder: whether to display border lines of the frame, the values: 1 or 0, yes or no. (The default is none)

    n border: thickness of the border line.

    n bordercolor: the color of the border line.

    l framework Page Properties

    n src: the small window, the default web address displayed.

    n noresize: not adjust the size of the widget. Value is its own.

    n scrolling: whether to display a scroll bar, the value auto (automatic) 1 or 0, yes or no.

    n name: a name to the current small window. The name is to mark the target attribute to use.

    l meaning

    n When your browser does not support frames, display message. Under normal circumstances, IE6 does not support frames, high versions are supported.

    n syntax: Sorry, your computer is too old, the smashed, get a new one! !

    l Note: the frame, the frame may be referred to as normal

    n produced divided into two parts: the page programming and production of the specific frame structure.

    n division structure, not a flag, because there is no actual content.

    Iframe

    l Description: inline frame, is equivalent to an existing Web page, dug a hole through the hole you can see the contents inside, he was the son of marks, it should be placed in.

    l syntax <iframe attribute = "value"> Sorry, your browser version is too low!

    l common attributes:

    n src: import documents address.

    n width: the width of the frame.

    n height: the height of the frame.

    n frameborder: whether to display border lines of the frame, the value: yes or no.

    n scrolling: whether to display a scroll bar, values: yes or no.

    n name: Specifies the name of the small window, the name is also to mark the target attribute to use.

    n align: frame alignment in a web page, the value: left (can be implemented photo-text), center, right (text and graphics can be achieved).

    l Note: src file can only be introduced html file or php file

    Guess you like

    Origin blog.csdn.net/weixin_42987508/article/details/83743344