Sunday 1 July 2018

WEB DEVELOPMENT LANGUAGE CSS


WEB DEVELOPMENT  (CSS)

What is CSS ?

  • CSS stands for Cascading Style Sheet.
  • CSS defines how HTML elements are to be displayed on screen, paper, or in other media 
  • CSS saves a lot of work. I tcan control the layout of multiple wep pages all at once.
  • External stylesheets are stored in CSS files.


Why Use CSS ?

  • CSS is used to define styles for your web pages ,including the design, layout and variation in display for different devices and screen sizes.


CSS solved  A Big Problem...

  • HTML was never intended to contain tags for formatiing a web page.
  • HTML was created to describe the content of a web page, like:
  • <h1> This is Heading</h1>
  • <p> This is a paragraph</p>

  • When tags like <font> and color attributes,were added to HTML it startes a nightmare for web developers> Development of large websites, where font and color ingormation were added tov every single page become a long and expensive pages.
  • To solve this problem, the World Wide Web Consortium(W3C) created CSS. 

Where To Write CSS ?
  • We can write CSS in a separate file and link it to our HTML file or embed CSS in HTML file itself.
  1. External Style Sheet
  2. Internal Style Sheet
  3. Inline Style

EXTERNAL STYLE SHEET..
  •     External style sheet means when CSS is written in a another CSS file linked to HTML file.
  • <style> tag must be used to write CSS in another CSS file.
  • Their is  specification of type (text/css).
Syntax..                                                                                             

(html file linkes to css file by stylesheet rel)                                          my.css (file)
  <html>                                                                                            body{
<head>                                                                                                      background-color: green;
<link rel= "stylesheet" type="text/css" href = "my.css">                          }
</head>                                                                                             h1{
<body>                                                                                                     background-color: red;
<h1>ROHIT</h1>                                                                                 }
</body>
</html>                                                                   ANS is     ROHIT
                  


INTERNAL STYLE SHEET

  • Internal style sheet means when CSS is included in the same html file.
  • <style > tag must be used to write css in html file.
  • <stye> tag shoule be in <head> tag.
  • Type attribute of style tag specify the type of MIME type (text/css).
  • Internal style sheet is useful when page specific properties need to be applied.
  • Preference is given to Internal style sheet over External style sheet.
Syntax...
<html>
<head>
  <style>
    p{
       background-color: green;
      }
    body{
             background-color: red;
      }
  </style>
</head>
<body>
<p>ROHIT</p>
</body>
</html>

ANS is   ROHIT


INLINE STYLE SHEET
  • Style attribute can be used with tag representing html element
  • The value of style attribute is any CSS property
  • Example (<h1 style="color:green;text-decoration: underline;">This is Heading </h1>
  • Each property name-value pair is terminated with a semicolon.
  • Inline style has more preference given than Internal or External style.
  • Inine style is useful when element specific property need to be applied.

Syntax...
<html>
<head>
<style>
p{
background-color: yellow;
}
</style>
</head>
<body>
<p style="background-color: red;">HTML</p> 
</body>
</html>

ANS is  HTML
Background color is red because yellow color is in internal style sheet but red is in inline style sheet.
CSS representation
http://technolgydrift.blogspot.com/2018/07/web-development-javascript-about.html
( Want to know About Javascript  click on this link ).

https://chat.whatsapp.com/LQwOhM1jvx25uNG5LXxU2f
If you are interested in this and want to learn more about Internet networking Programing Language and Technologies then join my whatsapp group by this link.

we buy cars for cash cash for car cash for cars cash cars we buy junk cars buy junk cars sell my junk car near me sell my car for cash sell car for cash sell my car for cash today cash 4 cars we buy cars for cash Car Removals Sydney https://unwantedcarremovalsydney.com.au Cash for Scrap Cars Service Unwanted Car removals Car Removal Sydney Car Removal Car Removals Car Removals Sydney Car Removals Sydney

1 comment:

( DIGITAL INDIA ) DIGITAL NETWORKING SERVICE

DATA COMMUNICATION AND NETWORKING With the advancement of Data Communication facilities the communication between computers has increa...