Crownpeak (Retired)

Do not use inline styles

Why is this important?

Inline styles can override the CSS stylesheet or for a non defined element, apply a style that only works on the page it is set to. As more pages are added to a website it then becomes harder manage changes to the styling since developers would then need to review all pages of the site to ensure that inline styles are updated.

The suggested approach is to use CSS stylesheets that are referenced within each webpage. From a branding perspective having a CSS stylesheet allows a user experience team to define the stlyes of websites to be consistent with the organizations branding colors and design. Changing stlyes for specific elements becomes easier because the use of the stylesheet means that changes that are made there will reflect on all applicable elements within the website.

How can I resolve this issue?

Move any inline styling to your CSS stylesheets.

What topics do this checkpoint affect?

  • Brand

Can you explain how this checkpoint works?

This checkpoint will flag an issue if it finds the style= attribute within a tag on the page. An exemption that is set is if of the style attribute indicates that it is hidden through display none or visibility set to hidden.

Labels (1)

Can't find what you are looking for?

Find Answers

Search our DQM Forum to find answers to questions asked by other DQM users.

Ask a Question

No luck? Ask a question. Our Product and Support teams are monitoring the Forum and typically respond within 48 hours.

Ask a Question