Coding Ninjas Logo

Home > CSS Questions > How can you integrate CSS on a web page?

How can you integrate CSS on a web page?



Answer:

There are three methods to integrate CSS on web pages.

  1. Inline method - It is used to insert style sheets in HTML document
  2. example: <p style="color:blue">Hello CSS <p>

  3. Embedded/Internal method - It is used to add a unique style to a single document
  4. example: <style> p{color:blue} <style>

  5. Linked/Imported/External method - It is used when you want to make changes on multiple pages.
  6. example: p{color:blue}
    You need to link this style.css file to your html pages like this: <link rel="stylesheet" type="text/css" href="style.css">


Similar Questions