Make Websites, Learn HTML Now!

by Elliot Waite on January 25, 2012

HTML is the framework for the content on a webpage. For example, this HTML…

<div>This info is inside a box, and <b>this text is bold</b>.</div>

would look like this…

This info is inside a box, and this text is bold.

You can’t see the box, it’s invisible, but it’s there. You could add a border to the box and move the box around, but we’ll be doing that with CSS.

HTML tags are enclosed in angle brackets, <>. If a tag encloses content, like the bold tag, <b>, it starts with an opening tag, <b> and ends with a closing tag, </b>. Any text between <b> and </b> will show up as bold. However, not all HTML tags will enclose content. For instance, when you post an image you do it all in one tag by adding a space and forward slash before the ending right angle bracket, so it would look like <img /> (which is the format for an image tag).

Each tag can also have additional attributes within the angle brackets after the initial tag name (ex. <img src=”http://somewebsite.com/image.jpg”). Each attribute can define more about what that tag does. For instance, the src attribute inside the <img> tag defines where the image is located.

The list of available HTML tags is quite short. There are only about 100 of them, and you usually will only be working with several of the most common ones. Here are some of the most common ones…

<html> Defines the root of an HTML document
<head> Defines information about the document
<title> Defines a title for the document
<body> Defines the document’s body
<h1> to <h6> Defines HTML headings
<a> Defines a hyperlink
<b> Defines bold text
<i> Defines italic text
<br> Defines a single line break
<img> Defines an image
<div> Defines a section in a document
<form> Defines an HTML form for user input
<input> Defines an input control
<hr> Defines a thematic change in the content
<ol> Defines an ordered list
<table> Defines a table
<tr> Defines a row in a table
<td> Defines a cell in a table

You can see them all, and learn about all there attributes here: http://www.w3schools.com/html5/html5_reference.asp

And if you want a tutorial, here is a great one to get you started: http://www.w3schools.com/html/default.asp

{ 2 comments }

Differences Between HTML, CSS, PHP, JavaScript

by Elliot Waite on January 24, 2012

HTML

HTML is the content. More here…

CSS

CSS makes it look good.

PHP

PHP can run function on numbers and strings, and can get and store data to and from a MySQL database. A database is just a collection of tables that store information, kind of like Excel spread sheets.

JavaScript

JavaScript is very similar to PHP in how it can run functions on numbers and strings, however PHP is only run once when the page loads and JavaScript is usually run after the page loads while the person is interacting with the page.

{ 1 comment }