answersLogoWhite

0

CSS Cascading Style Sheets

A widely used style sheet language, the Cascading Style Sheets (CSS) describes the layout of HTML, XHTML, and XML documents. CSS separates the presentation from the content of the document to provide accessibility and flexibility.

423 Questions

How do you make a character move in HTML?

You cant in HTML. Try Javascript (however it is better if you use a picture editor like Macromedia Fireworks and save the image as .jpg),

You can. You would have to program it though. I have some of the "text moving features" added to my personal HTML. You could do the same.

What CSS property specifies the background color of a table?

Use the CSS declaration "background-color"

For instance...

<style type="text/css">

body { background-color: red; }

</style>

That code will change the background color to red. Background color will take the same values for a color as all other CSS color. A named color keyword, a hex RGB value, a decimal RGB value, and a decimal RGBA value.

What are some best practices using CSS?

Most of the CSS is overall important. Styling text boxes, fonts, images etc can be done in CSS.

How do you insert comment in css file?

Comments in a Cascading Style Sheet consist of a forward-slash adjacent to an asterisk (star), the comment, and an asterisk (star) adjacent to a forward-slash.

Anything within the two symbols (/* and */) is considered to be a comment. For example:

/* This is a comment.
Anything between the
two symbols is ignored. */

What are the advantages of external CSS compared to internal CSS Given these situations which type do you think would be more useful for the majority of webpages?

If by "external" you refer to separate .css style sheet files instead of style sheets as parts of HTML pages, the short answer is: Avoiding headaches and redundancy.

You can define one or several complex style sheets and use it for hundreds of pages. Changing one definition will update your whole site.

Also, an external style sheet will be cached, so a user's browser only has to load it once. This saves time and bandwidth.

How do you upload an image in HTML code?

First add image (.jpg, .png, .gif) into 'images' folder in main root of the site. In HTML code add <img alt="word or phrase describing image" height="162" src="path where image is coming from images/img.gif" width="917" />

How do you save a text file as HTML?

go to file menu--> select option "save as" --> then choose the file type "html document" name the file. and you are done

When was released CSS3?

CSS3 (and HTML5) are in the final stages of ratification and so are not yet official releases. Care must be taken with their features as they will not be fully implemented for years. I find that the LCD (Lowest Common Denominator) practice works best!

What are selectors in CSS?

When you are writing CSS (Cascading Style Sheet) code, you are writing a set of rules that a page's HTML code must follow when rendering the page.

Every block of CSS rules has three important parts: The selector, properties, and values. The selector is what tells the page WHAT elements the following rules apply to, such as all divs with a name of "colorMeRed". Properties are what the page must change on the element, such as it's color. Finally, the value is what that property actually must be set to, such as "red".

What is a custom CSS?

All CSS is custom, that is the purpose behind CSS. It allows you to control the presentation of your web pages and separate the rules that govern presentation from the content and markup. You control what rules you develop and set the rules for. CSS stands for cascading style sheets.

How do you install css skins?

A "Skin" is usually a certain format of a page that continues throughout the entire site. If the question is asking to be able to make a "Skin" for the entire site that you can change with just an edit of one CSS file, then here's the answer. To begin, put the CSS you want on every page of your website into one file called "style.css", and upload it to your site. Next, put the following into all your webpages (Or just the webpages you want the skin in); ---- ---- This is an HTML tag. It should be placed anywhere in the

tag, and not in the tag. takes the content from a file, and depending on the relationship ("rel"), it does something. Also, we should be linking to your newly created file, the CSS file (With "href"). The relationship ("rel") with the link is a stylesheet, in the tag. That means when you place this tag in any page, it will refer to that stylesheet for CSS code. If you put the same tag on every page, and link it to the same .css file, any CSS you change in the CSS file will effect all the pages you put the tag in.

What is the purpose of a class in css?

A CSS class is a line of code in your CSS file which corresponds to the HTML equivalent of that class; it is defined with a dot: "."

<div class="test">This is a test.</div>

CSS:

.test { display: block; background: #f90; color: #fff; }

The classes are used to define the style for the individual element of the web page or to determine different styles for the one tag. Syntax for the classes will be the following:

Tag.Name of class { property1: value; property2: value; ... }

Inside of the style sheet the desirable tag is written first, than, after the semicolon - the user's class name. In order to define in HTML code the fact, that tag with the definite style is used, parameter is added to the tag

What is Pseudo-classes in cascading style sheet?

You may not know it, but a link has four different states that it can be in. CSS 2.1 allows you to customize each state. Please refer to the following keywords that each correspond to one specific state:

* active - this is a link that is in the process of being clicked

* focus - applies a style to an element in focus

* hover - this is a link currently has a mouse pointer hovering over it/on it

* link - this is a link that has not been used, nor is a mouse pointer hovering over it

* visited - this is a link that has been used before, but has no mouse on it

* first-child - special style to an element that is the first child of another element

* lang - specifies a language for the specified element

Order matters. If "a:active" precedes "a:hover", the effects in "a:hover" will take precedence. So, in this example, you would not see the color change when the user clicks down on a link.

Pseudo Classes

You can set links contained in different parts of your web page to be different colors by using the pseudo class. For example, lets say you want your links in the content area to have a different color then the links in the left or right column of your webpage.

You can do this in the following fashion:

#content a:link {color: #009900;}

#content a:visited {color: #999999;}

#content a:hover {color: #333333;}

#content a:focus {color: #333333;}

#content a:active {color: #009900;}

Now assuming that you have your main content in a division named "content" all links within that division will now be styled by this new style selector. Should your selector have a different name, just change the #content selector to match your division name.

Then for the links in a column you could use the following:

#column a:link {color: #009900;}

#column a:visited {color: #999999;}

#column a:hover {color: #333333;}

#column a:focus {color: #333333;}

#column a:active {color: #009900;}

Once again, this assumes the name of the column division, just change the name to match yours.

This same method can be accomplished by declaring a class instead of an id.

a.column:link {color: #009900;}

a.column:visited {color: #999999;}

a.column:hover {color: #333333;}

a.column:focus {color: #333333;}

a.column:active {color: #009900;}

Though in this case you will need to add a class to each link

&lt;a class="column" href="" title="">some link text&lt;/a>

But, there is still yet an easier way

.column a:link {color: #009900;}

.column a:visited {color: #999999;}

.column a:hover {color: #333333;}

.column a:focus {color: #333333;}

.column a:active {color: #009900;}

Why is it better to use css layouts than tables?

It's a more precise way of working. It's also more developed. Using CSS instead of a table to arrange a page is like using a chainsaw instead of a knife to cut down a tree, both will do it, one is more advanced and will do it better.

What is HTML tag span?

SPAN STYLE in HTML is used to carry a certain style over blocks of code. This tag can get a little bit complicated for some people. The example I am showing is a very basic example on how to make this happen. For more detailed and more complex ways to use this tag please search the Internet for "HTML Span Tutorial"...

Smasher is <span style="color:green">teaching me</span> how to use<span style="color:red"> HTML tags</span> today.

This would display Smasher is in the default color. Then it opens the span style so the next part will be in green. The tag is then closed so the word how to use would be in the default color. Then we open another span style so the next words will be in red. Now that tag is closed so today would be in the default color.

Again this is a very simple example. This tag usually "Spans" over multiple blocks of code.

Which CSS property controls the text size?

font-size

Can be in pixels, ems, cm, in, or a percent. Also can be small, medium, large, etc.

What is a component of the CSS box model?

For each item on a webpage, even a piece of a text, you can think of there being a box around it. You can do things like draw borders around the item, define its margins, its size and its position. You define the formatting of the content of it, the space around the content which is called padding. You can define the thickness and style of the borders. Using any or all of these things gives you great control over the items on your webpage. Try this:

<span style="border-width: 20px; border-color: gold; border-style: groove; padding: 5pt; position: absolute; top:5cm; left:3cm; margin:0.5cm;">SAMPLE</span>

Does Chrome browser support Cascading Style Sheet?

Most bowsers have two or three default stylesheets. One for correctly built sites and one for "broken" sites.

What are three types of CSS?

External CSS using a separate file ( styles.css) and linked to with the link tag placed between the head tags of all pages using the CSS file.

Embedded CSS used between style tags placed between the head tags of each page.

Inline CSS placed inside a tag using the style="" attribute.

What are the three ways to combine CSS rules with XHTML code?

That would inline, as part of the markup on the page. Then there is embedded within the Head element of the page. Lastly there is external where it is linked from the Head element. I have even seen very complicated series of these used with the thought that the last one gets first precedence

How change color of all letters of a word with css?

Assuming you are trying to change the color of the first letters of a word in an HTML file, there's no actual command, term, attribute, or value to identify the first letter of a word - However, there is still a way to color specific letters using CSS + HTML. Wrap a <span> tag around the letter, in this case the first letter of a word. Give the <span> tag a class name. In your CSS source, give the specific span a color attribute, and the value desired. Example: <html>

<head>

<style type='text/css'>

span.one

{

color: #CCCCCC;

}

</style>

</head>

<body>

<span class="one">H</span>ello, world!

</body>

</html>

What is an advantage of formatting text using a font set?

1. First, using styles enhance the document. Second, using styles can make the document easy to read.

How do you define HTML style attribute in HTML?

To use the HTML style attribute, you simply add style="CSS Stuff Here" to the HTML tag you want those styles applied to. The value of the attribute is simply the CSS declarations you would make anywhere else. For instance:

web site name

It would create a link to the Answers homepage that was bold-faced and red.

It's important to note that styles added in the style attribute override any other style added to that element elsewhere. So, if your sitewide CSS made all links blue, this declaration would override it.

You lose a lot of the power of CSS by adding the styles in this manner. You're also violating the basic principle of CSS, which is to separate content and presentation information.

The technique, therefore, should be used sparingly, if at all.

How does CSS inhance HTML?

CSS handles the presentation portion of displaying an HTML document on the web. That is to say that CSS makes things like color, size, shape, weight, etc. possible in HTML.

To say that CSS "enhances" HTML, however, is an over simplification. CSS provides separate and different functionality than HTML does. HTML does not have the abilities inherent in CSS. Instead, the CSS code makes HTML code more palatable for a human user. Most web spiders, for instance, do not employ HTML fully, if at all.