Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basic knowledge points of html css

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, the editor will share with you the relevant knowledge points about the basic knowledge of html css. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

HTML web page composition summary description structure (HTML) HTML is the carrier of web page content. Content is the information that web page makers put on the page for users to browse, which can include text, pictures, videos, and so on. CSS CSS style is performance. It's like the coat of a web page. For example, the title font, color changes, or add background pictures, borders, and so on. All these things that are used to change the appearance of content are called representations. Behavior (JavaScript / jQuery) JavaScript is used to achieve special effects on web pages. Such as: mouse over pop-up drop-down menu. Or mouse over the background color of the table. There is also the rotation of pictures on shopping sites. It can be understood that animated and interactive ones are generally implemented in JavaScript.

HTML file structure

Is the root tag in the HTML page, and the tags in all HTML pages are in.

Here the tag is used to define the header of the document, which is the container for all header elements. Header elements have tags such as, and so on.

The content between and tags is the main content of the web page, such as,

、 、

And other web page content tags, the content in the tags here will be displayed in the browser.

Label syntax

The label is in angle brackets in English

< 和 >

To sum up, such as:

Tags in html generally appear in pairs, divided into the start tag and the end tag. The end tag is one more than the start tag. Some are self-closing tags, such as:

Tags can be nested between tags, but the order must be the same, such as nesting in

Well, then

It has to be in front of it. Such as:

..

Comments cannot be nested, such as:-- >

HTML tags are case-insensitive and are the same, but the World wide Web Consortium (W3C) recommends lowercase.

Commonly used labels. Title break line

...

In the paragraph line

Picture hyperlink. Unordered list. An ordered list. List items. A form. A line. A column. Column headings. Form input box. Drop-down list. Drop-down option Properties

Align= "left" [align= "center", align= "right" left, center right]

Style= "background-color: red" [style]

加载失败提示

[only one item can be set for width and height, and the other will be adaptive]

["target=" _ blank "opens in a new window, default to the original window]

List

...

...

Add attributes type= "" circle Hollow Circle, disc solid Circle (default), square solid Square to the ul tag

Add the attribute type= "1/a/A/i/I" to the ol tag

Form

[OK]

[title column]

[column]

Attributes that can be declared in the table tag

The border of the border= "" table

Width of the width= "" table

Height= "" height

The way the align= "" table is treated.

Bgcolor= "" background color

Attributes that define alignment within the td tag

Align= "" sets the current cell horizontal alignment

Valign= "" sets the vertical alignment of the current cell

Bgcolor= "" sets the background color

Merge cells

Rowspan= "merge the number of cells and merge rows

Colspan= "juxtaposition of the number of merged cells

Form

China

Get: displays all submitted data in the address bar, with some restrictions on the length

Post: put the data to be submitted in the request body. There is no data in the url form.

The submission is in the form of key:value, and the key of the Chinese text box and password box is name, which is the submission data.

Where the checkbox, check box, hidden field, submit button key is name and the value is value

The drop-down list name is the same as the above when the select tag value is submitted when the option tag is submitted, key is name and the value is value

General attribute

Id: the unique number and identification number of the label

Class: the classification of tags used to identify a set of tags.

Style: label style, style

Precedence, margin:0;padding:0;list-style:none, ul, ul, L, d, and h 4 {margin:0;padding:0;list-style:none} style cleanup.

Event attribute

Onblur: lose focus

Onclick: mouse click

Onbdclick: double-click

Onmouseover: move the mouse over the element

CSS

CSS, whose full name is cascading style sheet (Cascading Style Sheets), is mainly used to define the display style of HTML elements (or content) in the browser.

Grammar

The CSS style consists of selectors (selectors) and declarations, which in turn consist of attributes and values

Grammatical description

Property is the property you want to change, and each property has a value. Properties and values are separated by colons and surrounded by curly braces to form a complete style declaration (declaration)

Multiple declarations: if you want to define more than one declaration, you need to use the English semicolon ";" to separate each declaration. Although there can be no semicolons at the end of the last declaration, try to put a semicolon at the end of each declaration.

It is best to describe only one attribute per line

CSS is not case-sensitive, but lowercase is recommended. There is one exception: class and id names are case-sensitive.

CSS comments: / * comment content * /

Authoring location

Method 1: write it in the style attribute of the tag

Font size is represented by px

Method 2: write it in the style tag of the html header (the style tag is usually written between the head tag and the title tag)

P {background-color: yellow;}

Method 3: write it in an external css file, and then introduce the external css file through the link tag

The priority is reduced in turn according to the three ways mentioned above.

Selector

Tag selector: label signature

Id selector: # id (name)

Class selector: .class (name)

Group selector: selector 1, … [use multiple selectors to select a set of elements at the same time, use, separate]

Derived selector: selector 1 selector 2. [according to the context, select the descendant elements of the element and separate them with spaces]

Common style

Color: color:red; or # 00F6DE

Width: width:20px; or% 20

Height: height:20px; or% 20

Background color: background-color: # 00F6DE

Font size: font-size:20px

Text centered: text-align:center

Div Center: margin-left:auto; margin-right:auto

1px solid border: border:1px solid

List to decorate: ul {list-style:none;}

These are all the contents of the article "what are the basic knowledge points of html css". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report