HTML tutorial

This tutorial goes from the basics of HTML, to some of the more recent HTML5 elements.
If you do not know how to edit or save an HTML document, go to this "Getting Started" link.
If you want to use the HTML editor I made, just click this HTML Editor link.
I may or may not include my editor in certain parts of the tutorial.

HTML stands for Hyper Text Markup Language. At its very core, It is nothing more than tagging "elements"
which the browser (Intranet Explorer, Safari, Firefox, ect.) recognizes and runs.
The first step to learning HTML is to look as the basic code for every document and note the patterns.


An element is a keyword inside < >. It is impossible to make up your own tags (or elements) out of the blue. Predetermined ones must be used. W3 Schools has a comprehensive list of each element, and a thorough description for each one. You should have noticed that there are two of every element. one without a slash (ex: <html>, and one with a slash (ex: </html>). The element without a slash comes first to open the element, and the one with a slash comes second to close it.

Now lets go through this HTML document chronologically. First the <html> tag tells the browser what type of document it is. The <head> tag shows that anything inside it is part of the heading. <title> is the title of the page that appears in the open tab of the browser. The <body> shows that anything inside it is part of the body of the document. Each tag is closed with a slash and the tag name (ex: </html>). This is the format every HTML document should have.

Here are some things we are going to be learning. Hit the submit button to see it in action!

NOTE: You can resize the box to see the text better.


LESSON 1: BASICS

When that code runs, there are a few things to notice. The first is that the <h1> tag is the lergest heading tag, while <h6> is the smallest heading.
This allows the programmer to select the size of heading appropriate for what is needed. Notice the the elements used for the headings were placed inside the <head> tag. This is not because the <h#> tags have to be used inside the <head> tag, but because it organizes the code.
If you do not include a <head> tag, your code will look immature - as if you are learning HTML!

NOTE: While you may put text outside of a <p>, <h1>, <div> etc. tag, it is recomended that you put
text inside a tag. When coding in javascript, or CSS 3, it is very helpful to put text in tags.
Without a tag, you cannot give an element attributes. More on that later.

The <b> tag bolds text, but you should use <strong> instead, because a screen reader will not put emphasis on text bolded with <b>, but it will put emphasis on text
in a <strong> element. The <br> tag indents a line, much like hitting enter while typing in WORD. The tag traditionally read: <br />, however,
everyone uses <br> because it is shorter, and slang. The <a> tag is used for a link. The href="" and target="" are attributes, which will be covered later. A <fieldset>
is simply a border. A <legend> is text written on the border (cool, right?) The <hr> tag makes a horisontal line. It also used to be written as <hr />.
The <div> tag is just a grouping of code. It helps to organize your code, and identify multiple elements at the same time. The <input> element is a bunch of different elements at the same time! It is used for different types of inputs, such as different types of buttons and textboxes. Although there are seperate button and textbox
tags, I use input, because that was how I learned. It is not depreciated, so there will be the same effect whether or not you use <input> or seperate button tags.
The <img> tag is used for images. The AWESOME HTML 5 <video> tag now brings a uniform video standard to the web!!

NOTE: The <script> tag is used to code in javascript. You used to have to type in:
<script language="javascript" type="text/javascript">! Also the <link> tag is used for CSS.

EXCERSISE 1:

--Make a page with a title, heading, 2 paragraphs, bolded text, and a border around something--



LESSON 2: ATTRIBUTES

In essence, attributes are what give elements extra content or abilities. Take, for example, the title attribute. hover your mouse over the bolded title. An attribute is put inside a tag. EX: <strong title="wow">. The actual tag is strong, and the attribute is title. Your browser will not load a tag if there is no space in between the tag name and its attributes. Here are some of the most prominent attributes.


Here are the attributes used: The first attribute used here is the 'lang' attribute. It is used so that a screen reader knows what language it should be reading in.
Next, the 'id' attribute is used for identifying a specific element
A 'class' identifies any number of elements that need to be grouped together for some reason or another. Both topics will be discussed further in both the CSS 3 tutorial, and the JavaScript tutorial.
The 'href' attribute is where the URL goes for any element that directs the user to another page. It is an extremely important attribute! The 'target' attribute tells the browser to open the page in another tab.
The 'translate' attribute indicates whether or not the browser should translate an element's content. As of 2016 it is not supported by any major browser, so there is no point using it.
The 'title' attribute adds a small pop-up descriptor to any element.
'src' defines the path to source material, whether it be a picture, video, or code. This is without this attribute, the web would be severly handicapped!
The 'alt' attribute displays text when content, such as an image, is unable to be seen. It is needed, because antiquated browsers may not display certain file types, or content may accidently removed, and the alt can inform the user what the content should be.
Both 'width' and 'height' attributes set dimensions for content such as images and videos.
The style attribute sets different CSS properties for an element, although the better way to do that is by using the <style> tag, or by creating and linking an external style sheet.
The 'type' attribute is complicated. It is necessary for elements such as <input>, but for others it is only used as a comment, usually on an element's MIME type.
The 'value' attribute can be used in a plethora of ways wich are dependent upon the element they are modifying. It is most often used when putting text on a button, but it is also used in an unorderd list, progress bars, and many more. It is necessary for a lot of complicated server-side coding as well.
'onclick' is used when assigning a function (usually in javascript) to an element when it is clicked.
A 'placeholder' is text put in an input field which is automatically deleted when the user fills in the field.
'bgcolor' is a depricated attribute, but it is used to set the background color of a webpage. The proper way to set the background color is to use CSS.
'bgcolor' is a depricated attribute, but it is used to set the background color of a webpage. The proper way to set the background color is to use CSS.
'charset' sets the character set to Whatever the programmer desires. In America, it is UTF-8.

EXCERSISE 2:

--Make a page which uses a title attribute describing a text field, a numbered list of your favorite things to do, --
-- put a link to your favorite website that opens in a new tab, and an image from the web with an alt that is sized to 300X300.--




LESSON 3: