WDV495 Emerging Technologies Seminar: AI Software Demonstration

Example

Some time in 2023 when I was in the Advanced CSS class, there was an assignment where I had to select a parent element and add a colored border to it. But I couldn't change the html, and instead had to use css selectors and combinators to select them. At the time I spend around 10 min looking for a way to do this, but every answer form back then just told me to add a name, id, or something unique to the parent element. Frustrated I went to ChatGPT and asked it how to select the parent element from a specific child element. And it gave me an answer. Use the :has() selector. I double checked the w3schools css selector reference and there was nothing on it. After double checking it on caniuse.com and found out why. It was something new that was starting to get implemented in the last few years. And at the time FireFox didn't support it but Chrome did.

Review

The entire discussion with ChatGPT was the same thing that I typed into google at that time. CSS how to select a parent element from a child element. While google came with different links that lead nowhere due to the information being newish. ChatGPT was able to parse though all of it's data and give me an answer.

Result

When I got to class I asked about it since it didn't seem to be the correct answer since its low adoption among the browsers. That was when I was told that they made a mistake and didn't realize that there wasn't anything in the w3schools reference about it. They explained that they would have accepted just adding an ID or Class to the parent element to target it that way. Though if you look up the same thing now, there are a few articles talking about the :has() selector, and it's a very nice tool you can use in