Reset CSS
- Used to normalize browser’s default styles.
- It is required due to browsers’ inconsistency.
- Rendering could be different from browser to browser
- Every browser has its own default ‘user agent’ stylesheet.
- For example, most browsers by default make links blue and visited links purple, give tables a certain amount of border and padding, apply variable font-sizes to H1, H2, H3 etc.
css reset code
*, *::before, *::after { box-sizing: border-box; } body, figure, blockquote, dl, dd, ul { margin: 0; padding: 0; } ul[role='list'], ol[role='list'] { list-style: none; } html:focus-within { scroll-behavior: smooth; } img, picture { max-width: 100%; display: block; } input, button, textarea, select { font: inherit; } @media (prefers-reduced-motion: reduce) { html:focus-within { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }