Thursday 18 July 2024

Css

 CSS

CSS is the language we use to style a Web page. 

Q.1:-What is CSS? 

Ans:-CSS stands for Cascading Style Sheets.CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.

Three Types of CSS:-
  1. Inline Css
  2. Internal Css
  3. External Css
Q.2:What is Inline CSS?

An inline CSS is used to apply a unique style to a single Line or  HTML element.

Syntax:

<tag style = " "></tag>

Write a program inline Css:--
    
 
<html>
<head>
<title>inline css</title>
</head>
<body>
<h1 style="color:red;" >What is a computer</h1>
<p style="text-align:center ;">Computer is an electronic device</p>
</body>
</html>

Q.3:What is Internal CSS?

Ans:-
An internal CSS is used to define a style for a single HTML page. An internal CSS is defined in the <head> section of an HTML page, within a <style> element.

WAP Internal CSS:----

<html>
<head>
<style>
h1{
color:red;
background-color:yellow;
font-family:Garamond;
}
p{
color:black;
background-color:green;
text-align:center;
}
</style>
<title> internal css</title>
<body>
<h1> Hello ride the classic</h1>
<h1> Marc the original neon series</h1>
<h1> html hyper text markup</h1>
<p>paragraph tag1</p><br>
<p>paragraph tag1</p><br>
<p>paragraph tag1</p><br>
<p>paragraph tag1</p><br>
<p>paragraph tag1</p><br>
<p>paragraph tag1</p><br>
</body>
</html>

Q.4:What is External CSS?
Ans:-
External CSS is a form of CSS which is used to add styling to multiple HTML pages at a time
.

External CSS contains a separate CSS file with a .css extension. The CSS file contains style properties added on selectors.

a. Firstly Create a CSS page To save style.css


       p{
            color:red;
        }


b.Create html page.....



<html>
<head>
<link rel="stylesheet" href="style.css">

<title>Simple html Program</title>
<body>

<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>

</body>
</html>

    

















No comments:

Post a Comment

THANK YOU

Css

  CSS CSS is the language we use to style a Web page.  Q.1:- What is CSS?  Ans:- CSS stands for Cascading Style Sheets . CSS is used to defi...