From the course: AI-Powered Development: GitHub Copilot in Visual Studio Code

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

HTML and CSS completion

HTML and CSS completion

I've mentioned earlier in this course that the code completion from Copilot also works with markup files like HTML and it can also work in CSS files. So let's take a look at doing that. So I'm in this simple HTML document and of course this works with any of the popular JavaScript frameworks. I'm just using a plain HTML file. So what I'll do is I'll go down to a section here. I have an article defined here. I wanted to define another article after that so I'll I'll move my cursor down here, type in the start of the word article, move my arrows up and down with my keyboard till I select article. I get some help text telling me what an article element is. And when I press the tab key, it will suggest multiple lines of HTML. So I'll press tab. And now it's moved me to the end of line 41. And of course I will need to close this article tag. Let's see what happens when I move to my CSS file. So far, all I have is a root defined in here. I just press the space bar in this case and it's…

Contents