iUnknown
20-07-2008, 01:01 PM
Hello,
I'm just going to explain some of the very basics of HTML.
Right, we know <b>this text</b> would be in bold, anyone who uses cutenews or has the smallest experience with websites or even myspace will know that.
So everything needs tags around it beginning with a word or letter. So the tags for an image is <img></img>. As there is usually no text inbetween these tags, a little shortcut you can take is making it <img />. Now, that will do nothing, it's just the tags. So we have to add what I call variables to the tag. So you want to make it show the image http://yourdomain.com/mypic.png. You use src as the variable for that so all you do is add that variable to the <img> part of the tag, so after the <img
So for every variable you add it is set out like this: variable="value"
So, the variable is src and the value is http://yourdomain.com/mypic.png. So the code will be <img src="http://yourdomain.com/mypic.png"></img> or <img src="http://yourdomain.com/mypic.png" />
Easy peasy, all you gotta know is the variable.
You can add more variables to it like height and width easily, so if you want to stretch the image to exactly 200 x 200 then you simply add these variables with those values. I prefer <img src="http://yourdomain.com/mypic.png" /> to <img src="http://yourdomain.com/mypic.png"></img> so:
<img src="http://yourdomain.com/mypic.png" height="200" width="200" />
How easy was that?!
Ok, a small thing that I want to say as well, you might know that <br> is a line break so if you put <br> in it'll go to the next line, however, that is not the proper way/XHTML way to do it. You should always have a beginning tag and end tag so you could put <br></br> or, the shortcut way, <br />. No one will ever call you a 1337 coder if you do <br> rather than <br />!!1!1!
Ok so the other thing that you'll want to know is how to do a link. Well the tag is <a>. The variable for an URL that it goes to is href. So you do <a href="http://yourdomain.com/page2.html"></a>
However, with that code, there won't be any text that you can click which is the actual link. From the <a> or <a whatever you have here > that is where the link begins and </a> ends it. So you'd put text between them, so:
<a href="http://yourdomain.com/page2.html">Click here for page 2</a>
Now, the target variable can be used to decide where the link appears. If you have an iframe, then you could make the value of the target the iframe's name and it would appear in the iframe. So if the iframe is called main:
<a href="http://yourdomain.com/page2.html" target="main">Click here for page 2 in the iframe</a>
It goes to iframe called main. For new window the value is _blank. So:
<a href="http://yourdomain.com/page2.html" target="_blank">Click here for page 2 in new window</a>
Simple. If you just want it to open on the same page then you don't need to define a target.
Oh and what I said earlier, <b>this text</b> is bold, you can use <i> for italic and <u> to underline. There are more like <s> for strike-through but I'm not going to explain them all. Remember to ALWAYS close the tag with /> at the end or </a> or </b> etc.
So that's the very basics, I'm sure it will help people who don't really have a clue about HTML.
I'm just going to explain some of the very basics of HTML.
Right, we know <b>this text</b> would be in bold, anyone who uses cutenews or has the smallest experience with websites or even myspace will know that.
So everything needs tags around it beginning with a word or letter. So the tags for an image is <img></img>. As there is usually no text inbetween these tags, a little shortcut you can take is making it <img />. Now, that will do nothing, it's just the tags. So we have to add what I call variables to the tag. So you want to make it show the image http://yourdomain.com/mypic.png. You use src as the variable for that so all you do is add that variable to the <img> part of the tag, so after the <img
So for every variable you add it is set out like this: variable="value"
So, the variable is src and the value is http://yourdomain.com/mypic.png. So the code will be <img src="http://yourdomain.com/mypic.png"></img> or <img src="http://yourdomain.com/mypic.png" />
Easy peasy, all you gotta know is the variable.
You can add more variables to it like height and width easily, so if you want to stretch the image to exactly 200 x 200 then you simply add these variables with those values. I prefer <img src="http://yourdomain.com/mypic.png" /> to <img src="http://yourdomain.com/mypic.png"></img> so:
<img src="http://yourdomain.com/mypic.png" height="200" width="200" />
How easy was that?!
Ok, a small thing that I want to say as well, you might know that <br> is a line break so if you put <br> in it'll go to the next line, however, that is not the proper way/XHTML way to do it. You should always have a beginning tag and end tag so you could put <br></br> or, the shortcut way, <br />. No one will ever call you a 1337 coder if you do <br> rather than <br />!!1!1!
Ok so the other thing that you'll want to know is how to do a link. Well the tag is <a>. The variable for an URL that it goes to is href. So you do <a href="http://yourdomain.com/page2.html"></a>
However, with that code, there won't be any text that you can click which is the actual link. From the <a> or <a whatever you have here > that is where the link begins and </a> ends it. So you'd put text between them, so:
<a href="http://yourdomain.com/page2.html">Click here for page 2</a>
Now, the target variable can be used to decide where the link appears. If you have an iframe, then you could make the value of the target the iframe's name and it would appear in the iframe. So if the iframe is called main:
<a href="http://yourdomain.com/page2.html" target="main">Click here for page 2 in the iframe</a>
It goes to iframe called main. For new window the value is _blank. So:
<a href="http://yourdomain.com/page2.html" target="_blank">Click here for page 2 in new window</a>
Simple. If you just want it to open on the same page then you don't need to define a target.
Oh and what I said earlier, <b>this text</b> is bold, you can use <i> for italic and <u> to underline. There are more like <s> for strike-through but I'm not going to explain them all. Remember to ALWAYS close the tag with /> at the end or </a> or </b> etc.
So that's the very basics, I'm sure it will help people who don't really have a clue about HTML.