INTRODUCTION TO CSS

              INTRODUCTION TO CSS                   

CSS stands for Cascading Style Sheet.CSS is used to design HTML tags.CSS is a widely used language on the web.HTML, CSS and JavaScript are used for web designing. It helps the web designers to apply style on HTML tags.

  CSS Example :                                    

 <!DOCTYPE><html><head>
<style>
h1
{
color:green;
background-color:yellow;
padding:5px;
}
p
{
color:blue;
}
</style>
</head>
<body>
<h1>MY FIRST CSS</h1>
<p>THIS IS MY CSS.</p>
</body>
</html>

     How to Link a CSS with HTML ?EDIT

  1. Create another text file in the same directory as the doc1.html document you created in the first section.
  2. Save your document as: style1.css. This file will be your stylesheet.
  3. In your CSS file, copy and paste this one line, then save the file:
    strong {color: red;}
  1. To link your document to your stylesheet, edit your HTML file. Add the line highlighted here:
    <!DOCTYPE html>
    <html>
      <head>
      <meta charset="UTF-8">
      <title>Sample document</title>
      <link rel="stylesheet" href="style1.css">
      </head>
      <body>
        <p>
          <strong>C</strong>ascading
          <strong>S</strong>tyle
          <strong>S</strong>heets
        </p>
      </body>
    </html>
  2. Save the file and refresh your browser's display. The stylesheet makes the initial letters red, like this:


NOTE:REGARDING THIS DEFINITION AND EXAMPLE ANY QUERIES POST A COMMENT.




Comments

Anonymous said…
Sir I want to know that what is need of css?How IT IS implemented.
eduxcellence said…
Use CSS to define styles for your documents, including the design, layout and variations in display for different devices and screen sizes.
Using CSS, you store the style information in common files that all the pages share.
When a user displays a web page, the user's browser loads the style information along with the content of the page.
When a user prints a web page, you can provide different style information that makes the printed page easy to read.
for implementation you can use our given information with the helpof example .
I think you can easily understand the concepts of your question and if you any other query or suggestion post a commnet.

Popular posts from this blog

Building Weather App using MVVM design pattern (Kotlin)

Basic widgets : Text and Center

4. Do Coding