Browsers apply default styles to HTML elements. CSS allows you to override these defaults:
List Styles
Change default bullets and numbering styles
Link Appearance
Remove default underline and change colors
Margin & Padding
Override default spacing around elements
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;
}
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