Changing the default behavior of elements

Browsers apply default styles to HTML elements. CSS allows you to override these defaults:

format_list_bulleted
List Styles
Change default bullets and numbering styles
link
Link Appearance
Remove default underline and change colors
space_bar
Margin & Padding
Override default spacing around elements
border_all
Borders & Outlines
Remove or customize default borders
/* Removing default list styles */
ul {
  list-style-type: none;
  padding-left: 0;
}

/* Removing default link underline */
a {
  text-decoration: none;
}

/* Removing default button styling */
button {
  background: none;
  border: none;
  padding: 0;
}

/* Resetting margins and padding */
body, h1, h2, h3, p {
  margin: 0;
  padding: 0;
}
Default vs. Custom Styles
Default Link Style:
Custom Link Style:
Default List Style:
  • Default item 1
  • Default item 2
Custom List Style:
  • Custom item 1
  • Custom item 2