• Blogs (9)
    • 📱 236 - 992 - 3846

      đź“§ jxjwilliam@gmail.com

    • Version: ‍🚀 1.1.0
  • CSS: Priority Scheme

    Blogs20112011-06-22


    Priority scheme for CSS sources (from highest to lowest priority):

    • Author styles (provided by the web page author), in the form of:

      • Inline styles, inside the HTML document, style information on a single element, specified using the “style” attribute
      • Embedded style, blocks of CSS information inside the HTML itself
      • External style sheets, i.e., a separate CSS file referenced from the document
    • User style:

      • A local CSS file the user specifies with a browser option, which acts as an override applied to all documents
    • User agent style

      • Default styles applied by the user agent, i.e., the browser’s default settings for element presentation

    The style sheet with the highest priority controls the content display. Declarations not set in the highest priority source are passed on to a source of lower priority, such as the user agent style. This process is called cascading.