HTML and HTML5 Course
About Lesson

Cascading Style Sheet(CSS) is used to set the style in web pages that contain HTML elements. It sets the background color, font-size, font-family, color, … etc. properties of elements on a web page.

There are three types of CSS which are given below: 
Inline CSS
Internal or Embedded CSS
External CSS

Inline CSS :
Inline CSS contains the CSS property in the body section attached with an element known as inline CSS. This kind of style is specified within an HTML tag using the style attribute.

Example:
<p style = “color:#308D46; “>Code4Education </p>
Code4Education

Internal or Embedded CSS :
This can be used when a single HTML document must be styled uniquely. The CSS rule set should be within the HTML file in the head section i.e. the CSS is embedded within the HTML file.

Example:
<head>
        <title>Internal CSS</title>
        <style>
            .main {
                text-align:center; 
}
           </style>
</head>

External CSS:
External CSS contains separate CSS file which contains only style property with the help of tag attributes (For example class, id, heading, … etc). CSS property written in a separate file with .css extension and should be linked to the HTML document using link tag. This means that for each element, style can be set only once and that will be applied across web pages.

Example:
<head>
       <title>Internal CSS</title>
<link rel=“stylesheet” href=“dummy.css”>
 </head>

Exercise Files
No Attachment Found
No Attachment Found
Join the conversation

Introducing Official ApeStaking Protocol for ApeCoin.

New Blur NFT Marketplace Courting Professional.