4.2. Use HTML elements for their right semantic purpose

HTML elements must be used for their semantic purpose and not solely for the visual aspect of content.

Tags Use it to Don’t use it to
<a> Mark up a hypertext link Create an action button with no background or border
<hr /> Create a semantic division between distinct groups of content in a text box Create a visual separator line
<fieldset> Group form elements which are related to one another Create a visual border
<q> Mark up a short quote Place quotation marks around non-quoted text

Comments

Add a comment

All fields are mandatory.

Back to top