Answer & Solution
<style>
tag specifies the type of stylesheet being used, typically set to 'text/css'.
<style>
tag is used to specify the type of stylesheet being used?
<style>
tag specifies the type of stylesheet being used, typically set to 'text/css'.
Which attribute is used in the <link>
tag to specify the location of the external CSS file?
A). A. src
B). B. rel
C). C. href
D). D. type
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
Which of the following is an advantage of using external CSS files over inline styles?
A). A. Increased specificity of CSS rules.
B). B. Easier maintenance and updating of styles.
C). C. Faster rendering of web pages.
D). D. Inline styles allow for greater control over individual elements.
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.
What is the primary disadvantage of using inline styles?
A). A. Increased file size of the HTML document.
B). B. Difficulty in maintaining consistency across multiple elements.
C). C. Limited scope for applying complex CSS rules.
D). D. Slower rendering of web pages.
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 of the following HTML tags can be styled using CSS?
A). A. <script>
B). B. <meta>
C). C. <header>
D). D. <body>
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.
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.
What is the primary purpose of using the <link>
tag to link CSS stylesheets in HTML?
A). A. To apply CSS styles inline
B). B. To define CSS styles within the HTML file
C). C. To link an external CSS file to the HTML document
D). D. To embed CSS styles directly into the HTML document