Font Colors And Backgrounds - HTML Test Suite For UAAG 1.0 (Draft)
Có thể bạn quan tâm
font colors and backgrounds
This is an outdated draft. Current information is linked from the WAI website: w3.org/WAI Some 2020 information on text and background contrast is in Understanding Success Criterion 1.4.3: Contrast
On this page: Test 1 | References | About these tests
Nearby: More HTML 4.01 Tests | UAAG 1.0 Test Suite
UAAG 1.0 Requirement
Checkpoint 4.3 Configure text colors (Priority 1 ) Provision 1 : Allow global configuration of the foreground and background color of all visually rendered text content. Provision 2 : As part of satisfying provision one of this checkpoint, provide a configuration option to override foreground and background colors specified by the author or user agent defaults.Test 1 :
Procedure
- Configure the user agent to render the following test text using user specified colors and background colors.
Run test
Text color: black, background-color: white
Text color: white, background-color: black
Text color: red, background-color: white
Text color: blue, background-color: white
Text color: green, background-color: yellow
Text color: white, background-color: red
Expected results
- The user agent allows the user to chose font color and background color to be used to render text.
- The user agent makes available to the user a range of font and background colors.
Source code
<div style="font-size: large; font-family: sans-serif"> <p style="color: #000000; background-color: #ffffff">Text color: black, background-color: white</p> <p style="color: #ffffff; background-color: #000000">Text color: white, background-color: black</p> <p style="color: #ff0000; background-color: #ffffff">Text color: red, background-color: white</p> <p style="color: blue; background-color: #ffffff">Text color: blue, background-color: white</p> <p style="color: green; background-color: #ffff42">Text color: green, background-color: yellow</p> <p style="color: #ffffff; background-color: #ff0000">Text color: white, background-color: red</p></div>References
- HTML 4.01 specification for STYLE
- CSS2 specification for colors and backgrounds
About this test suite
This test is part of a test suite for the User Agent Accessibility Guidelines (UAAG) 1.0 . This work is conducted by the User Agent Accessibility Guidelines Working Group , which is part of W3C's Web Accessibility Initiative (WAI) . Please send comments on this test to w3c-wai-ua@w3.org ( public archive ).
Test created by:
- Colin Koteles
Last modified: $Date: 2020/11/04 18:27:50 $ by $Author: shawn $
Copyright © 1999 - 2003 W3C® ( MIT , INRIA , Keio ), All Rights Reserved. W3C liability , trademark , document use and software licensing rules apply.
Từ khóa » Html Color Text Background
-
HTML Styles - W3Schools
-
Background Color - Tryit Editor V3.7
-
Change HTML Background Color Or Font Color - BitDegree
-
How To Add & Change Background Color In HTML - HubSpot Blog
-
Html - How Do I Set A Background-color For The Width Of Text, Not The ...
-
In HTML, How Do I Change The Color Of The Text And Background Of A ...
-
HTML Colors, Text, Background And Border
-
HTML Text Color - HTML Color Codes
-
HTML Color Code For Background And Text On Web Page
-
#FFFFFF (White) HTML Color Code - Computer Hope
-
How To Highlight Text In Color Using HTML And CSS - Computer Hope
-
Background Color
-
Background-color - CSS: Cascading Style Sheets - MDN Web Docs