HTML and CSS Certification Practice Test 2025 - Free HTML and CSS Practice Questions and Study Guide

Question: 1 / 400

True or False: Inline styles in HTML always override external stylesheets.

True

The correct assertion is that inline styles in HTML take precedence over styles defined in external stylesheets. Inline styles are applied directly to an HTML element using the `style` attribute, which is considered to have a higher specificity than styles that might be included in an external stylesheet or even in a `<style>` block within the HTML.

This means that when there is a conflict between an inline style and an external stylesheet, the inline style will override any rules set by the external sheet. This behavior is rooted in the specificity hierarchy established in CSS, where inline styles are given the highest priority compared to external and internal styles.

Other options consider varying scenarios, such as the method of applying styles or the order in which styles are applied, but the fundamental rule that inline styles dominate remains clear. Thus, it's essential to use inline styles judiciously, as over-reliance on them can lead to difficulties in maintaining a clean and manageable stylesheet.

Get further explanation with Examzify DeepDiveBeta

False

Only if specified correctly

It depends on the order of import

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy