Showing posts with the label css

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