Home >Web Front-end >HTML Tutorial >HTML/CSS Summary 1

HTML/CSS Summary 1

WBOY
WBOYOriginal
2016-09-26 08:27:16908browse

1. Define web page background color

Color can be expressed in 2 ways: 1. Directly specify the color name, such as blue. 2. Use hexadecimal data representation such as #RRGGBB, which respectively represent two digits of hexadecimal data.

2.Set background image

3.Set text color

4.Set link text attributes

alink can be used to set the color of the link when the mouse clicks; vlink can set the color of the visited hyperlink.

5.Set page margins

6.Title tag

...

7. Define page keywords

8. Define page description

9. Define editing tools

10. Define author information

11. Define web page text and language

12. Define scheduled jumps of web pages

Using refresh in http-equiv can not only automatically refresh the page itself, but also realize the automatic jump process between pages.

13.Link

1. Create a basic hyperlink: Link display text

        Attributes: href--specify the link address; name--give the link a name; title--add prompt text to the link; target--specify the target window of the link; the attribute value of the Target parameter: -self--on the current page -Open the link in a new blank window; -blank--Open the link in a new blank window; -top--Open the link in the top-level frame, which can also be understood as opening the link in the root frame; -parent--Open the link in the previous frame of the current frame Layer open link.

2. Create image link

             Linked image

3. Create anchor points

A & lt; a name = "The name of the anchor point" & gt; & lt;/a & gt; anchor point refers to setting an anchor point before creating an anchor point link in a certain position in a given name.

~

14. Form

Generally, the form handler action and the transfer method method are essential parameters.

Action is used to specify the address to which form data is submitted for processing. The handler of the form is the address to which the form is to be submitted, that is, the address of the program to which the data collected in the form will be passed.

There are only two transmission method values, namely get and post. Get--The form data is sent to the URL specified in the action attribute, and then the new URL is sent to the handler. Post--The form data is included in the form body and then sent to the handler.

15. Insert image

      prompt text content”><p>
</p> <p>
</p>16. Add multimedia files<p>
</p> <embed src=”Multimedia file address” width=”Multimedia width” height=”Multimedia height” autostart=”Whether to run automatically” loop=”Whether to loop” ></embed><p>
</p> <bgsound src=”Background music address” loop=”Number of plays”><p>
</p> <p>
</p>17. Insert other tags<p>
</p> Insert space symbol: <p>
</p> Insert special symbols: &...©<p>
</p> <p>
</p>18.Set text format<p></p>
<p> Font is used to control font, font size, color and other attributes; <font face=”Font style”>...</font> You can set different fonts through face. <font size=.. is used to set the font size. ... is used to set the text color.

Bold text, Bold text, Italic text, Italic text, italic text, underlined content, superscripted content, subscripted content

19. Format paragraphs

Paragraph text

, , Non-line text,
Line break mark

20. Horizontal line mark


Enter this tag into the webpage to add a horizontal line with the default style,
,
,
,
,
Use horizontal lines to remove shadows

21.css

1.css: Cascading style sheet. Using CSS can simplify the formatting code of web pages, speed up downloads, reduce the amount of code that needs to be uploaded, and greatly reduce the workload of repeated work. The primary purpose of a style sheet is to accurately position elements on a web page. Secondly, he separates the content structure and format control on the web page, so that the web page can be composed only of content, and the format of the web page is controlled through the css style sheet file

2. The CSS syntax structure only consists of 3 parts, namely selectors, style attributes and values. The basic syntax is as follows:

样 Select the symbol 式 style attribute: take value; style attribute: take value; ...}

3. Basic css selector

          Tag selector: directly use the html tag as a selector such as p selector; category selector: once the tag selector is declared, all the tags in the page will change accordingly; how to use the Id selector and class selector Basically the same, the difference is that the id selector can only be used once in the html page.

4. How to use css

          Link to external style sheet:

L &

: & lt; mark style = "style attribute: attribute value; style attribute: attribute value; ..." & gt;

                                        Embed external style sheets:

          

5. Set css properties

             CSS properties are divided into: type, background, block, box, border, list, positioning, extension.

              css type attributes: Font-family, Font-size, Font-style, Line-height, Text-decoretion, Font-weight, Font-variant, Text-transform, Color

           css background properties: Background-color, Background-image, Background-repeat, Background-attachment (determines whether the background image is fixed in its original position or scrolls with the content), Background-position (X) and background-position (Y ): Specifies the initial position of the background image relative to the element.

性 CSS block attributes: word-spacing: set the spacing of words; letter-spacing: increase or reduce the spacing of letters or characters. vertical-align: Specifies the vertical alignment of the element to which it applies. Text-align: Set the alignment of text in the element. Text-indent: Specifies the degree of indentation of the first line of text. White-space: Determines how to handle whitespace on an element. Display: Specifies whether and how to display the element.

属 CSS box attributes: width and height attribute setting element width and height. Float: Set the side on which other elements float around the element. Padding: Specifies the spacing between the element content and the element border. Margin: Specifies the spacing between the border of one element and another element.

                                                                                                                                                                                                                                                     CSS border attribute: Style: Sets the style appearance of the border. Width: Set the thickness of the element border. Color: Set the color of the border.

                  css list properties: List-style-type: Set the appearance of bullets or numbers. List-style-image: Custom images can be specified for bullets. Click the Browse button to select an image or enter an image path. List-style-position: Set whether the list item text is wrapped and indented and whether the text is wrapped to the left margin.

                                                                                                                                                                                                            css positioning attribute: Position: four optional values: absolute can accurately move the element to the position you want and absolutely position the element. Fixed--Fixed positioning relative to the window. Relative--Relative positioning is relative to the element's default position. Static--This attribute value is the default positioning of all elements. You can use static to cancel inheritance, that is, restore the default value of element positioning. Visibility: If the visibility attribute is not specified, most browsers inherit the value from the parent by default.

                                                                                                                            css extended attributes: Page-break-before: Two of the attributes are used to set page breaks for printed pages. Page-break-after: The page break that appears after retrieving or setting the object. Cursor: Changes the pointer image when the pointer is located on the object controlled by the style. Filter: Apply special effects to the objects controlled by the style.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn