CSS Editors
You can use a professional CSS editor to edit CSS. Here are a few commonly recommended editors:
Microsoft VS Code
A free, open-source, cross-platform, lightweight code editor from Microsoft, achieving nearly full-spectrum IDE development capabilities through a vast plugin ecosystem.
Alibaba Qoder
Alibaba's self-developed agentic programming tool that uses Agent technology to understand entire project code, autonomously completing coding, refactoring, test case writing, and the full development workflow via natural language instructions.
ByteDance Trae
Trae: ByteDance's AI-native IDE, combining traditional coding and AI autonomous development in dual modes; Chinese natural language can generate a complete project with one click.
You can download the corresponding software from the official websites of the above software and install it step by step.
You can also use our online editor:https://www.jyshare.com/front-end/61/
Next, we will demonstrate how to use VS Code to create a CSS file.
VS Code
Visual Studio Code (VS Code for short) is an open-source code editor developed by Microsoft that supports Windows, Linux, macOS, and other operating systems, with built-in extension management functionality.
VS Code installation tutorial reference:https://www.runoob.com/vscode/vscode-tutorial.html
Install essential plugins (Extensions):
Click the square icon (Extensions) in the left sidebar of VS Code, then search for and install the following two extensions, which are essential for beginners:
- Live Server: Allows you to preview web pages live in the browser; the browser automatically refreshes after you save the code.
- HTML CSS Support: Enhances intelligent code completion (IntelliSense) for CSS.

Step 1: Create the Project Structure
Create a folder named my-first-css on your computer
Open it in VS Code: Click File -> Open Folder... in the top-left corner of VS Code and select the folder you just created.
-
Right-click in an empty area of the left Explorer and create a new file index.html (this is the skeleton of the web page).
-
Right-click again and create a new file style.css (this is the styling of the web page).

Step 2: Write the HTML Skeleton
CSS must rely on HTML to exist. The following is the code for the index.html file.
in Enter the following code inside the tag, andbe sure to add the tag to link the CSS file:
<!
DOCTYPE
html
<
html
<
head
<
meta
charset
=
"
UTF-8
"
<
meta
name
=
"
viewport
"
content
=
"
width=device-width, initial-scale=1.0
"
<
title
My CSS Practice
title
<
link
rel
=
"
stylesheet
"
href
=
"
style.css
"
head
<
body
<
div
class
=
"
card
"
<
h1
Hello, CSS!
h1
<
p
This is the first style card I wrote with VS Code.
p
<
button
Click me
button
div
body
html

Step 3: Write the CSS Styles
Enter the following code in the style.css file:
Example
/* Add a background color to the entire page */
body
{
background-color
:
#f0f2f5
;
font-family
:
'Segoe UI'
,
sans-serif
;
display
:
flex
;
justify-content
:
center
;
/* Horizontal centering */
align-items
:
center
;
/* Vertical centering */
height
:
100vh
;
/* Fill the screen height */
margin
:
0
;
}
/* Design the card style */
.card
{
background-color
:
white
;
width
:
300px
;
padding
:
30px
;
border-radius
:
15px
;
/* Rounded corners */
box-shadow
:
0
4px
15px
rgba
(
0
,
0
,
0
,
0.1
)
;
/* Shadow */
text-align
:
center
;
}
/* Title color */
h1
{
color
:
#333
;
}
/* Button style */
button
{
background-color
:
#007bff
;
color
:
white
;
border
:
none
;
padding
:
10px
20px
;
border-radius
:
5px
;
cursor
:
pointer
;
transition
:
background
0.3s
;
/* Animation transition */
}
/* Effect when hovering over the button */
button
:hover
{
background-color
:
#0056b3
;
}
Step 4: Run and Preview
- Returning to the
index.html files.
- Click anywhere in the editing area with the right mouse button。
- Choice "Open with Live Server"。

At this point, your default browser will pop up automatically. You should see a centered white card with a title and a button. When you hover over the button, its color will darken.
The running result is displayed as follows:
