Skip to main content

CSS

CSS stands for Cascading Style Sheets.CSS is mainly used to present the layout of webpage.Most of facilities which are not available in html are present here.specially colors,fonts and layouts are establish in css sheets.CSS should be saved with .css extension.CSS specifications are maintained by W3C.

CSS can be added in 3 ways.
i)Inline -   By using the style attribute in HTML elements
          This method is used to add style to the specific tag
          Eg: <html>
                <body>
                 <h1 style="color:blue;">hello</h1>
                                                         </body>
                                                        </html>
             
ii)Internal - By using <style> element in the <head> section
                   This is used to add style for a single web page
                     Eg:<html>
                          <head>
<style>
body{background-color: green;}
p{color: red;}
</style>
</head>
<body>
<p>hello</p>
</html>
iii)External By using an external css file
This is used to add style using external style sheet
Eg::<html>
       <head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<p>hello</p>
</html>

Main important things in CSS than HTML
1)CSS colors
  We can insert the color in many ways.
    rgb(red, green, blue)
    hexadecimal value #ff0000
    hsl value(hue, saturation, lightness)
  i)background color
    <h1 style="background-color:DodgerBlue;">Hello World</h1>
  ii)text color
    <h1 style="color:Tomato;">Hello World</h1>
  iii)border color
    <h1 style="border:2px solid Tomato;">Hello World</h1>
  

2)CSS backgrounds
 background-color
   background-color: lightblue;
 background-image
   background-image: url("paper.gif");
 background-repeat
   background-repeat: repeat-x;
 background-attachment
   background-attachment: fixed;
 background-position
   background-position: right top;

3)CSS border
p.dotted {border-style: dotted;}
p.dashed {border-style: dashed;}
p.solid {border-style: solid;}
p.double {border-style: double;}
 
4)CSS margin
  margin-top: 100px;
  margin-bottom: 100px;
  margin-right: 150px;
  margin-left: 80px;

5)CSS boxmodel
Css boxmodel consist content,padding,border and margin.Content is as usual appear of text and images.Padding is a area around content.Border is around the padding.Margin clears an area outside border.
    width: 300px;
  border: 25px solid green;
  padding: 25px;
  margin: 25px;

6)CSS text
   as usual in HTML but some others as follows
     text-decoration: overline;
   text-transform: uppercase;
   text-indent: 50px;

7)CSS icons
  <i class="fa fa-cloud"></i>
 <i class="fa fa-heart"></i>
 <i class="fa fa-car"></i>

8)CSS navigation bar
     Nav bar is very important because of its role now a days website.
<ul>
  <li><a href="default.asp">Home</a></li>
  <li><a href="news.asp">News</a></li>
  <li><a href="contact.asp">Contact</a></li>
  <li><a href="about.asp">About</a></li>
</ul>

9)CSS overflow
  overflow: visible;
10)CSS image gallery
   As usual in HTML we used image code further that call href and div for gallery.
11)CSS tables
    Same as HTML but easily add color or any other format by calling class.
th {
  background-color: #4CAF50;
  color: white;
}
12)CSS lists
ul.a {
  list-style-type: circle;
}

Comments

Popular posts from this blog

  Node.js What is Node.js? Node.js used as back-end (server-side) language in the development. As usual client/user deal with the front end of the applications.There are much process behind that , we call it as back-end.There, we used several languages like Node.js, php and java as server side languages and MongoDB or MySQL as data base. Node.js is an open-source ,cross-platform javascript runtime environment and library for running web applications outside the client's browser.It is a server-side platform built on Google Chrome's javascript engine(V8 Engine).Node.js was developed by Ryan Dahi in 2009 and its latest version is v14.13.0. Node.js applications are written in javascript and can be run within the Node.js runtime on OS X,Microsoft Windows and Linux.                      Node.js = Runtime Environment + JavaScript Library. Reference ( Simplilearn youtube channel, Node.js documentation)

Discussion about the basic LINUX commands

Basic linux commands Linux is an operating system mostly used by programmers to carry out their task efficiently. In Windows we used cmd for CLI,as same for CLI here we used terminal.Here also we used mostly same as cmd key words. cd           - change directory ls             - list mkdir      - make directory rmdir     - remove directory mv          - move man        - manual touch       -   file formation rm           - remove file clear       - clear the on screen lnr          - print cat          - file contents df            - display the used and available space of harddisk su            - switch to another user top      ...

Node.js MongoDB

Now a days all web based application has some database to store the data at the back end. Nodejs frame work have the ability to work with both relational and non relational database. Node.js  MongoDB   NoSQL database mongodb quite fame because of its ability to store the any sort of data at any format.In order work we have to download required module.Mongodb required the module to be installed is mongoose.And also with these modules we can perform many operations.Before that we have to get start mongodb in nodejs. 1.Install MongoDB Driver * We can download from official mongodb driver or open in terminal and execute it     npm install mongodb * Node.js used this module to manipulate mongodb database.   var  mongo = require( 'mongodb' ); 2.Node.js  MongoDB  Create Database To create a database: 1.Create the Mongoclient object 2.Specify the url connection (correct ip address and name of the database want...