![]() |
|
|
|
|
|
- HTML-Editor: (X)HTML-Format - Tutorials (editor realted) - Webmaster Tool: WebAnalysis
- News
|
Tutorial 2: Page layout with HTML and basic topics like tables, lists, images and text formatting.You will learn here
With this tutorial you will create a web page using the topics shown above. Prerequisites
If one ore more of the prerequisites are not fulfilled, you should first work through Tutorial 1: First Steps. Which Other Tutorials Exist ?There is currently an ongoing process in expanding the tutorials offering. Actually there are available the following tutorials for HTML-Editor (X)HTML-Format:
Tutorial StartIn Tutorial 1: First Steps you learned, how to create a project and how to generate HTML documents.
"./" stands for the root directory of your project, under which you can find all your project files. This directory will become later on also the root of your Internet domaine.
./links/index.htm The file in directory "links" should have the title "Links of Interrest". After you have created the files and added them to your project, the project view should look similar to the image above. Formatting of Document Contents Without CSS.Open now the just created file "index.htm" in directory "links".
<body bgcolor="#ffffff" text="#000000" link="#ff00ff" vlink="#cc00cc" alink="#aa00aa">
Links for Aquarium Enthusiasts </body> Now mark the headline and then select menu item: "Function->Headlines->H1" The result should look like:
<body bgcolor="#ffffff" text="#000000" link="#ff00ff" vlink="#cc00cc" alink="#aa00aa">
<h1>Links for Aquarium Enthusiasts</h1> </body> Now go back again to menu item "Function->Headlines" and closely look at menu item "H1". Behind H1 you see a key combination "ctl+1" (acceleration key) which also can be used to do the formatting. This is valid for all menu items. If you see an acceleration key behind the menu item text, you can use it to perform this function. Remark:
To watch the results generated by your input, HTML-Format offers a straight foreward internal pre-view browser and in addition you have the possibility to establish links to your favourite browsers. Up to three links to pre-view browsers can be established. To trigger a pre-view just click onto one of the pre-view buttons: Most likely you have just linked to one external browser, therefore you should for the moment just use the 2 leftmost buttons. For the moment you also need not to store the content of your document permanently. HTML-Format generates a temporary file with the content shown in your editor pane. You can test the effect of changes without actually saving the content to your project file permanently and by that discarding the original content. If you have typed in a lot of changes, which you do not want to keep, just close the file and re-open ist again. For small changes it is sufficient to use the "undo" function via the "Edit" menu or via the "undo" button: Add some more text below the headline to explain, that you are providing some "links" an interested user may follow.
To highlight the text by using a bold font you have to mark the text to be highlighted. Then you have to select in menu "Edit" the "Bold" menu item. The result should look like: <body bgcolor="#ffffff" text="#000000" link="#ff00ff" vlink="#cc00cc" alink="#aa00aa">
<br>
<h1>Links for Aquarium Enthusiasts</h1> <b>Here you will find <br> links of interest<br> to get further information.</b> </body> Now go back again to the "Edit" menu and look at the menu item "Bold".
You will recognize, that in front of the menu item text an icon is shown. This indicates, that this function also can be found in the button and tools bar.
Insertion of Tables with the Table Dialog.Tables can be generated with (X)HTML-Format very easily. We now create a table with two columns and serveral rows. The first row shall be a headline.
To do that, please open the table dialog in the button bar "lists and tables" via button:
Enter a 2 for both, column and rows and click onto headline.
The additional settings you may leave as they are. They are axplained later on.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <th> </th> <th> </th> </tr> <tr> <td> </td> <td> </td> </tr> </table> This is the base skeleton of your table. But in the pre-view you will not yet see something, because there is no content yet.
Fill in now the text for the headline. For that you must know, that tables are composed from columns (TH and TD tags) and rows (TR tags).
For details please consult selfHTML via the "Help" menu.
<tr>
<th>Link </th> <th>Description </th> </tr> Call the pre-view and have a look of what you have created. You now see the two words "Link" and "Description" in the table. It is easier to recognize what you see as a table, if we put a border around the cells. To achieve that wie modify the HTML source code a little. Instead of border="0" we now state border="1" in the table tag. Call again the pre-view. You now see a border around the headline cells. As the table body still is empty, no body is shown. Insertion of Links with the Link-Dialog.Now we will insert the first link into our table and then provide a description to this link.
<tr>
<td><a href="http://en.openwebsuite.org">HomepageHelper.de</a> </td> <td> </td> </tr> Enter into the second TD-tag as description "HomepageHelper.de - The site for the Webmaster" and click again onto the pre-veiw button to watch the result. In dialog "Insert Link" you may have recognized a button labled "Search". Via this button you can select local files of your web site. The path is automatically stored as relative path to the actual document. You need not care about it anymore. Now insert two more links of your choice into the table, just to get some more familiar with it.
Remark:
The following options can additionally be specified in the table dialog: Column Spanning Header Select this option (colspn heading) to combine all column headers to a single one and to create a centered headline for all columns. The headline text please provide in the field below.
Class-Name Here you can specify a style sheet that shall be used to format the table. The specified style sheet is saved and is available for reuse when you open your next table dialog.
Borders, insets and width
Insertion of Lists with the List-Dialog.Besides tables to group and structure information also lists are used very frequently.
The list dialog opens. Select first the list type "Disk". You may recognize, that there some more list types and enumeration types exist.
You may play around with those later on.
After the "OK" button is clicked a source code similar to this will be generated:
<ul title="HomepageHelper.de provides the following:" type="disc">
<li></li> <li></li> <li></li> <li></li> </ul> Fill now the list by adding a text for each list entry (between the start and end list tag)
<td><a href="http://en.openwebsuite.org">HomepageHelper.de</a>
</td> <td>HomepageHelper.de - The site for the Webmaster Here you find:<br> <ul title="HomepageHelper.de provides the following:" type="disc"> <li>Homepage-Tools like Download-Counter and Forms-Services</li> <li>Homepage-Software</li> <li>Java-Applets</li> <li>Hints and Tricks</li> </ul> </td> Again have a look at the result in the pre-view browser. Insertion of Graphics with the Graphics Dialog.Graphics make a web page more attractive. Without them a web page appear a little boring. Important for graphics on web pages is: a suitable graphics format, a limited real estate for the image on your screen and a reasonably small file size to allow fast loading of the image. As a rule of thumb can be said: the GIF format for graphics (e.g. cartoons) using a limited palette of colors and homogeneous color areas and the JPG format for photos and graphics with a very big number of colors is a good choice. For line graphics, you also can consider the PNG format which is freely usable and has no copyright restrictions. In each case a graphics object should be relatively small with respect to storage consumption. Less than 40 KB should be the rule.
Create in the root directory of your project a "graphics" folder and copy to it a GIF image and a JPG image of your choice. But select reasonable sized ones - with respect of dimension and storage usage. To embed graphics into HTML documents, (X)HTML-Format offers the grafics dialog with pre-view. Position your cursor in the TD tag right before the description of a link and click onto button:
Now enter an alternative text for the graphics object. This text is shown in the browser, if you move with the mouse over the real estate the graphics object occupies on your desktop, or if the object is not yet loaded completely by the browser. If you like, you can change the size for presentation. The pre-view is automatically adjusted. If you allow, that the height to width ratio
can change (non proportional resizing) you can deselect the associated check mark. (Annotation, the reduction of the presentation size does not
change the file size. The resizing is done by the browser just for presentation, after the image has been loaded.)
Now click the button "OK". This will create a tag, that looks like this:
<a href="http://en.openwebsuite.org"><img src="../../grafik/html-format1.gif" alt="(X)HTML-Format - a little bit better" border="0" width="200" height="70" style="float:right; margin-left:20px; margin-bottom:10px" /></a>
Have a look at the result in the pre-view browser.
Remark:
(X)HTML-Format keeps in mind the folder from which you have selected a graphics object the last time. When you open the graphics dialog the next time this folder is selected as default value. CSS: It makes sense to store the CSS definitions generated by (X)HTML-Format dealing with text flows around graphics objects in a CSS file. Please read more in Tutorial 3: CSS, Code-Snippets and Other Functions for Advanced Users. Using the Color Dialog and the Color History.OK, now you are almost done. We just have to talk about the "colors" section in the button and tools bar,
which is normally used during HTML document generation pretty frequently.
RR stands for the red component of the color, GG for the green component of the color, and BB for the blue component of it.
With these components you can describe every color available for your screen.
To simplify the color definition, (X)HTML-Format offers a color definition dialog. You can use this dialog in 2 different manners.
Primarily for the text formatting, and secondly for color changes.
As a result you should see a tag similar to this one:
<font color="#000066">HomepageHelper.de</font>
In the left part of the color dialog you see a "color history". This matrix shows the colors you have selected previously. You can recall them from this matrix for color definitions in the same way as you do from the main color definition matrix. This history is kept across sessions. By this you have a record about the colors you used for your project. To change a color later on, you just set checkmark "only hex-value" to "on" and than mark the hex value in the document, you want to change,
with "#" (the number sign), but without the double-quotes.
Coming Up ...Congratulations, you have finished this tutorial successfully. You should now be able to create and maintain your own web pages with
(X)HTML-Format.
Best regards All rights on this tutarial belong to Christian Diekmann. You may reuse and distribute it only with written permission of the author. |