Skip to main content

WHAT IS CSS?ADVANTAGES, SYNTAX.

 CSS PROGRAMMING LANGAUGE                                                                     disadvantages CSS full form is cascade style sheets , which we call it says about how you should display the HTML elements on the screen. CSS tells us the style of the webpage let us take a simple example, if we build a home first we lay out the design that is known as the HTML language. Where the CSS means layout which means giving instructions on how the furniture should be nothing but the CSS. For example if we take PayPal we can see that the background color blue says the CSS background-color property. Netflix is also the best way of saying  CSS property, but if we remove it will be a normal webpage but with the red color and the black plus symbols it looks like the best webpage. Versions of CSS There are different versions available now in case it is developed by Wium we have three versions that are css1, css2, and css3. Currently we are using this css3 version this is the best version fo

WHAT IS CSS LANGUAGE? TYPES, COMMENTS, BORDERS

 WHAT IS CSS


language
Css

  • CSS is Cascading style sheets which is a programming language, that is used to make the website more presentable to the audience. 
  • To make the website good we should apply all these CSS styles to it so that it could reach a greater audience.
  • In  CSS we can add margins, and colors to the text, height, width, and tables, these are some of the things we can do through CSS.
  • There are different software used for CSS Bootstrap, Visual Studio Code, and Notepad++ in each of these there are different ways of saving the code.
  • Easily if I say that difference between HTML and CSS is that, HTML makes the outer appearance of the home, CSS tells which color we need to add or what furniture is what.

BENEFITS USING CSS

  • Helps the page load fast:- HTML takes more time to load the test whereas the css takes less time less time because the code will be in less total.
  • Maintain:- HTML if you want to make any setting you need to change the whole code whereas in CSS just change code at a particular place.
  • Combination of styles:- Provides a number of styles to enhance your webpage.
  • Adjustment of devices- Is a combination of HTML to give better results in mobiles, and tabs.
  • Position changing:- CSS has the advantage of changing the position of the elements in the code.

TYPES OF CSS

  • Inline CSS:- Inline CSS is the style in which we apply it to a particular element we can apply this style by using <style>.
<html>
<head>
<body>
<h2 style="color:green";>this is</h2>
<p style="color:red";>hi</p>
  • As we can see in the above code we are applying the inline to the h2 tag, which appears this be green in color.
  • Internal CSS:- Internal CSS style is that if you want to apply it to a particular document, the style then you can use the internal CSS style.
<html>
<head>
<style>
body{background-color:violet;}
h1{color:red}
</style>
</head>
</body>
  • Applies violet colour to the background red the h1 tag compulsory close the style tag.
  • External CSS:- This is a type of style in which we want to apply it for multiple sheets this is similar to the other types of styles.
<html>
<head>
<link rel="stylesheet"  source="style.css">
</head>
<body>
<h1>laptop</h1>
</body>
</html>

COMMENTS

  • Comments are the part of the code we generally write to explain the user the things more in detail
These are which ignored by the people there are several ways through we can do comments in CSS.
  • Single line commenting:- it is a type of commenting in which we comment to the particular we do it by /* and end it by */.
<html>
<head>
<style>
p{
color: blue;
}
</style>
<body>
/*<h1>this is a bag</h1>*/
</body>
</html>
  • Multiline comment:- Commenting through a comment in multiple lines through the code we do it through /* and */.
<html>
<head>
<style>
/*h2{
color: red;
}*/
<body>
<h2>clock</h2>
</body>
</html>
  • If you want to explain the code in a clear manner what this line of code is you use the comments.
  • Avoid adding too many comments this may lead to a lower level of output.

BORDERS IN CSS
  • Borders are one of the most important features of the CSS programming language, adding borders to the elements is one of the main objectives as it gives the audience a chance to notice it.
  • In order to apply borders we have a specific syntax that is border-style this is the major part but under it, we have further classification.
  • Want the dark border then use a border-style: solid; want a dotted line then replace solid with dotted.
<html>
<head>
<style>
h1.solid{border-style:solid;}
h2.ridge{border-style:ridge;}
</style>
<body>
<h1 class="solid">this is a new line</h2>
<h2 class="ridge">u</h2>
</body>
</html>
  • We can change the width of the borders as we change the color  border-width:6px; 
<html>
<head>
<style>
h1.box{
border-width:9px;
}
</style>
<body>
<h1 class="box">this is the 9 pix</h2>
</body>
</html>





 










Comments

Popular posts from this blog

WHAT IS C LANGUAGE? USES, COMPILER

C LANGUAGE C language compiler, C is one of the most popular languages in programming,  Dennis M.RITCHIE invented C programming in the year the 1970s,  C is a high-level programming language which means, its instructions are away from the understanding of the processor. There is a small difference between C language and C++ that is c does not provide object-oriented support. C++ gives class-based support(ORS) which means the same as the previous line in this blog. WHY LEARN C  LANGAUGE Learning C language and a compiler will be useful for coding. Especially for making a website with C language. If we learn C++ it will be useful for making a website. This means C language is only used for making a website but C++ is used for adding colors background colors etc. C language is one of the straightforward languages means easily understandable language. USES OF C LANGUAGE While the C language is used, in the creation of hardware devices.  It is also used in the OS, that is the operating sy

OPERATORS IN C?ARITHMETIC, ASSIGNMENT....

  O PERATORS IN C                                                                  operators A n op erator is a symbol that acts on data items known as operands in order to process them.   for eg-   a+b   ( "a" and "b" are operands, and "+" is an operator ).               c-a     ( " c "&"a"  both are operands "-" operator ).    We can do addition, subtraction, multiplication, division, etc........ Operand and the operator plays a very important role in the programming language. CLASSIFICATION OF OPERATORS B ased number of operands operating upon, operators are classified into three types. Unary operators(operate upon single operand). Binary operators(operate upon two operands). Ternary operators(three operands). On the type of execution they perform on the operands, operators are classed  into six types Arithmetic operator :-arithmetic operators are the operators which perform addition( + ), subtraction( - ), multipli

FUNCTIONS IN C?CLASSIFICATION, PARAMETERS, LOCAL VARIABLE.

 WHAT IS A FUNCTION                                                                         function A self-contained, named block of code that performs the specific task when called is nothing but a function. Note:-functions are the task performers in C projects.  FUNCTIONS CLASSIFICATION We have 2 types of functions they are user-defined functions and library functions. A pre-created function that comes with C installation is nothing but a library function, For eg:- print () and scanf(). Library functions are ready-made named code blocks. We need not create them, Just use them in our programs. We can make use of this library function by making the library function available to the program and the next step is calling the library function. Our own created function which is the program-created function is nothing but a user-defined function , eg- the main function is the example of a user-defined function. BENEFITS OF USER-DEFINED FUNCTION There are many benefits of user-defined func