What are the top HTML/CSS tricks every developer should know?

What are the top HTML/CSS tricks every developer should know?

Hi Matthew,

HTML and CSS are the two most basic programming languages of the web. They may seem like they’re not of great importance, but they are. Without HTML and CSS, you wouldn’t be able to display anything on your website.

Fortunately, both of them aren’t very complicated and can be learned relatively quickly. In this post, I want to share with you some simple tips and tricks every developer should know when building websites.

  1. Use percentage widths for fluid grids.

  2. Use the position property for positioning elements with CSS.

  3. Use border-radius to create rounded corners.

  4. Use box-shadow to create shadows around elements.

  5. Use :before and :after pseudo classes to create extra elements in CSS.

  6. Use the float property to place elements next to each other with CSS.

  7. Use media queries to make your site responsive with CSS.

  8. Use web fonts with @font-face rule in CSS.

  9. Use gradients to give vibrant colors to your designs with CSS3 gradients feature.

  10. Use flexbox for easy layouts with CSS flexbox feature

You can go through the following article to know more tricks around CSS:

2 Likes