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 differen...

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

BASIC PROGRAM IN C LANGUAGE? INCLUDE, HEADER.

SIMPLE PROGRAM TO PRINT NAMES ON                     CONSOLE USING C LANGUAGE #include <stdio.h> which means that <stdio.h> is the header file that says, that standard input and output header file, so every time there is a format writing the c language program that is the starting line of the code. And Include is the command that we use in the program to include the header file <stdio.h> and this file contains the Printf function means to, display any text onto the console. To use the print function, we need to use #include<stdio.h> then only the print function can be accessed otherwise not.   The first line of the code of the program is, #include<stdio.h> this is the most compulsory step we can say in a c program.                                                    ...

ARRAYS IN C?SCALAR VARIABLE,DISADVANTAGES

SCALAR VARIABLE:-                                                       A  scalar variable is that which can hold only one value it is known as a scalar variable. For eg:- int a=10;                          a=30; DISADVANTAGES OF SCALAR VARIABLE :-      Whenever multiple data items are required to be in the computer memory and access those data items scalar variables have 2 limitations: increase code and performance problems. AGGREGATE VARIABLE:- A variable that can hold multiple values(data items) is known as an aggregate variable. WHAT IS AN ARRAY :- An array is an index-based collection of homogenous elements, the array is a collection of  (continuous) memory locations referred to by a common name that can hold multiple values. Is a subscripted variable that can...

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 ...