CSS selector

CSS selector: There are five types of selectors used in the CSS language.  Simple selectors Combinator selectors Pseudo-class selectors Pseudo-element selectors Attribute selectors Here, we will discuss the simple selectors of the CSS language. The CSS element selector: By name, this selector is select direct the elements of HTML Example: h1{ Color: red; Background-color:white; text-align:center; } The CSS id selector The id attribute is used in the HTML page for selecting the unique element. These id attributes are also used for styling in the CSS. How to style the id in CSS? For the select elements with a unique id use hashtag(#) followed by the name of the id. Example: #header{ Color: red; Background-color:white; text-align:center; } How to style class in id? The CSS class selector: The class selector selects the element of HTML which uses the class attribute. The dot(.) followed by the class name used for styling the class attribute. Following is an example of the class selector.

Types of CSS (cascading style sheet)

  The cascading style sheet is used to style the webpages of any website which contain different properties to style the webpage e.g control font style, font size, font color,  background color,and much more. There are three types of CSS Inline CSS Internal CSS External CSS Inline CSS The CSS write under the body section, in the HTML tags with style attributes is called inline CSS. Following is the example of inline CSS Example: <!DOCTYPE html> <html> <head> <title>Inline CSS</title> </head> <body> <p style ="color: red; font-size: 40px; font-family: initial; text-align: center;"> Programgrab </p> </body> </html> Internal CSS The CSS write in the head section of an HTML page with the style attribute is called internal CSS.Following is the example of internal CSS Example: <!DOCTYPE html> <html> <head> <title>Internal CSS</title> <style type="text/css">

CSS introduction

  What is CSS? CSS stands for cascading style sheet. Html and CSS are building blocks of any webpages on the website. They have a big hand behind creative webpage on the internet. By using HTML webpage gets a shape but by using CSS webpage gets a beautiful and attractive look Without using HTML, we can not use CSS but without CSS we can use HTML because CSS applies to the HTML of the webpage. Why use CSS? By using CSS, we can change the font style, font color, background color, background image, control the space between paragraph and much more things which are helping to look webpage attractive for the users. How to code in the CSS? CSS is a computer language that is a very high-level language mean user-friendly language. we can easily learn and be taught CSS language. To write the code of the CSS, we use text editors such as notepad,notepad++, etc, or code editors such as sublime, etc. After writing the code of the CSS, require web browsers(google chrome, firefox, etc) to view on t

Find the Armstrong number in cpp

 How to find the Armstrong number in the cpp programming language? Here , you will find the solution to the problem to find the Armstrong number in cpp. Following is the code to find the Armstrong number.First,you know  What is Armstrong Number? A positive number which the sum of cube power of every digit is equal to the original number is called the Armstrong number. For example: Armstrong Number Code: #include <iostream> using namespace std; int main() {     int numb, original, rem, result = 0;     cout << "Enter a three-digit integer: ";     cin >> numb;     original= numb;     while (original != 0) {                  rem = original % 10;                  result += rem * rem * rem;                           original /= 10;     }     if (result == numb)         cout << numb << " is Armstrong number.";     else         cout << numb << " is not Armstrong number.";     return 0; } Output: Enter a three-digit integer

C Program convert octal to binary number

 Here, you will find the solution on how to convert the octal number to binary number in the c programming language. Following is the solution to the problem: Code: #include <math.h> #include <stdio.h> int main() {     int octal,original;     printf("Enter an octal number: ");     scanf("%d", &octal);   original=octal;     int deci = 0, i = 0;     long long bini = 0;     // convert octal to decimal     while (octal != 0) {         deci += (octal % 10) * pow(8, i);         ++i;         octal /= 10;     }     int a = 1;    // convert decimal to binary     while (deci != 0) {         bini += (deci % 2) * a;         deci /= 2;         a*= 10;     }         printf("%d in octal = %lld in binary", original, bini);     return 0; } Output: Enter an octal number: 25 25 in octal = 10101 in binary

C program to convert binary to octal number

 Here,we will find the solution of the conversion of the binary to the octal number system in the c programming language. Following is the solution of conversion: Code: #include <math.h> #include <stdio.h> int main() {     long long bina,original;     printf("Enter a binary number ? ");     scanf("%lld", &bina);          original=bina;     int oct = 0, deci = 0, i = 0;     // convert binary to decimal     while (bina != 0) {         deci += (bina % 10) * pow(2, i);         i++;         bina /= 10;     }     int j = 1;     // convert to decimal to octal     while (deci != 0) {         oct += (deci % 8) * j;         deci /= 8;         j *= 10;     }  printf("%lld in binary= %d in octal", original, oct);    return 0; } Output: Enter a binary number ? 10101 10101 in binary= 25 in octal

C Program convert octal to decimal Number

In this example,we will discuss how to convert octal to decimal number system in the c programming language. Following is the solution to the problem. Code: #include <stdio.h> #include <math.h> using namespace std; int main() {    int octalNumber,originalnumber;     printf("Enter a octal number: ");     scanf("%d", &octalNumber);   originalnumber=octalNumber;     int decimalNumber = 0, i = 0, remainder;     while (octalNumber != 0)      {            decimalNumber += (octalNumber%10) * pow(8,i);         ++i;         octalNumber/=10;     }      printf("%d in octal = %d in decimal", originalnumber, decimalNumber);    return 0; } Output: Enter a octal number: 74 74 in octal = 60 in decimal