Display Images in HTML

Ok so you want to add a image to a HTML document, heres how you do it.

<img src="URL OF IMAGE"></img>

<img src="http://www.google.com/intl/en_ALL/images/logo.gif">
</img>

This would produce this:

More advanced things include
alt, border, height, and width.

Like this
<img
src="http://www.google.com/intl/en_ALL/images/logo.gif" alt="Google's
Logo" border="2" height="30" width="30"></img>

That would make this, because the height and width is 30 it is a 30×30 image.
The alt makes the scroll over text appear (when you scroll your mouse over the image).
The border is the amount of border the border when it’s is a link (default is 2).

Read More

Creating Links in HTML

Ok well you want to link your pages to each other here’s what you need to do.
<a href="/page.html">Name of the Link</a>
Here is the code you use, the href is the page you want to link to.
If you want to a page that’s not a local file you can do.
<a href="http://google.com">Google</a>
You have to include the http:// if it’s another website.

Before the </a> is the name of your link, like this would be…
<a href="http://drawne.com">like this</a>

Read More

Limit Length of Text in PHP

Ok say you have a title like this:
“This is a long title for a story this is a title wow.”
And you want to have a excerpt from it.
Such as “This is a long title” instead of the whole thing

We would use the PHP substr function, which goes like this.
<?
$test = "your text here adding length here";
echo "".substr($test, 0, 25)."";
?>
$test is the text to clip, the 0 is where is starts in the phrase (0 makes it the beginning), while 25 is the amount of letter to clip.

This would make it say “your text here adding len”.

Then you could add to the end off the echo a …
like this:
echo "".substr($test, 0, 25)."...";

Read More