hlw can anyone write a coding program using css.
Answers
Explanation:
please marks as brilliant please
Answer:
Primary header */
header { ... }
/* Featured article */
article { ... }
/* Buttons */
.btn { ... }
Write CSS Using Multiple Lines & Spaces
When writing CSS, it is important to place each selector and declaration on a new line. Then, within each selector we’ll want to indent our declarations.
After a selector and before the first declaration comes the opening curly bracket, {, which should have a space before it. Within a declaration, we need to put a space after the colon, :, that follows a property and end each declaration with a semicolon, ;.
Doing so makes the code easy to read as well as edit. When all of the code is piled into a single line without spaces, it’s hard to scan and to make changes.
Bad Code
1
2
a,.btn{background:#aaa;color:#f60;font-size:18px;padding:6px;}
GOOD CODE
1
2
3
4
5
6
7
8
a,
.btn {
background: #aaa;
color: #f60;
font-size: 18px;
padding: 6px;