Learning HTML
-Part 1-
This tutorial won't actually cover any tags or elements. This tutorial is more for learning HOW HTML works, so you don't exactly need a tutorial for every single little thing.
Also this is a repost of a really old topic and I wanted to add new stuff as well.
HTML stands for HyperText Markup Language. It is the original code for webpages, invented by Sir Tim Berners-Lee when he invented the World Wide Web. It's based off of SGML, which stands for Standard Generalized Markup Language.
Anyways, enough with the background
First, open up Notepad.
This is your working space.
HyperText Markup Language is based on tags, elements and attributes.
We'll start out by a real life example.
In Notepad, copy and paste this text:
<html> <head> <title>My Webpage</title> </head> <body> Hello <b>world!</b> </body> </html>
Then go to File - > Save As, then on the drop-down labeled Save As Type, click and select All Files.
Then type in mywebpage.html as the file name then hit Save.
Go to wherever you saved the file then double-click on it.
It should read:
Quote
So what makes the page say "Hello world"?
Let's go over the coding of the webpage. Go back to Notepad.
The first line of code:
<html>
This basically tells the internet browser the reader is using to use HTML. This is required on all pages you make.
HTML is based on the < and the > tags. The majority of the HTML you write will be in these tags.
All tags open with the < and then close with the > sign. If the code is wrapped around text, such as the bold tag,
the end must end with </ and >. You'll learn more about this later.
The second line of code:
<head>
This is where all the code (such as Javascript) goes that isn't shown on a webpage. This tutorial doesn't cover the tag.
The third line of code:
<title>My Webpage</title>
This is the title of the webpage, as the code non-subtlely says. The title of the page is the top of the window.
As you read earlier, the title tag opens up with <, contains the word "title" to tell the browser that it is the title of the webpage, then ends with >.
After the <title>, the text "My Webpage" is there. If you want, you can change that to whatever you want. The end of the line is important. As you can see, it reads </title>.
This tells the browser that the title of the page is finished and can now be displayed. Remember that all tags close with a /.
The fourth line of code:
</head>
This is the end of the header tag.
The fifth line of code:
<body>
This is the body of the webpage. Everything you write between the <body> and </body> tags will be on the actual page of the browser.
The sixth line of code:
Hello <b>world!</b>
This is the displayed text. The <b> tag means that anything between the <b> and </b> tags will be bold.
The seventh line of code:
</body>
This closes the body.
The eighth line of code:
</html>
This closes the HTML of the page.
Take time to understand the code, these are the absolute basics that will allow you to learn HTML!
















