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

What is the correct CSS for adding a background image to a page?

Use the attribute BGCOLOR=".." inside the start Body tag using the color you want as the value. It should look like this: this will give you a black background, and at the end of your HTML document you close the Body Of cause if you use a black background you cannot use black font. You won't be able to see it. You can set the value=".." of the background to what ever you like.

What is a style sheet class?

In CSS a class is a user-defined selector that can be applied to multiple elements on a single page. In the style sheet when setting the rules for a class you precede your class name with a period. This looks like:

.myclassname {

font-color: #000000;

font-size: 1em;

font-weight: normal;

}

This tells the browser that this is a class and should be applied to any element that has a class="myclassname" as part of the element attributes. For example:

<p class="myclassname">This is a paragraph</p>

This paragraph would be styled based upon the rules declared above. However the following example would not because it doesn't have a class attribute and it isn't set to myclassname:

<p id="myuniqueid">This is a paragraph</p>

What does the term 'CSS padding' mean?

'CSS padding' refers to additional blank space created between the border and the content of a webpage created with the Cascading Style Sheets programming language. The purpose of padding is to make pages more aesthetically pleasing and easier to read.

How are Cascading Style Sheets helpful to a web designer?

You can choose to implement or ignore any technologies you wish. However, CSS is well-worth understanding and using. Standard HTML has very limited display and design options, and no satisfying mechanism for creating advanced layouts. Clever developers forced the table mechanism to be a crude formatting tool, but that was a hack.

CSS provides a much more powerful and flexible tool for laying out your site and specifying its visual design. With CSS, you can modify the appearance of all instances of a particular element at once. (For example, you can easily specify that all paragraph tags will be purple on a yellow background. I don't know why you'd do that.) You can also designate specific parts of your page and style them quite precisely. CSS has a number of page-layout mechanisms that allow you to create a page layout much more reliably than the old frame or table-based techniques.

If you're using XHTML strict, the tags that used to be used for layout and design (<font>, <center>, <b>, <i> and so on) are no longer supported. You're expected to use the CSS variations instead.

What is the difference between the Div and Span tag?

A div is a block element. This means that if you use a div, unless you float objects next to it using CSS, the div will be alone on a line. A span is an inline element. This means that unless you use line breaks next to it or change it to a block element using CSS, the span will be on the same line as whatever is next or before to it in the code.

For example:

This is a

<div>element</div>

text is above and below but not beside

This is a <span>element</span>, text is before and after on the same line.

How do you create cascading style sheets in HTML?

Cascading Style Sheet, or CSS, is a web standard to describe the presentation semantics of a document written in a markup language. In web design CSS is used to separate the document presentation from the document content. CSS specifies a priority scheme in how rules are to be used, thus the cascading effect that is referred to in the name Cascading Style Sheet.

What is inline css?

instead of putting your CSS in a separate file, you can append it to the HTML tag itself like so:

<span style="color: #000000; font-weight: bold;">

this is highly unrecommended though, because if you do your styling that way, you have a lot of mixing between HTML and CSS and editing the style (e.g. replacing large portions of CSS code to apply a new design to a site) WILL be a pain.

How do you change the size of a text box with CSS?

You achieve this by using the CSS width property. For example, if I wanted all text boxes to have a width of 325px I can achieve this using the following CSS rule declaration:

input[type="text"] {

width: 325px;

}

This rule applies only to those input elements with a type="text" which is what is used in HTML to create a text box in a form and sets the width to be 325px wide.

What is an example of sans serif font?

Block lettering without the little lines highlighting the termination of the lines that comprise the individual letters. Sans is French language for "without".

What are Cascading Style Sheets and what are the advantages of using them?

CSS is a language in which a web designer can 'design' the look and feel of an HTML document. Usually, CSS is for presentation, and HTML is for structure.

Styles are convenient, practical and effective tools for the page makeup and text design, links, images and other elements.

With CSS, you can:

  • Use the same stylesheet across multiple pages, allowing you to make design changes globally.
  • Save bandwith. If you use a stylesheet, the sheet will only be downloaded once while browsing a website.
  • Make non-cluttering pages.

Is CSS a scripting language?

No, HTML is a mark up language and css ( cascading style sheet) is a way of styling a web page eg, bgcolor, text color size and font ect, you can write the css in the HTML or make it separate and link the HTML to it

How can you use css to make a text border glow?

Try this:

<span style =" outline: none; box-shadow: 0 0 10px green;">Look, a glowing border! </span>

What is CSS File and why it is used?

A CSS file can tell the web browser how a web page is supposed to look. The web page (HTML file) itself says what words are on the page, and which pictures, but you CAN use the CSS file to specify what goes where, how big, what color and font, and things like that.

You CAN also specify all those things in the HTML file. The biggest advantages of using separate CSS are:

  1. The same CSS file can be used for all pages in a site, so if you want to change something, you can just change it in one place, and all the pages will now look the way you want.
  2. If you use the same CSS file for every page, your pages will load faster, since the browser does not re-fetch the CSS file every time.

What are the three methods for using style sheets with a webpage?

Not sure what is asked, so two answers in one! It can be inline(with the tag,) embedded(in the head) or external(linked in the head.) The other answer deals with external and the declaration of "media" within the link in the Head tag. More than three choices, but relevance and browser support narrow them down since it is up to the browser maker to decide how it is rendered - generally "screen, print and accessiblity(auditory, etc.)

What are three aspects that can be controlled by CSS?

CSS can be integrated in three ways: Inline: Style attribute can be used to have CSS applied HTML elements. Embedded: The Head element can have a Style element within which the code can be placed. Linked/ Imported: CSS can be placed in an external file and linked via link element.

What are the functions of CSS?

CSS is used to style HTML (and other markup languages) pages. The browser looks at the rules declared in CSS and applies those rules to the relevant HTML elements that it finds in the web page it is rendering. These rules can affect what font typeface is used, what size the font should be, the color of the font, background colors, the alignment of text, placement of images, text, and other items on the web page, and more.

What is the difference between server-side and client-side image maps?

server-side and client-side. In the server-side method, when you click an image leading to multiple links, you are actually invoking a cgi-bin program. The program typically reads a separate map file that tells the program where to go, depending on what part of the image you are clicking. The program returns the destination to the web browser, which then opens the page. The imagemap is called "server-side" because the web browser must contact the remote host to find which site to contact.

Client-side imagemaps, by contrast, do not require a cgi-bin program to function. The imagemap is actually an HTML construct that can be contained on the same page as the clickable image. Rather than requiring the program on the remote host to determine what site to access, the web browser itself associates regions of the image with the appropriate sites. The browser, rather than the remote host, interprets the imagemap.

Explain briefly about Cascading Style Sheet?

Cascading Style SheetsCSS style sheets are blocks of code that can be embedded in a HTML page or stored in a .css file.

CSS manipulates the elements of a HTML webpage by changing the properties of the HTML elements in the page, such as BODY P or TABLE elements.


CascadingCascading or the Cascade refers to how the the final style will render, if the first block in a CSS sheet defines that all P tags will have black text and be font type Arial, then that will be the case for all P elements. But if in another block further down the page resets the P tag to have text that is green then all text in the P elements will be green. But all P tags will still have Arial type font.

Example Code:
Block 1
p {
color: #000000; /* Set to Black */
font-family: Arial;

}

Block 2
p {
color: #00FF00; /* Set to Green*/

}

And in the case that another Block sets the P tag to have a background color of Blue:

Block 3
p {
bacground-color: #0000FF; /* Set to Blue */

}

Then the final Cascade will result in the P tag being:

Final Cascade
p {
bacground-color: #0000FF; /* Set to Blue */
color: #00FF00; /* Set to Green*/
font-family: Arial;

}

What is the style these days?

well simple for the year 2009 red is the new black and black and white stripes are fabulous

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.