How to use css in simple HTML application

Ads

 
 

Share on Google+Share on Google+

Bhausaheb Sangale
How to use css in simple HTML application
1 Answer(s)      5 years and 8 months ago
Posted in : HTML

Please give simple example for understanding purpose

Ads
View Answers

March 16, 2012 at 8:22 PM


<html>
<head>
<style type="text/css">
p { color:red;}
</style>
</head>
<body>
<p>
This is normal paragraph text 
</p>
</body>
</html>

CSS is usually used when you want to separate the webpage's content and all the formatting stuff.

To use CSS in you're webpage, you must set the style type as " text/css" within the 'head' tag.

<head>
<style type="text/css">

</style>
</head>


while all the CSS code should be typed within the style tag.

Now the syntax goes something like this :
element { property : value;}

In the above example, I used the 'color' property to change the font color of contents under the 'p' tag a.k.a element to red.

p { color:red;}

Ads









Related Tutorials/Questions & Answers:
How to use css in simple HTML application
How to use css in simple HTML application   Please give simple example for understanding purpose
HTML CSS
HTML CSS  Explain in brief about the term CSS
Advertisements
HTML CSS example
HTML CSS example  Hi, Can anyone share the HTML CSS example code. I my HTML web page I have to embed the CSS style. Share some HTML CSS example with me. Thanks   Hi, You can use the following code to define CSS
Include CSS in HTML
Include CSS in HTML  Can any one tell me how to include a CSS file into my HTML page. A code format to include the CSS will work. Thanks in Advance.   Include CSS in HTML To include a CSS or Style Sheet into you HTML
how to use ajax in html file
how to use ajax in html file  <!DOCTYPE html PUBLIC "-//W3C//DTD...; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <..." /> <meta http-equiv="Content-Type" content="text/html; charset
how to use a image in background in your application form?
how to use a image in background in your application form?  how to use a image in background in your application form
How could I use Socket in my application?
How could I use Socket in my application?  I created an application dealing with the management of a supermarket using Hibernate and Swing. I found out today that I have to use also Socket and I don't know exactly what I could do
html+css - Java Beginners
html+css   Davgan Financial Services... clients. We act efficiently, honestly and fairly. Why use... by css body { margin: 0; padding: 0; background-color
What is HTML 5 and CSS 3
and mobile application at present time. As we have already learned that HTML 5 and CSS...What is HTML 5 and CSS 3 HTML 5 and CSS 3 are the standard versions of the basic HTML and CSS language, which is used to create more interactive web pages
html+css - Java Beginners
html+css   Akido NEXT EVENT: Radio InterviewMore Information Home Blog Music... reserved Worldwide css /* Theme Name: akido Theme URI
html+css - Java Beginners
html+css   Cunningham Location Siteplan Lots News Contact us... development by | Website by   css body
How to download ,install and use jQuery in the web application?
How to download, install and use jQuery in the web application? jQuery.... Here is the video tutorial of "How to download, install and use jQuery?": In this video we will and learn how to download, install and use J Query
How to add background image to div using CSS?
How to add background image to div using CSS
Simple HTML example
Simple HTML example In this section we will give you very simple example of a HTML page. After reading this page you should be able to create simple HTML... can use HTML with JavaScript to create more dynamic WebPages. These days HTML
How to use web service in J2ME application(MIDP) - MobileApplications
How to use web service in J2ME application(MIDP)  I have created two separate application, one that has J2ME Midlet application and another has web service. Now i want to call that web service in my Midlet application so how
How to use request.getparameter?
will show you how can you use the getParameter() method in your JSP application with the help of a simple example. Moreover, you can use the JSP codes...How to use request.getparameter? In this section of tutorial we will explain
how can i use toggle button in my application
how can i use toggle button in my application  i want a on/off toggle button by dragging left-right..not by pressing on button
Simple application using hibernate
Simple application using hibernate  Hi, How to write a simple application using hibernate in Eclipse IDE? I would like to to learn: Process... of the tutorial you will like to learn for creating the simple application using
Java HTML Client Application
Java HTML Client Application  Java HTML Client Application
how to make use of jerry's java image processing filter in java application?is there anyway to do this?
how to make use of jerry's java image processing filter in java application?is there anyway to do this?   how to make use of jerry's java image processing filter in java application?is there anyway to do
how to extract css properties using java?
how to extract css properties using java?  how to extract css properties using java
Developing Simple Struts Tiles Application
will show you how to develop simple Struts Tiles Application. You will learn... Developing Simple Struts Tiles Application  ... file before you can use the tiles tags in your application
How to align div side by side?
Example of aligning DIV side by side in HTML page In this tutorial I will explain you how you can align the div side by side using CSS. The CSS...; margin:5px; } </style> In the above CSS we have use the float:left
java spring simple application
java spring simple application  hai I have design a simple application in this I always found class not found exception. I am sendig code as follows please resolve this and send me.my directory structure is as follows Project
Use an application and applet together
Use an application and applet together  i have a project in my school in which i am making a game. i have a problem that i have an applet in that game and i want to work it in an application or to run that application
Use an application and applet together
Use an application and applet together  i have a project in my school in which i am making a game. i have a problem that i have an applet in that game and i want to work it in an application or to run that application
css
2.In this style sheet, define the following. Use a different element, and different properties and/or values, for each rule: one or more simple selectors... constructing XHTML page for the subsequent questions. (a) Create a simple XHTML
css
2.In this style sheet, define the following. Use a different element, and different properties and/or values, for each rule: one or more simple selectors... constructing XHTML page for the subsequent questions. (a) Create a simple XHTML
css
2.In this style sheet, define the following. Use a different element, and different properties and/or values, for each rule: * one or more simple selectors... constructing XHTML page for the subsequent questions. (a) Create a simple XHTML
Simple IO Application - Java Beginners
Simple IO Application  Hi, please help me Write a simple Java application that prompts the user for their first name and then their last name. The application should then respond with 'Hello first & last name, what
Simple Calculator Application In Java Script
. that is extremely simple JavaScript calculator, the HTML below shows you how... Simple Calculator Application In Java Script  ... Calculator The objective of this project is  learn how to write a simple

Ads

 
Advertisement null

Ads