If the browser complies with w3c standards, the lang attribute can be used to define the style. The class defines the main style, and the lang attribute can be modified on this basis .,. Html5 documents must start
Lang is an attribute, and the attribute value is en (the definition language is English) or zh-CN (the definition language is Chinese)
If the browser complies with w3c standards, the lang attribute can be used to define styles. The class defines the main styles, and the lang attribute can be modified on this basis,
For example:
Here, the main css of the p tag only defines the font size and color, and then the font needs to be determined through the lang attribute of the tag.
The benefit of the lang attribute lies in its CSS inheritance. Maybe the p tag needs to define many styles, but different languages (not just languages) may need to change a small amount of styles, if these styles are defined separately, CSS may be very lengthy, wasting user traffic and memory.