| Code | Result |
|---|---|
<a href="../images/mog.gif">This is a local file link<a> <a href="http://www.yahoo.com">This is link to another site</a> |
This is a local file link This is link to another site |
Usage of another parameter of the anchor tag allows us to refer not only to a specific document, but also to a particular part of the document. It can be done in two steps. Step one is you need to put a special mark at the exact place of the document you'd like to refer to. It can be done using parameter name of the anchor tag:
<a name=specific_name></a>Now assuming that the previous line is in a file named file.html we can refer to it in another document as:
<a href="file.html#specific_name>This is a link to a specific position</a>
| Code | Result |
|---|---|
<img src="../images/s5.gif"> |
|
| Parameter | Description | Values | Usage | Example |
|---|---|---|---|---|
| align | This parameter allows to align the image inside the text. All possible values can be divided into 2 groups: LEFT, RIGHT and all the rest. If parameter align has LEFT or RIGHT value, then we have so called "floating" image. In this case the image is shifted to the corresponding side of the browser window and following text or other elements are shifted to the opposite side. In the case of using any other value of the align argument the image is considered inserted into the text line (just like a big letter). |
|
||
| width | width of the image in pixels or other measurement units | |||
| hspace vspace |
these two parameters allow you to separate the image from the text. Their values are horizontal and vertical distance in pixels. | # of pixels | ||
| border | Size of the image border in pixels | # of pixels | ||
| alt | text which will be shown if image is not loaded or when you point mouse on the image, This example also shows how to use images as links. | a string |
Here we discuss some properties of using an image as a background of the document. Please take a look.
| Code | Result |
|---|---|
<ul> <li>First item </li> <li>Second item </li> <li>Third item </li> </ul> |
|
Bot tags <ul> and <li> have an optional parameter type that can have the following values: disk, circle, and square. These values set the item marker. The default value is disk. If the parameter is used in <ul> tag, then it changes the type of markers for all items in the list. If it's used in <li>, then it changes only the marker of this particular item. In the case of nested lists browser will switch the markers in the order. Later we'll discuss how to change the default images and add your own markers to get something like this:
Being applied to an element of the list this parameter changes just the style of this particular element, but if used as a parameter of the <ol> tag, then changes all items. Tag <ol> can also have a parameter start which specifies the number the enumeration should be started with. Similar parameter value of the tag <li> allows to change the number of the specific element on the list and all the following items. Here is an example that illustrates a rather sophisticated list:
| Code | Result |
|---|---|
<ol type=I start=100> <li type=I start=100> This is Roman one hundred <li> And this is 101 <li value=1000> And this is one thousand <li> and this should be 1001 <li type=i> here I temporarily switched to small Roman digits <li> and now we are back to capital ones </ol> |
|
Although tags <ol> or <ul> and <li> are used together almost all the time, it is possible to use them separately. Try to do it and see what they do without each other.