How can you integrate CSS on a web page?

How can you integrate CSS on a web page?

Senior Developer Asked on December 6, 2017 in CSS.
Add Comment
1 Answer(s)

    There are three ways of inserting a style sheet in a web page.

    • External style sheet
    • Internal style sheet
    • Inline style

     

    External Style Sheet:

    
    <head>
    
    <link rel="stylesheet" type="text/css" href="css/style.css">
    
    </head>
    
    

    Internal Style Sheet:

    <head>
    
    <style>
    h1 {
    
    color: red;
    
    margin-left: 10px;
    
    }
    
    </style>
    
    </head>
    

     

    Inline style:

    
    <h1 style="color:red;margin-right:10px;">This is a heading</h1>
    
    
    IT Head Answered on January 22, 2018.
    Add Comment

    Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.