Advertisements
Advertisements
Question
Write a CSS file to define text color and alignment to <p> tag.
Answer in Brief
Advertisements
Solution
Mystyle.css
P {
Text-align: center;
color : MediumSeaGreen;
}
--- CSS_Test.htm ---
<html>
<head>
<title> Demonstration of using CSS </title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<H1> Welcome to CSS </H1>
<P>
CSS was invented by HakonWium Lie on October 10, 1994 and
maintained through a group of people within the W3C called the
CSS Working Group. The CSS Working Group creates documents
called specifications. When a specification has been discussed and
officially ratified by W3C members, it becomes a recommendation.
</P>
<body>
<html>shaalaa.com
Introduction to CSS
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
The extension of CSS file is ______.
What is selector?
The Declaration block of CSS is surrounded by
What is the property to set text as bold?
Which of the following ways below is correct to write a CSS?
What is CSS?
What is Inline Style?
Write down general format of CSS declaration.
What are the advantages of using CSS? Advantages of CSS
Write a short note on rule of CSS.
