How to create a website with HTML | Basics of HTML | Middle school computer science
How to create a website with HTML | Basics of HTML | Middle school computer science
All information comes from the book “Get Coding!”
What is HTML?
HTML stands for HyperText Markup Language. It is a programming language used to create websites. HTML can be used to used to add text and images and create sections and paragraphs for your page. A document is an HTML web page, which is made up of elements. Elements are made through small codes called tags.
Codes
HTML tags are made up with a piece of code surrounded by two angle brackets (< >). An opening tag would be < > while a closing tag would be </>. <p> stands for a paragraph tag. You can create a paragraph for your website like this: <p> This is not a paragraph, but a sentence written for an HTML. </p>
Every code for an HTML must begin with <!DOCTYPE html>. This will tell the browser which version of HTML the page was coded in. The <html> tag tells the browser that HTML has been used to create the page. This is the <head> tag. It can be used to hold <title> tag. <body> tags can be used to display all the contents that you want to display.
The code would look something like this:
<!DOCTYPE html>
<html>
<head>
<title>
MylkTV
</title>
</head>
<body>
<p> This is a very cool website! </p>
</body>
</html>
How do you convert the HTML into a website?
For Windows:
Step 1- Create a file by opening the Notepad app. You can find it by searching “Notepad” up in the Start Menu.
Step 2- Create a new folder where you will be keeping all your codes in. You can name it something like “Coding” or “Codes”.
Step 3- Once you open Notepad, press file then “Save As.” Save the file into the folder you’ve created. Then, name it anything you would like and add “.html” after. For example, you can do “testcode1.html”.
Press save after you’re done.
Step 4- Open the coding folder on your desktop. Double click on your html file, which will open your web browser. Thats it!
For Mac:
Step 1- Open the TextEdit app. Set up your file as a plain text, by going to format then selecting make plain text. Make sure that Plain Text is checked and Smart quotes are unchecked. You can see this by going to the menu bar then selecting Preferences. In the Open and Save tab in preferences, make sure Display HTML files as HTML codes instead of formatted text is checked.
Step 2- Create a folder and name it “Coding” or “Codes”.
Step 3- Go to file and select save. Select the coding folder as the destination to save your file to. Then, name it anything you would like and add “.html” after. For example, you can do “testcode1.html”.
Press save after you’re done.
Step 4- Open the coding folder on your desktop. Then, double click the html file. Thats it!
Your final product should look like this (for windows):
Comments
Post a Comment