How to use css in simple HTML application

How to use css in simple HTML application

Please give simple example for understanding purpose

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;}









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
How to create simple HTML Form?
HTML Form Tutorial: How to create simple HTML Form? In web application input... application. In this tutorial you will learn to create simple HTML form for taking... How to create simple HTML Login Page? HTML get
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
HTML CSS example
({});   Hi, You can use the following code to define CSS in HTML page: <...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
What is HTML 5 and CSS 3
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... supports animations along with 2D/3D Transformations features. Using CSS 3 and HTML
ModuleNotFoundError: No module named 'css-html-js-minify'
named 'css-html-js-minify' How to remove the ModuleNotFoundError: No module named 'css-html-js-minify' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'css-html-js-minify'  Hi, My
ModuleNotFoundError: No module named 'css-html-js-minify'
named 'css-html-js-minify' How to remove the ModuleNotFoundError: No module named 'css-html-js-minify' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'css-html-js-minify'  Hi, My
ModuleNotFoundError: No module named 'css-html-js-minify'
named 'css-html-js-minify' How to remove the ModuleNotFoundError: No module named 'css-html-js-minify' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'css-html-js-minify'  Hi, My
ModuleNotFoundError: No module named 'css-html-prettify'
named 'css-html-prettify' How to remove the ModuleNotFoundError: No module named 'css-html-prettify' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'css-html-prettify'  Hi, My
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
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
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
Java HTML Client Application
Java HTML Client Application  Java HTML Client Application
ModuleNotFoundError: No module named 'simple-html'
'simple-html' How to remove the ModuleNotFoundError: No module named 'simple-html' error? Thanks   Hi, In your python environment...ModuleNotFoundError: No module named 'simple-html'  Hi, My Python
How to create simple HTML Login Page?
to create simple login form in HTML. The login form is further validated with JavaScript. You will  learn How to create a simple HTML login page...Simple HTML Login Page- Create a Simple HTML Login page and validate
How to create simple HTML Login Page?
to create simple login form in HTML. The login form is further validated with JavaScript. You will  learn How to create a simple HTML login page...Simple HTML Login Page- Create a Simple HTML Login page and validate
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 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
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
ModuleNotFoundError: No module named 'python-simple-html-sanitize'
: No module named 'python-simple-html-sanitize' How to remove the ModuleNotFoundError: No module named 'python-simple-html-sanitize' error? Thanks...ModuleNotFoundError: No module named 'python-simple-html-sanitize'  
How to add background image to div using CSS?
How to add background image to div using CSS
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 Java Desktop Upload application
Simple Java Desktop Upload application  I try do simple example for upload applicationtake file from c:\ put to d:\ :) PLEASE HELP
simple bank application - JSP-Servlet
simple bank application  hi i got ur codings...But if we register a new user it is not updating in the database...so plz snd me the database also.... Thank you
Developing Simple Struts Tiles Application
will show you how to develop simple Struts Tiles Application. You will learn... Developing Simple Struts Tiles Application  ... in the web.xml file before you can use the tiles tags in your application
How to disable an HTML object?
How to disable an HTML object?  How to disable an HTML object
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...; height:90px; margin:5px; } </style> In the above CSS we have use
Simple Bank Application in JSP
Simple Bank Application in JSP       In this section, we have developed a simple bank application in jsp . In this application user can Update the User Profile, Cash
how to load pdf on html
how to load pdf on html  how to load pdf on html
Hibernate Simple Program Using Java Application with Eclipse
Hibernate Simple Program Using Java Application with Eclipse  How to write Hibernate Simple Program Using Java Application with Eclipse? I wish to learn Hibernate using very popular Eclipse IDE. Share me the best tutorial link
Simple Web Application using Servlet
Simple Web Application using Servlet       In this section, we have developed a simple web application in Servlet . In this application user can add, update and delete all
how to extract css properties using java?
how to extract css properties using java?  how to extract css properties using java
org.jetbrains.kotlin-wrappers - kotlin-css version 1.0.0-pre.554-compat Maven dependency. How to use kotlin-css version 1.0.0-pre.554-compat in pom.xml?
-css Maven dependency? How to use  org.jetbrains.kotlin-wrappers  - Version 1.0.0-pre.554-compat of kotlin-css in pom.xml? How to use kotlin-css version 1.0.0-pre.554-compat in pom.xml? Learn to use this dependency in your project
org.jetbrains.kotlin-wrappers - kotlin-css version 1.0.0-pre.589 Maven dependency. How to use kotlin-css version 1.0.0-pre.589 in pom.xml?
1.0.0-pre.589 of kotlin-css in pom.xml? How to use kotlin-css version...; org.jetbrains.kotlin-wrappers - kotlin-css library is 1.0.0-pre.589. Developer can use...; dependency? How to use  org.jetbrains.kotlin-wrappers - kotlin-css version
org.jetbrains.kotlin-wrappers - kotlin-css version 1.0.0-pre.518 Maven dependency. How to use kotlin-css version 1.0.0-pre.518 in pom.xml?
1.0.0-pre.518 of kotlin-css in pom.xml? How to use kotlin-css version...; org.jetbrains.kotlin-wrappers - kotlin-css library is 1.0.0-pre.518. Developer can use...; dependency? How to use  org.jetbrains.kotlin-wrappers - kotlin-css version
org.jetbrains.kotlin-wrappers - kotlin-css version 1.0.0-pre.572 Maven dependency. How to use kotlin-css version 1.0.0-pre.572 in pom.xml?
1.0.0-pre.572 of kotlin-css in pom.xml? How to use kotlin-css version...; org.jetbrains.kotlin-wrappers - kotlin-css library is 1.0.0-pre.572. Developer can use...; dependency? How to use  org.jetbrains.kotlin-wrappers - kotlin-css version
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
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 to create options in HTML
How to create options in HTML  How to create options in HTML? Please guide me.   Create options in HTML Code <tr> <td width="30" valign="middle">Gender:</td> <td><select
HTML
HTML  What is a tag? How can we use MARQUEE in HTML
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
how to space images in html code
how to space images in html code  how to space images in html code
Building a Simple EJB Application Tutorial
Building a Simple EJB Application - A Tutorial   ... a simple session EJB and a client web application using eclipse IDE along with Lomboz plug in and XDoclet. This application,    while simple
How to download ,install and use jQuery in the web application?
How to download, install and use jQuery in the web application? jQuery... interaction.ADS_TO_REPLACE_1 Here is the video tutorial of "How to download, install and use... and use J Query in the web application:ADS_TO_REPLACE_2 At first we need
Maven dependency for batik - batik-css version 1.6 is released. Learn to use batik-css version 1.6 in Maven based Java projects
- batik-css library is 1.6. Developer can use this version ( batik - batik-css...? How to create Maven Web Application in Eclipse? Maven 3 Tutorial...Maven dependency for  batik  - Version 1.6 of batik-css released
Maven dependency for batik - batik-css version 1.5 is released. Learn to use batik-css version 1.5 in Maven based Java projects
- batik-css library is 1.5. Developer can use this version ( batik - batik-css...? How to create Maven Web Application in Eclipse? Maven 3 Tutorial...Maven dependency for  batik  - Version 1.5 of batik-css released
Maven dependency for com.globalmentor - globalmentor-css version 0.6.6 is released. Learn to use globalmentor-css version 0.6.6 in Maven based Java projects
is 0.6.6. Developer can use this version ( com.globalmentor - globalmentor-css version... - globalmentor-css in your Maven/Gradle project. Step 1: Create or use a Maven...; com.globalmentor - globalmentor-css version 0.6.6 Now the next step is to use
Maven dependency for com.globalmentor - globalmentor-css version 0.6.4 is released. Learn to use globalmentor-css version 0.6.4 in Maven based Java projects
is 0.6.4. Developer can use this version ( com.globalmentor - globalmentor-css version... - globalmentor-css in your Maven/Gradle project. Step 1: Create or use a Maven...; com.globalmentor - globalmentor-css version 0.6.4 Now the next step is to use

Ads