Basic tags
This page is about all the basic tags used in a webpage. For example, to insert a link or an image, etc.
Text styles
- <p></p> will produce a paragraph.
- <br /> inserts a line break.
- <b></b> or <strong></strong> are used to bold a text.
- <i></i> or <em></em> are used to make italic text.
- <u></u> is used to underline a text (deprecated).
- <del></del> will strike the text. You can also use <s></s> or <strike></strike> but they're deprecated.
Note: in the source, white spaces don't affect the display of the page.
Insert a link
A link can point to an other site or a file. Remember, an URL starts with http://! The code to insert a link is:
<a href="http://domain.com">link text</a>
If you want to make a link to an email, just put mailto: before your email in the href attribute. Beware of spam.
Insert an image
<img src="your_image.jpg" alt="" />
This is the simpliest form. src is a required attribute; its value must be the path/URL to your image so it must end in .jpg, .gif or .png.
<img src="your_image.jpg" alt="" width="x" height="x" border="x" />
The code above is a bit more complete, with width, height and border attributes. Obviously, x must be a number value and it is in pixels. To avoid an unwanted border on linked pictures, you should put border="0"...
Sponsors
Leave a Comment
Works? Doesn't work? Other tips? Please leave a comment! :)