Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Embedded or internal Style Sheets in CSS
CSS files can be embedded internally by declaring them in
Syntax
The syntax for embedding CSS files is as follows ?
The following examples illustrate how CSS files are embedded ?
Internal Style Sheet for Styling a div
We have used the
div {
float: left;
margin-left: 20px;
width: 30px;
height: 30px;
background-color: lightgreen;
box-shadow: 8px 5px 0 2px lightcoral;
}
Example
Let us see an exampleb ?
Demo Heading
Internal Style Sheet for Styling div
We have used the
div {
float: left;
margin-left: 20px;
width: 60px;
height: 30px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
background-color: lightgreen;
box-shadow: inset 5px 0 lightcoral;
}
div + div {
background-color: lightblue;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
}
Example
Let us see an example ?
Demo Heading
Internal Style Sheet for Styling Elements for Visibility
In this example, we have set styles for the visibility of elements using the visibility property. We have displayed an element using the visible value ?
h1 {
visibility: visible;
}
We have hidden an element using the hidden value ?
p {
visibility: hidden;
}
Example
Let us see an example ?
Demo Heading
This is set hidden
Advertisements
