answersLogoWhite

0

Where do you use css?

User Avatar

Anonymous

13y ago
Updated: 8/18/2019

CSS is used for adding style to the elements of a web page. It is far superior for controlling how your website looks than relying on HTML and tables.

If you have several web pages that you need to look similar, CSS will save you hours of work in both creating and updating the design of your web page.

CSS can be used to position items throughout your web page. It's much better and easier to use <div> tags that you position using CSS than using <table>.

If you build a very basic page:

<HTML>

<head>

<title>My Page</title>

</head>

<body>

<div>

<a href="http://www.mysite.com/">Home</a><br />

<a href="http://www.mysite.com/aboutus.HTML">About Me</a><br />

<a href="http://www.mysite.com/aboutsomeone.HTML">About You</a><br />

<a href="http://www.mysite.com/philosophy.HTML">Why</a>

</div>

<div>

<h1>Hello World!</h1>

<h2>I have something to tell you</h2>

<p>But I will probably wait until later to do so</p>

</div>

</body>

</HTML>

Then you will only see white background, blue links, black text, Large Header, less large header and regular text paragraph. All justified left.

Not very pretty, but it's all you need on your website.

Now if you add the css in the <head> tag and two things to the HTML then you can really change things up afterwards.

Pay attention to the and 'id' additions to the <div> tag.

<HTML>

<head>

<title>My Page</title>

<style type="text/css>

body{

background:#FFFFFF;

position:relative;

text-decoration:none;

}

div#links{

width:200px;

height:auto;

background:#DDDDDD;

border: solid, 1px, #000000;

position:absolute;

top:0px;

right:0px;

}

div#links a{

color:#BBBBBB;

font-family:comic sans;

}

div#content{

width:500px;

height: auto;

margin-left: auto;

margin-right: auto;

background:#CCCCCC;

}

div#content h1{

font-size:16px;

color:#222222;

}

div#content h2{

font-size:14px;

color:#444444;

}

div#content p{

font-size:10px;

text-align:center;

}

</style>

</head>

<body>

<div id="links">

<a href="http://www.mysite.com/">Home</a><br />

<a href="http://www.mysite.com/aboutus.HTML">About Me</a><br />

<a href="http://www.mysite.com/aboutsomeone.HTML">About You</a><br />

<a href="http://www.mysite.com/philosophy.HTML">Why</a>

</div>

<div id="content">

<h1>Hello World!</h1>

<h2>I have something to tell you</h2>

<p>But I will probably wait until later to do so</p>

<div>

</body>

</HTML>

Now our page will look much different, much more stylized, with the links in a bordered box on the right side of the page, text and headers in the middle.

Once you learn CSS you can control a plethora of more options as to how your page looks.

Now if you have several pages you can take the information in between the <style></stlye> tags and put it in its own text file named yourCSSpage.css, put a

<link href="/yourCSSpage.css" rel="stylesheet" type="text/css"/>

in the <head> tag of your web page, copy all HTML and paste in a new HTML file then replace the title and the text you want displayed, all your pages will be stylized the same.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the use of in css?

Inline CSS is one of the ways to apply CSS. It is the styling which is done with the individual element.


Difference between inline and internal css?

Inline CSS sits within the HTML tag.For example: your text hereWhen using Internal CSS, all the CSS instructions sit in the section between your css here tags.To use Internal CSS you have to tell the page that you want it to use the css whilst Inline CSS is run automatically as the page is read.


On MagiStream what is a Custom CSS code and how do you use it?

A CSS code allows you to modify your profile visually. There are articles in the MagiStream gamer forums that explain how and where you can use CSS codes.


Where css use?

CSS is used in web designing along with HTML. All the styling on the page is done only by CSS.


What is the element of CSS?

Mostly use Pseudo-elements in CSS for website designing.


Why should you use css?

You should always use your own CSS. This makes a person have control over what he is going to get.


Can you use CSS transparency codes on WikiAnswers?

No, WikiAnswers does not provide its users with any option to use CSS transparency codes.


What is CSS in web application?

CSS is a "cascading style sheet" which use for website templates designing. Moto of CSS is that how HTML elements are to be displayed.


How much course of css?

CSS is a very vast topic to learn. You can learn it as you use it accordingly.


How do you color the area between margins using HTML or CSS?

You can set the color of margin in CSS. The attribute margin-color is what sets it.


Does the Answers.com website use CSS positioning?

Yes, the Answers.com website uses a tableless CSS design. So all positioning is done using CSS.


How do you place images in between text frames?

You have to use a Stylesheet (CSS). Or you can type CSS straight into the document.