How to Capture ID in CSS Selector in Html

Sarmad Gardezi

When I tried to build the table and tried to add colors, I encountered some problems.

In Wiz Wiz I defined it css selector , but the selector does id   not work well.

Why doesn’t the selector work?

And how to solve it? ID cannot start with a number. A good solution is to add a meaningful name before the number. And, as ellitt said, the id in html should be enclosed in quotation marks.


<text id="alert1">Some text</text>
<text id="alert2">Some text</text>


#alert1 {
    background-color: blue;
#alert2 {
    background-color: green;

If you still have an issue you can use the contact page for more info.

More great articles

Create a Popup Window in Website using CSS

Use the HTML <form> tag add a form for user input. Then, create your <input> fields for your form. Give a class to your form to add a style for…

Read Story

Use Formula to Copy Row Dynamically in Google Sheet

This tip is one of the most challenging Tip I've shared but it's worth the effort to learn. The index…

Read Story

Use Yoast SEO Meta Tags in Static html and weebly website

It’s clear that a homepage serves a number of different purposes. Among others, it is your welcoming page and your main…

Read Story