CSS grid cheat sheet; Topics; Navigation; Cheat sheets & checklists. Want a quick review with just a list of all the cheat sheets, checklists & flowcharts on the website? See all the cheat sheets & checklists. Help Learn the Web be the best it can! Send anonymous feedback. GENERAL; Class: String preceded by a period: ID: String preceded by a hash mark: div: Formats structure or block of text: span: Inline formatting: color: Foreground color.
A quick reference list of basic CSS properties for changing text, layout and colour of HTML elements, as well as how to include them in your web page.
CSS Cheat Sheet Author: David Child Created Date: 5/13/2005 4:30:20 PM.
Not sure what CSS is, perhaps see the cascading style sheets introduction first :-)
Using Styles
An external CSS file
Within the html header
Css Cheat Sheet Pdf
Inline in the HTML
Colours & Borders | Top |
---|---|
color: red; | Element Colour - eg. red | #FF0000 |
background-color: white; | Background Colour of element |
background-image: url(image.gif); | Background Colour of element |
border-color: yellow; | Border Colour of element |
border: 1px solid blue; | Width, style and colour of border defined together |
![Cheat Cheat](/uploads/1/1/8/2/118299694/339880912.jpg)
Text Styles | Top |
---|---|
text-align: left; | Horizontal Alignment - left | center | right |
text-decoration: underline; | Text Decorations - eg. none | underline | line-through |
font-family: fontname; | Font Face (Typeface) - eg. Verdana, Arial, Helvetica |
font-size: 16pt; | Font Size or Height - eg. 12pt | 15px |
font-weight: bold; | Font Weight (Boldness) - eg. bold | normal | 200 |
Css Cheat Sheet Pdf 2019
Size and Layout | Top |
---|---|
width: 400px; | Width of HTML element - eg. 100px | 50% |
height: 100%; | Height of HTML element - eg. 20px | 100% |
margin: 5px; | Margin - space around an element, or distance between two elements |
margin-top: 1px; | Top Margin. Also try -bottom: -left: or -right: |
padding: 5px; | Padding - distance between an elements contents and its border |
padding-top: 1px; | Top Padding. Also try -bottom: -left: or -right: |
CSS Lists | Top |
---|---|
list-style: none; | Clear existing bullet types set by html list tags |
Prev | Top | Next