Skip to main content

Featured

Pixel Buds A-Series | Unboxing & Hands-On

How to make files and get started in Visual studio code

I've successfully learned the basics of Html and CSS!  Naturally I also want to experiment with my newfound knowledge, that's why I downloaded Visual Studio code.  VS code is a text editor, where you can type in code.  I'll explain what a text editor is in a follow-up article.  Anyways I know how hard it is to get started so I wanted to explain how to start making simple web-pages with Html and CSS. 




To do that you first need to create a folder in your file manager specific for coding.  In that folder create a folder where you can store files that will contain the code.






Then in VS code click on the open folder button and select the folder that will contain your projects
.

Once you do that click on the add new file button to create a new file and name it index.html; VS code will automatically adapt and recognize that file as an Html file.  You can do the same by putting .css for a CSS file and a .js file for JavaScript.  FYI: we name our homepage HTML code index.html because it is a common coding practice among web developers that will help your code be easier to read(of course this is optional).



When you open your HTML file you will first need to add in some code to make it work properly.  Thankfully VS code can fill in the gaps: start by typing "html" into the editor(without the quotation marks).  While still typying select the option "html:5".  
 Now you can begin your Html coding!


If you've decided that CSS should go in a seperate file you must link it to your html file.  You can do this by using the code: <link rel="stylesheet" href="teststyle.css">
You will have to provide your own file name.







I hope this article has been of some help to anyone wanting to code.






Best, BenTechCoder

Comments

Popular Posts