5 HTML and CSS Good Practices

5 HTML and CSS Good Practices

Many developers don’t use it efficiently. They either duplicate the text around the picture or don’t add it at all. The alt-text is not a duplicate title. It helps screen reader users understand what is shown in the picture. You can use alt to describe external characteristics of the product

Button type=button Is Better Than an href=”#”

Browsers still think it’s a link because it is still in the context menu

Take Care of Those Users Who May Experience Dizziness, Nausea, and Headaches

WCAG 2.3.2.3 says that some users may experience dizziness, nausea, and headaches when they see animations that trigger moving elements.

justify-content: space-between Causes Unexpected Markup

When we use these values, we don’t think that the number of items may change.

justify-content and align-items lose items

These properties ignore the size of flex items, so if flex items are larger than the flex container, they will go beyond its borders and may not be displayed correctly.

Source

Get in