Skip to main content
CodeSpeedTest
Languages
Start TypingJump into a test — pick any languageAdaptive TrainingUnlock chars as you master them — home row to !@#$%Practice DrillsFocused sessions targeting weak spotsDaily ChallengesNew coding challenges every dayRace ModeCompete against others in real timeAI OpponentRace against an AI at your WPM level
LeaderboardGlobal rankings for every languageCertificatesEarn verifiable Bronze / Silver / Gold certsActivityDaily streaks & historical analyticsProfileYour stats, badges & achievements
Browse Languages500+ languages with real code examplesBlogTips, guides & deep divesFAQCommon questions answeredGetting StartedNew to CodeSpeedTest?AboutOur story & mission
Pricing
Start Typing
Tools/CSS Properties

CSS Properties Reference

Essential CSS properties grouped into six categories — box model, typography, layout, flexbox, grid, and visual effects — each with common values and descriptions.

Box Model

Control spacing, size, and borders around elements.

PropertyExample valueDescription
margin0 autoOuter spacing — shorthand for all four sides
margin-top / right / bottom / left16pxIndividual margin sides
padding1rem 2remInner spacing — shorthand for all sides
padding-top / right / bottom / left8pxIndividual padding sides
border1px solid #cccShorthand: width style color
border-width2pxThickness of the border
border-stylesolid | dashed | dottedBorder line style
border-color#6366f1Border color
border-radius8px | 50%Round corners (or make circles)
width100% | 480pxElement width
height100vh | autoElement height
min-width / max-width320pxClamp width to a range
min-height / max-height100pxClamp height to a range
box-sizingborder-boxInclude padding/border in declared size
overflowhidden | auto | scrollClip or scroll overflowing content

Typography

Control font, size, weight, spacing, and color.

PropertyExample valueDescription
font-familyInter, sans-serifTypeface stack
font-size1rem | clamp(1rem, 2vw, 1.5rem)Text size
font-weight400 | 700 | boldThickness of letterforms
font-stylenormal | italicNormal or italic styling
line-height1.6Vertical spacing between lines
letter-spacing-0.02em | 0.1emSpace between characters
word-spacing0.05emSpace between words
text-alignleft | center | right | justifyHorizontal alignment
text-decorationunderline | none | line-throughUnderline, strikethrough, etc.
text-transformuppercase | capitalize | noneCapitalization
color#18181b | rgb(24,24,27)Text color
white-spacenowrap | pre | normalHandle whitespace and wrapping
text-overflowellipsisWhat to show when text overflows
text-shadow2px 2px 4px rgba(0,0,0,0.3)Shadow behind text

Layout & Positioning

Control how elements are placed in the document flow.

PropertyExample valueDescription
displayblock | inline | flex | grid | noneRendering mode of the element
positionstatic | relative | absolute | fixed | stickyPositioning scheme
top / right / bottom / left0 | 50%Offset from positioned ancestor
z-index10 | 100 | 9999Stacking order (higher = in front)
floatleft | right | noneFloat element to left or right of flow
clearboth | left | rightPrevent floating elements from sitting alongside
visibilityvisible | hiddenShow or hide (hidden still takes space)
opacity0 | 0.5 | 1Transparency (0 = invisible)

Flexbox

One-dimensional layout: rows or columns.

PropertyExample valueDescription
display: flexflexEnable flexbox on the container
flex-directionrow | column | row-reverseMain axis direction
flex-wrapwrap | nowrapAllow items to wrap to next line
justify-contentflex-start | center | space-between | space-aroundAlignment on main axis
align-itemsstretch | center | flex-start | flex-endAlignment on cross axis
align-contentflex-start | center | space-betweenMulti-line cross-axis alignment
gap16px | 1rem 2remSpace between flex or grid items
flex1 | 0 0 auto | 1 1 0Shorthand: grow shrink basis
flex-grow0 | 1How much the item grows
flex-shrink0 | 1How much the item shrinks
flex-basis0 | 200px | autoInitial main size before growing/shrinking
align-selfauto | center | stretchOverride align-items for one item
order0 | -1 | 2Visual order of a flex item

Grid

Two-dimensional layout: rows and columns simultaneously.

PropertyExample valueDescription
display: gridgridEnable grid layout on the container
grid-template-columnsrepeat(3, 1fr) | 200px autoDefine column tracks
grid-template-rowsauto 1fr autoDefine row tracks
grid-template-areas"header" "main" "footer"Named layout areas
grid-column1 / 3 | span 2Column start / end or span
grid-row1 / -1 | span 2Row start / end or span
grid-areaheader | mainPlace item in a named area
column-gap / row-gap16pxSpace between columns / rows
grid-auto-flowrow | column | denseAuto-placement algorithm

Visual & Effects

Backgrounds, shadows, transforms, and transitions.

PropertyExample valueDescription
background#18181b | linear-gradient(...)Shorthand background
background-color#fff | transparentSolid background color
background-imageurl('...') | linear-gradient(...)Background image or gradient
background-sizecover | contain | 100%Scale the background image
background-positioncenter | top leftPosition background image
box-shadow0 4px 12px rgba(0,0,0,0.1)Drop shadow on element
transformtranslateY(-8px) scale(1.02)Translate, rotate, scale, skew
transitionall 0.25s easeAnimate property changes
animationfadeIn 0.4s ease-out forwardsKeyframe animation
filterblur(4px) | brightness(1.2)Visual filters (blur, brightness, etc.)
backdrop-filterblur(12px)Filter behind a translucent element (glassmorphism)
cursorpointer | default | grabMouse cursor appearance

Practice typing these in CodeSpeedTest →

CSS mastery is about repetition. Type real CSS — flexbox layouts, animations, grid definitions — until the property names come without thinking.

Start typing CSS →Take the coding speed test
CodeSpeedTest

Improve your coding speed, code accuracy, and programming syntax WPM with practice sessions across 500+ programming languages.

Quick Links

HomeAboutFeaturesGetting StartedLanguages

Resources

Pro ⚡ PricingCertifyFAQBlogContactLeaderboardRaceChallengesFree ToolsWPM CalculatorPrivacy PolicyTerms of Service

Connect

CodeSpeedTest on GitHubCodeSpeedTest on TwitterEmail CodeSpeedTest

© 2026 CodeSpeedTest. All rights reserved.