Explain the three main ways to apply CSS styles to a Web page


  • Inline: Though this method often goes against best practices, it’s easily done by inserting a ‘style’ attribute inside an HTML element:
    • e.g.) <p style=”color:blue”>Lorem Ipsum</p>
  • Embedded/Internal: Done by defining the head of an HTML document by wrapping characteristics in a <style> tag.
  • Linked/External: CSS is placed in an external .css file, and linked to the HTML document with a <link> tag. This can also be accomplished using the ‘@import’, however, this can slow page load time and is generally not advised.


© 2017