Q
Which of the following is an advantage of using external CSS files over inline styles?

Answer & Solution

Answer: Option B
Solution:
External CSS files offer easier maintenance and updating of styles since changes made in one file affect multiple pages.
Related Questions on Average

When should inline styles be preferred over external stylesheets?

A). A. When applying styles globally to multiple HTML documents.

B). B. When reusing styles across multiple elements within a single HTML document.

C). C. When applying styles to only a specific element or small set of elements.

D). D. When creating a complex layout requiring extensive CSS rules.

Which of the following is true about the media attribute in the <link> tag when linking CSS stylesheets?

A). A. It specifies the device resolution for which the stylesheet is intended.

B). B. It defines the type of media content the CSS rules apply to.

C). C. It sets the priority of the CSS file for loading.

D). D. It specifies the viewport size for applying responsive styles.

In which section of the HTML document should the <link> tag for external CSS files typically be placed?

A). A. Inside the <head> section.

B). B. Immediately after the opening <body> tag.

C). C. At the end of the HTML document, just before the closing </html> tag.

D). D. Inline within the HTML elements where styles are applied.

In HTML, which tag is used to define inline styles directly within the HTML document?

A). A. <style>

B). B. <link>

C). C. <script>

D). D. <css>

Which CSS property is used to specify the font size of text?

A). A. text-size

B). B. font-size

C). C. size

D). D. font-style

How do inline styles differ from external stylesheets linked using the <link> tag?

A). A. Inline styles are stored in a separate CSS file.

B). B. Inline styles override external stylesheets.

C). C. Inline styles are declared within the HTML document's <style> tag.

D). D. External stylesheets cannot be linked using the <link> tag.

Which of the following is true about linking multiple CSS files using multiple tags?

A). A. Only one CSS file can be linked using the <link> tag.

B). B. Multiple CSS files can be linked, but only one will be applied.

C). C. Multiple CSS files can be linked, and their styles will be combined and applied.

D). D. Multiple CSS files cannot be linked in HTML documents.

What is the purpose of the type attribute in the <link> tag when linking CSS stylesheets?

A). A. It specifies the MIME type of the linked CSS file.

B). B. It defines the rendering mode for the CSS file.

C). C. It sets the relationship between the HTML file and the CSS file.

D). D. It determines the location of the CSS file.

Which of the following HTML tags can be styled using CSS?

A). A. <script>

B). B. <meta>

C). C. <header>

D). D. <body>

Which of the following statements is true regarding the order of precedence in CSS styling?

A). A. Inline styles have the lowest precedence and are overridden by external stylesheets.

B). B. External stylesheets have the highest precedence and override inline styles.

C). C. Styles declared later in the HTML document take precedence over styles declared earlier.

D). D. Styles with more specific selectors override styles with less specific selectors.