Flashcards
HTML + CSS
Cards in this deck (50)
- 1seriffonts that have small stroke at edge of each letter, formal, elegant
- 2sans-seriffonts have clean-lines, modern, minimalistic
- 3monospacefont where all letters have same fixed width, mechanical
- 4cursivefonts that imitate human handwriting
- 5fantasyfonts that are decorative/playful
- 6font-family (property)specifies font of a text
.p1 {
font-family: "Times New Roman", Times, serif } - 7web safe fontuniversally installed across all browsers and devices
- 8fallback fontlist of similar "backup fonts", in the font-family property
- 9font-style (property)mostly used to specify italic text
p.italic {
font-style: italic: } - 10font-weight (property)specifies weight of font
p.thick {
font-weight: bold; } - 11font-variant (property)specifies whether text displayed in small-caps font
p.small {
font-variant: small-caps; } - 12font-size (property)sets size of text
h1 {
font-size: 40px } - 13link stylinga: link
a: visited
a: hover
a: active - 14text-decoration (property)removes underlines from links
a: link {
text-decoration: none; } - 15list-style-type (property)specifies type of list (circle, square, upper-roman, lower-alpha)
ul.a {
list-style-type: circle; } - 16list-style-image (property)specifies an image as the list item marker
ul {
list-style-image: url('sqpurple.gif'); } - 17list-style-position (property)specifies the position of the list-item markers
ul.a {
list-style-position: outside; } - 18display (property)specifies if/how an element is displayed
default: block, inline - 19block-level elementalways starts on new line, and takes up full width available
Examples: , -, , , , . - 20inline elementdoes not start on new line, takes up only necessary width
examples: , , - 21max-width (property)prevents used value of width property from becoming larger than value specified by max width
div.ex1 {
max-width: 500px;
margin: auto;
border: 3px solid #73AD21 - 22border-style (property)specifies what kind of border to display
examples: (dotted, dashed, solid, double, groove) - 23border-width (property)specifies width of four borders
p.one {
border-style: solid;
border-width: 5px;
} - 24border-color (property)specifies color of border, 1-4 values
p.one {
border-style: solid;
border-color: red green blue yellow; } - 25border (property)shorthand property for border-width, border-style (required), and border-color
p {
border: px solid red; } - 26border-radius (property)used to add round corners to an element
p {
border: 2px solid red;
border-radius: 5px } - 27margin (properties)used to create space around elements, top, right, bottom, left
values: auto, length, %, inherit
p {
margin-top: 100px
margin-bottom: 100px;
margin-right: 150 px;
margin-left: 80 px; } - 28margin (single property)shorthand for top, right, bottom, left
p {
margin: 25x 50px 75px 100px
} - 29padding (property)used to create space around an element's content, inside any predefined borders
values: top right bottom left
div {padding: 25 px 50px; } - 30height/width (property)used to set height and width of element (not including padding, border, or margins)
values: auto, length, %, initial, inherit
div {
height: 200px;
width: 50%
background-color: powderblue;
} - 31CSS Box ModelAll HTML elements can be considered as boxes
Path: content, padding, border, margin
div {
width: 300px;
border: 15px solid green;
padding: 50px;
margin: 20px; } - 32outlineline drawn outside the element's border
- 33outline-style (property)specifies the style of an outline, values:
(dotted, dashed, solid, double, groove, ridge, inset, outset, none, hidden)
p.dotted {outline-style: dotted;} - 34outline-width (property)specifies width of outline, values:
(thin, medium, thick, px)
p.ex1 {
border: 1px solid black;
outline-style: solid
outline-color: red;
outline-width: thin; } - 35outline-color (property)used to set color of outline, by name, HEX, RGB, HSL, Invert
p.ex3 {
border: 2px solid black;
outline-style: offset;
outline-color: grey; } - 36outline *shorthand* (property)sets following individual outline properties:
outline-width, outline-style (required), outline-color
p.ex4 {
outline: thick ridge pink; } - 37outline-offset (property)adds space between outline and edge/border of element, space between transparent
p {
margin: 30px;
border: 1px solid black;
outline: 1px solid red;
outline-offset: 15px; } - 38color (property)used to specify color of text by name, HEX, RGB
body {
color: lightblue; } - 39text-align (property)used to set horizontal alignment of text (left, centered, right, justified)
h1 {text-align: center; }
h2 { text-align: left;} - 40text-transform (property)specifies uppercase and lowercase letters in text (uppercase, lowercase, capitalize)
p.capitalize {text-transform: capitalize;} - 41text-indent (property)specifies indentation of first line of text
p {text-indent: 50px} - 42letter-spacing (property)specifies space between characters in text
h1 {letter-spacing: 3px;}
h2 {letter-spacing: -3px} - 43line-height (property)specifies space between lines
p.small {line-height: 0.8;} - 44word-spacing (property)specifies space between words in text
h1 {word-spacing: 10px;} - 45text-shadow (property)adds shadow to text
h1 {text-shadow: 2px 2px;} - 46opacity (property)specifies opacity/transparency of element, 0.0-1.0
img {
opacity: 0.5; } - 47:hover (selector)used to select elements when you mouse over them
img :hover {opacity: 1.0;} - 48gradient (properties)display smooth transitions between two or more specified colors
#grad {
background-image: linear-gradient(red, yellow) } - 49radial gradient (property)defined by center
#grad {
background-image: radial-gradient(red, yellow, green) } - 50box-shadow (property)applies shadow to elements
div {
box-shadow: 10px 10px; }
Information
- Description
- Basic get to know these two awesome languages.
- Created by
- Justina Sadikova
- Views
- 723
- Tags
- Rating