search

Commonly used CSS tags

One CSS text property

color : #999999; /*text color*/

font-family: 宋体,sans-serif; /*Text font*/

font-size : 9pt; /*text size*/

font-style:itelic; /*text italic*/

font-variant:small-caps; /*small font*/

letter-spacing: 1pt; /*space between letters*/

line-height : 200%; /*Set line height*/

font-weight:bold; /*Bold text*/

vertical-align:sub; /*subscript*/

vertical-align:super; /*superscript*/

text-decoration:line-through; /*Add strikethrough*/

text-decoration: overline; /*Add top line*/

text-decoration:underline; /*underline*/

text-decoration:none; /*No decoration line*/

text-transform: capitalize; /*Capitalize the first character*/

text-transform: uppercase; /*English uppercase*/

text-transform : lowercase; /*English lowercase*/

text-align:right; /*Align text right*/

text-align:left; /*Align text to the left*/

text-align:center; /*Align text in the center*/

text-align:justify; /*Text alignment*/

vertical-align:top; /*Vertically align the top of the largest element within the row of elements/

vertical-align:bottom; /*Vertically align the bottom of the largest element within the row of elements*/

vertical-align:middle; /*Vertical center alignment*/

vertical-align:text-top; /*Vertically align the top of the parent element*/

vertical-align:text-bottom; /*Vertically align the bottom of the parent element*/

The difference between top, bottom, text-top and text-bottom:



2. CSS border blank

padding-top:10px; /*Leave the top border blank*/

padding-right:10px; /*Leave the right border blank*/

padding-bottom:10px; /*Leave the bottom border blank*/

padding-left:10px; /*Leave the left border blank


3. CSS symbol properties

list-style-type:none; /*No mark*/

list-style-type:decimal; /*Arabic numeral mark*/

list-style-type:lower-roman; /*Lowercase Roman numerals, such as: i, ii, iii, iv, v, etc.*/

list-style-type:upper-roman; /*Uppercase Roman numerals, such as: I, II, III, IV, V, etc.*/

list-style-type:lower-alpha; /*lowercase English letter mark*/

list-style-type:upper-alpha; /*uppercase English letter mark*/

list-style-type:disc; /*solid circle mark*/

list-style-type:circle; /*Hollow circle mark*/

list-style-type:square; /*solid square mark*/

list-style-image:url(/dot.gif); /*Customized image tag*/

list-style-position: outside; /*convex row*/

list-style-position:inside; /*indent*/


4. CSS background style

/*Background Color*/

background:transparent; /*Perspective background*/

background-image: url(/image/bg.gif); /*background image*/

background-attachment : fixed; /*watermark fixed background*/

background-repeat : repeat; /*repeat arrangement-web page default*/

background-repeat : no-repeat; /*No repeated arrangement*/

background-repeat : repeat-x; /*repeat on x-axis*/

background-repeat : repeat-y; /*repeat on the y-axis*/

Specify background position

background-position : x% y%; /*Position of x and y axes of background image*/

background-position : top; /*align upward*/

background-position : buttom; /*align downward*/

background-position : left; /*Align left*/

background-position : right; /*Align right*/

background-position : center; /*center alignment*/



5. CSS connection properties

a /*All hyperlinks*/

a:link /*Hyperlink text format*/

a:visited /*Visited link text format*/

a:active /*Format of pressed link*/

a:hover /*mouse to link*/

Mouse cursor style:

Prohibited cursor:not-allowed;

Link finger cursor: pointer

cursor:crosshair

Help cursor (there will be a question mark) cursor:help

Cross arrow cursor:move

Text T-shaped cursor:text

Background program running type cursor:progress

Funnel cursor:wait

Arrow pointing right or right cursor:w-resize or cursor:e-resize

Arrow pointing up or down cursor:n-resize or cursor:s-resize

/*These four values ​​correspond to the first letters of the English letters of southeast, northwest and northwest respectively*/

The arrow points to the upper right or lower right cursor:ne-resize or cursor:se-resize

The arrow points to the upper left or lower left cursor:nw-resize or cursor:sw-resize

/*The first letter of these four values ​​is the first letter of north or south*/

Custom cursor p {cursor:url("cursor file name.ico"),text;}

/*Customized cursors are prone to incompatibility issues, so you need to add a default cursor type*/



6. List of CSS frames

border-top : 1px solid #6699cc; /*top border*/

border-bottom : 1px solid #6699cc; /*bottom border*/

border-left : 1px solid #6699cc; /*left border*/

border-right : 1px solid #6699cc; /*right border*/

The above is the recommended way of writing, but you can also use the conventional way as follows:

border-top-color : #369 /*Set the top color of the border line*/

border-top-width:1px /*Set the top width of the top border*/

border-top-style: solid/*Set the top style of the border line*/

Other border styles

solid /*solid frame*/

dotted /*dotted box*/

double /*double frame*/

groove /*Three-dimensional inner convex frame*/

ridge /*Three-dimensional relief frame*/

inset /*concave frame*/

outset /*convex frame*/



7. CSS border style

margin-top:10px; /*upper border*/

margin-right:10px; /*right margin value*/

margin-bottom:10px; /*Lower border value*/

margin-left:10px; /*left margin value*/

8. Commonly used CSS combinations

Mycss1 {display: Block; Margin: 0px; padding: 0px; white-spie: pre-wrap; "& gt; #ddd; 50px ;font-size:30px;}

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
The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTML and Code: A Closer Look at the TerminologyHTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AM

HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools