MindMap Gallery HTML-5 and CSS3
HTML5 is the fifth major revision of Hypertext Markup Language HTML, which is primarily designed to improve compliance and enhance compliance by making it easier for web developers and browser creators to follow consensus-based standards. CSS3 is an upgraded version of CSS technology. It is a computer language used to express file styles such as HTML or XML. This diagram summarizes the relevant knowledge.
Edited at 2022-11-05 22:30:51This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
HTML-5 and CSS3
CSS3
Summarize
Master the usage of CSS styles and style rules. Common basic font style attributes and tag selectors can also be used proficiently. For CSS backgrounds, you can also master and apply such as background color, background image address, background tiling, background scrolling, and background position.
CSS background
Background color: background-color
Background image address: background-image
Syntax: background-image : none | url (url)
Parameters: none: No background image (default) url: Use absolute or relative address to specify the background image
Background tiling: background-repeat
Syntax: background-repeat : repeat | no-repeat | repeat-x | repeat-y
repeat: The background image is tiled vertically and horizontally (default)
no-repeat: The background image is not tiled
repeat-x: The background image is tiled horizontally
repeat-y: The background image is tiled vertically
Background position: background-position
grammar:
background-position : length || length background-position : position || position
parameter:
length: Percentage | length value consisting of a floating point number and a unit identifier
Sets or retrieves the object's background image position. The background-image attribute must be specified first. The default value is: (0% 0%). If only one value is specified, that value will be used for the abscissa. The ordinate will default to 50%. The second value will be used for the ordinate
Whether the background is fixed or scrolling: background-attachment
grammar:
background-attachment : scroll | fixed
parameter:
scroll: The background image scrolls with the object content fixed: The background image is fixed
CSS appearance properties
color: value of text color
1. Predefined color values, such as red, green, blue, etc.
.Hexadecimal, such as #FF0000, #FF6600, #29D794, etc. In practice, hexadecimal is the most commonly used way to define colors.
RGB code, such as red can be represented as rgb(255,0,0) or rgb(100%,0%,0%).
line-height: line spacing
The ine-height attribute is used to set the line spacing, which is the distance between lines, that is, the vertical spacing of characters, generally called line height. There are three commonly used attribute value units for line-height, namely pixel px, relative value em and percentage %. The most commonly used unit in actual work is pixel px.
text-align: horizontal alignment
The text-align attribute is used to set the horizontal alignment of text content, which is equivalent to the align attribute in HTML.
left: left aligned (default value)
right: right aligned
center: center alignment
text-indent: first line indent
The text-indent attribute is used to set the indent of the first line of text. Its attribute value can be a value in different units, a multiple of the em character width, or a percentage relative to the width of the browser window. Negative values are allowed. It is recommended to use em as Set units.
letter-spacing: letter spacing
The letter-spacing attribute is used to define word spacing, which is the space between characters. Its attribute values can be values in different units, negative values are allowed, and the default is normal.
Set color transparency (css3)
color: rgba(r,g,b,a) a means alpha, which means transparency. The value range is between 0 and 1. color: rgba(0,0,0,0.3)
Selector
Tag selector (element selector)
Tag selector refers to using HTML tag name as selector
Tag name {Attribute 1: Attribute value 1; Attribute 2: Attribute value 2; Attribute 3: Attribute value 3; } or
Element name {Attribute 1: Attribute value 1; Attribute 2: Attribute value 2; Attribute 3: Attribute value 3; }
class selector
The class selector is identified by "." (English dot), followed by the class name
.Class name {Attribute 1: Attribute value 1; Attribute 2: Attribute value 2; Attribute 3: Attribute value 3; }
Multiple class name selector
We can specify multiple class names for tags to achieve more choices.
id selector
The id selector is identified by "#", followed by the id name.
#id name {Attribute 1: Attribute value 1; Attribute 2: Attribute value 2; Attribute 3: Attribute value 3; }
wildcard selector
Use wildcard selectors to define CSS styles that clear the default margins for all HTML tags.
* {
margin: 0; /* define margins*/
padding: 0; /* define padding */
}
Pseudo class selector
Pseudo-class selectors are used to add special effects to certain selectors. For example, add special effects to links. For example, you can select the 1st and nth elements.
In order to distinguish it from the class selector we just learned, the class selector is a dot, such as .demo {}, while our pseudo-class uses 2 dots, which is a colon, such as :link{}
Link pseudo-class selector
:link /* Unvisited link */
:visited /* Visited links */
:hover /* Move the mouse to the link */
:active /* selected link */
CSS compound selector
A compound selector is composed of two or more basic selectors, combined in different ways, in order to select more accurate and detailed target element tags.
Intersection selector
The intersection selector consists of two selectors, the first of which is the label selector and the second is the class selector. There cannot be a space between the two selectors.
Union selector
The union selector (CSS selector grouping) is formed by connecting each selector with a comma. Any form of selector (including label selector, class selector, id selector, etc.) can be used as a union selector. part. If the styles defined by some selectors are exactly the same, or partially the same, you can use the union selector to define the same CSS style for them.
descendant selector
The descendant selector, also known as the inclusion selector, is used to select the descendants of an element or element group. It is written by writing the outer tag in front and the inner tag in the back, separated by spaces. When tags are nested, the inner tag becomes a descendant of the outer tag.
Child element selector
Child selectors can only select elements that are children of an element. The way to write it is to write the parent tag at the front, the child tag at the back, and connect it with a > in the middle. Note that there is a space left on the left and right sides of the symbol.
attribute selector
Selectors whose tags have certain special attributes are called attribute selectors.
Pseudo element selector (CSS3)
E::first-letter The first word or character of the text (such as Chinese, Japanese, Korean, etc.)
E::first-line The first line of text;
E::selection can change the style of selected text;
Three ways to introduce CSS
Inline (inline style)
<Tag name style="Attribute 1: Attribute value 1; Attribute 2: Attribute value 2; Attribute 3: Attribute value 3;"> Content </Tag name>
The role of CSS
The emergence of CSS saved the messy HTML and even more saved us web developers. Make our web pages more colorful.
First introduction to CSS
CSS is usually called CSS style sheet or cascading style sheet (cascading style sheet). It is mainly used to set the text content (font, size, alignment, etc.) and image appearance (width and height, border style, margins, etc.) in HTML pages. etc.) as well as the layout and other appearance display styles of the layout.
CSS is based on HTML and provides a wealth of functions, such as font, color, background control, and overall layout. It can also set different styles for different browsers.
CSS style rules
1. The selector is used to specify the HTML object that the CSS style is applied to. The curly brackets are the specific styles set for the object.
2. Attributes and attribute values appear in the form of "key-value pairs".
3. Properties are style properties set for the specified object, such as font size, text color, etc.
4. Use English ":" to connect attributes and attribute values.
5. Use English ";" to distinguish between multiple "key-value pairs".
Demonstration of alignment of paragraphs and tables is available.
CSS font style properties
font-size: font size
px: commonly used pixel unit
em: font size relative to the text within the current object
in: inches
cm: Centimeter
mm: millimeter
pt: point
font-family: font
The font-family property is used to set the font. Commonly used fonts in web pages include Song Dynasty, Microsoft YaHei, HeiTi, etc. For example, to set the font of all paragraphs of text in a web page to Microsoft YaHei, you can use the following CSS style code:
Usage: p{ font-family:"Microsoft Yahei";}
CSS Unicode font
It is possible to set the font name in CSS and write Chinese directly. However, garbled errors will occur when the file encoding (GB2312, UTF-8, etc.) does not match. XP system does not support Chinese similar to Microsoft Yahei.
Option 1: You can use English instead. For example font-family:"Microsoft Yahei"
Option 2: Use Unicode encoding directly to write font names in CSS to avoid these errors. Use Unicode to write Chinese font names, and the browser can parse them correctly. font-family: "\5FAE\8F6F\96C5\9ED1" means setting the font to "Microsoft Yahei".
font-weight: font weight
The font-weight attribute is used to define the thickness of the font. Its available attribute values are: normal, bold, bolder, 100~900 (integer multiples of 100).
font-style: font style
For example, italic: {font-style:italic}
font: Comprehensive setting of font style (key point)
Selector {font: {font-style} {font-weight} font-size font-family;}
When using the font attribute, it must be written in the order in the above syntax format. The order cannot be changed. Each attribute is separated by spaces. The attributes that do not need to be set can be omitted (take the default value), but the font-size and font-family attributes must be retained, otherwise the font attribute will not work.
HTML5
Summarize
Today I learned the skeleton format of HTML. I am proficient in the tag classification and relationship of HTML and understand the UTF-8 character set.
Learn how to create forms and tables
Understand the difference between img relative path and absolute path
Familiar with new features of h5
imput control
label label (understanding)
The label tag defines the label (label) for the input element.
Function: Used to bind a form element. When the label is clicked, the bound form element will gain input focus.
How to bind elements?
The for attribute specifies which form element the label is bound to.
textarea control (text area)
Drop-down menu
<select> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> ... </select>
list tag
Unordered list ul (emphasis)
ordered list ol
table table
tr represents how many lines
td represents how many columns
Path (Key Points, Difficulties)
relative path
A directory path created based on the location of the web page that references the file. Therefore, when web pages saved in different directories reference the same file, the paths used will be different, so it is called a relative path.
The image file and HTML file are in the same folder: just enter the name of the image file, such as <img src="logo.gif" />.
The image file is located in the lower-level folder of the HTML file: enter the folder name and file name, separated by "/", such as <img src="img/img01/logo.gif" />.
The image file is located in the lower-level folder of the HTML file: enter the folder name and file name, separated by "/", such as <img src="img/img01/logo.gif" />.
absolute path
An absolute path is a directory path based on the root directory of the Web site. It is called absolute because it means that when all web pages reference the same file, the paths used are the same.
"D:\web\img\logo.gif", or the complete network address, such as "http://www.baidu.com/images/logo.gif".
Link tag (emphasis)
<a href="Jump target" target="How the target window pops up">Text or image</a>
href: used to specify the URL address of the link target. When the href attribute is applied to a tag, it has the function of a hyperlink. Abbreviation for Hypertext Reference. means hypertext citation
target: used to specify the opening method of the linked page. Its values include self and blank. Self is the default value and blank is the opening method in a new window.
External link needs to be added http:// www.baidu.com
<img src="Image URL" />
HTML common tags
Title tags h1~h6
paragraph tag p
dividing line<hr/>
Line break tag<br/>
Image tag img (emphasis)
The src attribute in this syntax is used to specify the path and file name of the image file. It is a required attribute of the img tag.
HTML tag relationships
1. Nested relationship
2. Parallel relationship
HTML tag classification
single label
double label
<tag name> content </tag name>
Write the first html page
2
HTML tags:
1. Acts as a root node for all tags in HTML. Largest tag root tag
2. head tag: the head of the document
The header of the document describes various attributes and information of the document, including the document's title, location on the Web, and relationship with other documents. The data contained in the header of most documents will not actually be displayed to readers as content.
Note that the tag we must set in the head tag is title
3.title tag: the title of the document
4. Body tag: the main body of the document. From now on, our page content will basically be placed in the body.
The body element contains all the content of the document (such as text, hyperlinks, images, tables, lists, etc.)
Web standard composition
1
Structural standards: Structure is used to organize and classify web page elements. We mainly learn HTML.
Performance standards: Performance is used to set the layout, color, size and other appearance styles of web page elements, mainly referring to CSS.
Behavioral standards: Behavior refers to the definition of web page models and the writing of interactions. We mainly learn Javascript.
Benefits of Web Standards
0
1. Make the development prospects of the Web broader. 2. Content can be accessed by a wider range of devices. 3. Easier to be searched by search engines. 4. Reduce website traffic costs. 5. Make the website easier to maintain. 6. Improve page browsing speed.
Web standards (emphasis)
Through the different kernels of the above browsers, we know that their working principles and analysis must be different, and the display will be different.
Get to know the web page
Web pages are mainly composed of text, images, hyperlinks and other elements. Of course, in addition to these elements, web pages can also contain audio, video, Flash, etc.