Skip to content

Instantly share code, notes, and snippets.

@rhatano
rhatano / Basic Tags
Created February 26, 2012 14:19
Basic Tags
<html> </html>
*//Creates an HTML document
<head></head>
*//Sets off the title and other information that isn’t displayed on the web page itself
<body></body>
*// Sets off the visible portion of the document
@rhatano
rhatano / Colour
Created February 26, 2012 15:33
Colour
<body bgcolor="pink"> Sets the background colour, using name or hex value
<body text="black"> Sets the text colour, using name or hex value
<body link="blue"> Sets the colour of links, using name or hex value
<body vlink="#ff0000"> Sets the colour of followed links, using name or hex value
<body alink="#00ff00"> Sets the colour of links on click
@rhatano
rhatano / Text Formatting
Created February 26, 2012 15:38
Text Formatting
<hx></hx>
*//Creates a heading. Usually used to describe a portion of text. x-values range from 1-6, 1 being the largest, with 6 being the smallest
<b></b>
*//Creates bold text
<i></i>
*//Creates italic text
<tt></tt>
@rhatano
rhatano / Hyperlinks
Created February 26, 2012 15:43
Hyperlinks
@rhatano
rhatano / Frames
Created February 26, 2012 16:04
Frames
<frame>
*// Defines a single frame. A frame contains yet another HTML document within a HTML document. This tag needn't be closed.
<frame> attributes:
<frame src="URL">
*// Specifies which HTML document should be displayed. It can be a external or local source.
<frame name="name">
*// Names the frame, or region, so it may be targeted by other frames
@rhatano
rhatano / Tag example
Created March 3, 2012 14:33
Tag example
<xx> x </xx>
*//In this case <xx> is the opening tag, x is your text, and </xx> is the closing tag.
@rhatano
rhatano / Tag Example #2
Created March 3, 2012 14:34
Tag Example #2
<x y="z"></x>
@rhatano
rhatano / Tag Nesting
Created March 11, 2012 00:33
Tag Nesting
The convention for nesting of tags, by which I mean, what looks the best is closing your tags in the reverse order that you opened them, as in:
<x1>....<x2>.....<x3>...</x3></x2></x1>
@rhatano
rhatano / <a> attributes
Created March 11, 2012 22:29
<a> attributes
href is the first attribute, out of the realistically 2 attributes that you will need. This attribute takes the hyperlink tag, and directs it the url that is assigned to 'href'.
Usage:
<a href="this is your url">This is the text that acts as the link.</a>
#'a section of your webpage' is the attribute that links the hyperlink to a certain portion of the webpage.
It is used in conjunction with the id attribute, and the href attribute which identifies certain portions of your html elements.
<a href="#xxx"> Links to page content.</a>
@rhatano
rhatano / The first Declaration
Created March 17, 2012 18:45
The first Declaration
Say you have a simple webpage that you've worked tirelessly to create using your knowledge of HTML and it looks like this:
<p>The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you will know My name is the Lord when I lay My vengeance upon thee. </p>
But wait ! The Samuel L. Jackson you've just quothed wont work unless you declare what the hell you are doing first.
Basically, you must start off every HTML document you do with this declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">