There are some color names that I am familiar with and use, such as 'white', 'blue', 'red'. Is there a comprehensive list of colors that can be used in HTML/CSS?
There are some color names that I am familiar with and use, such as 'white', 'blue', 'red'. Is there a comprehensive list of colors that can be used in HTML/CSS?
CSS3-color provides a comprehensive compilation of the 'Extended color keywords'.
For a wide array of colors, you can check out the extensive list at http://www.w3schools.com/HTML/html_colornames.asp. However, it's important to be aware of a warning provided at the end:
Please note: The color names mentioned above are not officially recognized as part of the W3C web standard.
The W3C HTML and CSS standards only acknowledge 16 specific color names: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.
To adhere to valid HTML or CSS guidelines, it is recommended to use HEX values instead.
In the realm of CSS, the Color Module Level 3 stands as a comprehensive W3C Recommendation that takes precedence over CSS2 in case of conflicts. It identifies the 16 standard HTML4 color keywords as "Basic color keywords" and the additional 147 SVG color keywords as "Extended color keywords," with the latter encompassing the former within its list.
Contrary to what W3Schools suggests, the answer to your query actually consists of 147 names rather than 16. Moreover, browsers recognize a plethora of other keywords beyond these standardized lists; however, they may not be officially sanctioned even if they are practically functional. Consequently, some slight variations might occur across browsers while interpreting these unofficial keywords due to the lack of precise specification.
(P.S. For those intrigued by a sortable table featuring all 147 extended keywords alongside their corresponding numeric representations, I have recently shared one on my website. Additionally, visualizations for both the basic and extended keyword sets can be found in the form of a color wheel and a distribution chart.)
(P.P.S. Please note that back in 2009, the CSS3 Colors module had not yet attained full Recommendation status.)
According to W3C standards, there are only 16 valid color names in HTML and CSS, including aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.
This information can be found on the following website:
Did you know that there are a total of 17 "standard" colors listed in the W3 specification? Check them out here: http://www.w3.org/TR/CSS2/syndata.html#color-units
Furthermore, there are also predefined names for system colors which can be found at: http://www.w3.org/TR/CSS2/ui.html#system-colors
It's worth noting that this second set has been deprecated in CSS3.
Here is the button code I have: <button class="contactButton">XYZ</button> When the user clicks on this button, I want my page to smoothly scroll down to a specific section. I attempted to achieve this with the following jQuery code ...
Could someone help me troubleshoot this code snippet? $str = 'di <a href="http://www.cadoinpiedi.it/author/redazione-la/#C" style="color:#006699; text-decoration:none;">VARIABLE NAME</a>'. '&l ...
One requirement for the user is to input text into a designated text field within a form element in my HTML. Following this, a CGI script processes the user's input and JavaScript code is responsible for displaying the processed information. JavaScri ...
This is my glitch. I have a layout where I see 3 cards in a row for desktops, 2 cards per row on tablets, and 1 card for mobile devices. However, I would like the cards to resize and display 2 cards in a row on mobile. How can I achieve this? Here is the f ...
I have created an agenda system with weeks, but I am looking for an option that allows the user to add unlimited weeks. HTML <h1>Agenda</h1> <div class="balkje dicht"> <h2>WEEK 1</h2> <div> <div class="col1 ...
I am currently developing an HTML-based application with a JSON wrapper. Ever since the recent 4.0.2 update, the video playback on iPhones has been experiencing some issues. Despite having all the necessary code in HTML to play the video files, post-update ...
Incorporating Bootstrap 4 into my Angular 8 application, I am faced with an issue on the main page where I have two components sized md-5 and md-6, respectively. To create a gap between them, I used offset-md-1. However, the offset size is too large, res ...
My calculator project using VueJS, HTML and CSS is almost complete. However, I'm facing an issue where it only works once. For example, if I input 6x3, it correctly gives me 18. But if I then clear the result and try to input a new calculation like 3 ...
I have implemented a custom order function in my controller with the following code: $scope.customOrder = function (item) { var empStatus = item.empState; switch (empStatus) { case 'Working': return 1; case & ...
Hi there, I'm encountering an issue with the ol and ul tags not displaying numbers and circles on the left side. I am not using a reset css file. Below is my code snippet: <ol> <li>ALL FILES</li> <li>PHP SCRIPTS</li ...
I'm currently facing an issue with trying to create a step-by-step operation that involves fading the container div around a target div, changing the background, and then fading it back in. The problem is that all the functions in this block are being ...
My attempt to establish cross-domain communication using postMessage between a page hosted on example1.com and an iframe within the same page on example2.com is facing some challenges. Once the iframe finishes loading, it sends a postMessage to the parent ...
How can I add (mock) buttons to my page using just CSS? I've been trying to display a span element but it's not showing up. I've experimented with setting its display to block and positioning it absolutely, but so far nothing has worked. Whi ...
I’ve been developing a responsive website that works seamlessly on both mobile and desktop. After some tweaking, I managed to get the navigation menu to display just the way I wanted in desktop mode with no dropdowns. However, an issue arises when switch ...
My goal is to create a straightforward landing page that includes a header, footer, and an image perfectly centered between the two (both horizontally and vertically). The space above and below the image should be equal and adjust based on the height of t ...
import { useState,useEffect } from 'react'; import './App.css'; import Header from './Components/Header/Header'; import { BrowserRouter as Router, Route ,Routes} from 'react-router-dom'; import Pages from './Pag ...
I am working with a table that has multiple rows, and my goal is to make the border of a row extend over other rows when it is expanded. Refer to the image below for a visual representation. I am utilizing Bootstrap 5 and JQuery for this task. I have creat ...
Please take a look at this JSFiddle example for reference. I am currently working with tablesort and its associated CSS to achieve alternating row colors for the rows containing first and last names. Additionally, I want the rows within the sub-table disp ...
My goal is to create HTML content to display correctly in a QTextEdit using Qt 4.2 on RHEL 5.3. Although I am not a professional web developer, I believe the HTML generated by my algorithm is valid. 319:14:27:22: <font color="rgb(255,0,0)" bgcolor="r ...
Looking to add some smooth sliding animation to this basic JS code instead of the glitchy appearance it currently has. I've experimented with different options but haven't had any success, any suggestions? Here's the code snippet along with ...