Introduction to HTML
Downloading visual studio code
Download visual studio code, it's an opensource and free code editor by Microsoft. You use this link.
Writing your first HTML file
Every website is a folder with a files in it. The first entry point is usually called index.html.
- Create a Folder called
websiteor call it anything you want.
- Drag the folder into the visual studio code window
- Click the new file icon
- hit cmd+s, ctrl+s on windows, to save the file and name it 'index.html'
- type '!' and hit tab, usually the key with the following
⇥. The code editor will generate a basic html page for you
- An HTML page is composed of many Tags, an html tag starts with
<followed by the name of the tag like
- every HTML tag ends with a cllosing tag
</the name of the tag and
- Between and opening and closing html tag you can add other tags like
<html> <head></head> </html>
- You can close an html tag inline, example:
<img />note the
/>at the end
HTML main 3 tags
The main 3 html tags are
html which represent the document,
head which contain information about the page and
body which contain the elements that will be shown to the user.
Some HTML tags to momerize
- h1 to h6 for headings
- img tag to display and image
- p for parapraph