|
INTERVIEW QUESTIONS
PROGRAMMING LANGUAGES
HTML
DETAILS
Question: How can I specify colors?
Answer: If you want others to view your web page with specific colors, the most appropriate way is to suggest the colors with a style sheet. Cascading Style Sheets use the color and background-color properties to specify text and background colors. To avoid conflicts between the reader's default colors and those suggested by the author, these two properties should always be used together. With HTML, you can suggest colors with the TEXT, LINK, VLINK (visited link), ALINK (active link), and BGCOLOR (background color) attributes of the BODY element. Note that these attributes are deprecated by HTML 4. Also, if one of these attributes is used, then all of them should be used to ensure that the reader's default colors do not interfere with those suggested by the author. Here is an example: <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#000080"> Authors should not rely on the specified colors since browsers allow their users to override document-specified colors.
|
|
|
Category |
HTML Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8926 users |
Added on |
9/14/2014 |
Views |
69964 |
Rate it! |
|
|
Question:
How can I specify colors?
Answer:
If you want others to view your web page with specific colors, the most appropriate way is to suggest the colors with a style sheet. Cascading Style Sheets use the color and background-color properties to specify text and background colors. To avoid conflicts between the reader's default colors and those suggested by the author, these two properties should always be used together. With HTML, you can suggest colors with the TEXT, LINK, VLINK (visited link), ALINK (active link), and BGCOLOR (background color) attributes of the BODY element. Note that these attributes are deprecated by HTML 4. Also, if one of these attributes is used, then all of them should be used to ensure that the reader's default colors do not interfere with those suggested by the author. Here is an example: <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#000080"> Authors should not rely on the specified colors since browsers allow their users to override document-specified colors. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How do I eliminate the space around/between my images?
|
View Answer
|
|
How do I eliminate the blue border around linked images?
|
View Answer
|
|
What are HTML Lists?
|
View Answer
|
|
Posting Copy and Paste HTML
|
View Answer
|
|
Should I put quotes around attribute values?
|
View Answer
|
|
How can I show HTML examples without them being interpreted as part of my document?
|
View Answer
|
|
How can I have two sets of links with different colors?
|
View Answer
|
|
How do I create a link that sends me email?
|
View Answer
|
|
Why is there extra space before or after my table?
|
View Answer
|
|
Why doesn't <TABLE WIDTH="100%"> use the full browser width?
|
View Answer
|
|
Can I use percentage values for <TD WIDTH=...>?
|
View Answer
|
|
How can I use forms for pull-down navigation menus?
|
View Answer
|
|
How can I use tables to structure forms?
|
View Answer
|
|
How can I eliminate the extra space after a </form> tag?
|
View Answer
|
|
How do I set the focus to the first form field?
|
View Answer
|
|
How do I make a form so it can be submitted by hitting ENTER?
|
View Answer
|
|
Do I have to memorize a bunch of tags?
|
View Answer
|
|
How can I check for errors?
|
View Answer
|
|
How do I use forms?
|
View Answer
|
|
How do I center a table?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All HTML Interview Questions & Answers - Exam Mode /
Learning Mode
|