Posts

CSS combinators

  Likewise simple selectors in CSS, we can also combine more than one simple selector is called CSS combinators. There are four types of CSS combinators in the CSS. Descendant selector(space) Child selector(>) Adjacent sibling selectors(+) General sibling selectors(~) Descendant selectors(space) By name, the descendant selectors select all the descendant elements of the specific element. Actually, this is used in the nested elements. Example: div p{ Color: red; } Change the color of all <p> in the div section <div> <p>programgrab</p> <p>programgrab</p> </div> Child selectors(>) This selects all the child element of the specific element Example: div > p{ Color: red; } <div> <p>programgrab</p> <p>programgrab</p> <div class=”header”> <p>programgrab</p> </div> </div> Change the color of all children <p> in the div section and not the second div section. Adjacent sibling sele

CSS selector

Image
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

Image
  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

Image
 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

Hire a programmer

Hire a programmer