HTML - A New Title After Table
Hi everyone
I have a Perl script that translates a text file into HTML table. The script works fine, it's the HTML part of it that doesn't work the way I want it. Here is the script. Code: #!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; my ($file1,$fileread1,@array1,$line1,$lastcol1,$firstcol1); $file1= '/home/yanni/scripts/testfiles/tempfile1'; open ($fileread1, $file1) || die "Could not open $file1: $!\n"; @array1 = <$fileread1>; close ($fileread1); #--> SET PAGE TITLE, POSITION & FONT SIZE print '<CENTER><STRONG><FONT SIZE="8">Blue</STRONG></CENTER>'; #--> SET TABLE TITLE print '<CENTER><TABLE BORDER="5" BORDERCOLOR="BLACK" WIDTH="30%" CELLPADDING="5" CELLSPACING="5"> <TR><TH COLSPAN="10"><H2><FONT SIZE="5">Work1</H2></TH></TR>'; print '<center><tr><th>Row 1</th><th>Row 2</th></tr><center>'; foreach $line1 (@array1){ ($lastcol1,$firstcol1)=split(/\s+/,$line1); print "<center><tr><td>$firstcol1</td><td>$lastcol1</td></tr>\n<center>"; }; ####################tempfile2##################### my ($fileread2,$file2, $array2,$line2,$lastcol2,$firstcol2); my $file2= '/home/yanni/scripts/testfiles/tempfile2'; open ($fileread2, $file2) || die "Could not open $file2: $!\n"; @array2 = <$fileread2>; close ($fileread2); #-->SET BROWSER TAB NAME print "<TITLE> TEST </TITLE>"; #--> SET TABLE TITLE print '<CENTER><TABLE BORDER="5" BORDERCOLOR="BLACK" WIDTH="30%" CELLPADDING="5" CELLSPACING="5"> <TR><TH COLSPAN="10"><H2><FONT SIZE="5">Work2</H2></TH></TR>'; print '<center><tr><th>Row 1</th><th>Row 1</th></tr><center>'; foreach $line2 (@array2){ ($lastcol2,$firstcol2)=split(/,/,$line2); print "<center><tr><td>$firstcol2</td><td>$lastcol2</td></tr>\n<center>"; }; ####################tempfile3#################### my ($fileread3,$file3, @array3,$line3,$lastcol3,$firstcol3); my $file3= '/home/yanni/scripts/testfiles/tempfile3'; open ($fileread3, $file3) || die "Could not open $file3: $!\n"; @array3 = <$fileread3>; close ($fileread3); #--> SET TABLE TITLE print '<CENTER><TABLE BORDER="5" BORDERCOLOR="BLACK" WIDTH="30%" CELLPADDING="5" CELLSPACING="5"> <TR><TH COLSPAN="10"><H2><FONT SIZE="5">Work3</H2></TH></TR>'; print '<center><tr><th>Row 1</th><th>Row 2</th></tr><center>'; foreach $line3 (@array3){ ($lastcol3,$firstcol3)=split(/\s+/,$line3); print "<center><tr><td>$firstcol3</td><td>$lastcol3</td></tr>\n<center>"; }; #print '<CENTER><STRONG><FONT SIZE="8">Blue</STRONG></CENTER>'; ######################putting the tables side by side####### print '<style type="text/css" media="screen">BODY { color:white; background-color:00100C; font-family:sans-serif; } table { border: 6px solid blue;float:left;width:400px;} table_container{width:800px;margin:0 auto;} </style>'; The HTML part of the script above it will give a title and then 3 tables side by side each one of them representing the content from a different text file. What I'm trying to do is create a new title and then produce some more tables from some other text files but when I put a new HTML title at the end of this script, the title goes above the 3rd table not below it. All I 'm trying to do is repeat the script above to translate some other text files into HTML on the same web page. Can anyone help me please? Similar TutorialsHi, I am developing a calendar application in ASP. The calendar is displayed in a table where each cell represents a date and has a + and - in it. The + represents people working on that date and the - those who are off. I need to add 'title' information to table cells so that when the user moves the cursor over the + or - the respective information to be shown. I tried to do this as follows: <td><title = "worklist">+</title><title="freelist">-</td> This doesn't work, nothing appears when the cursor hovers over either the + or -. I can combine the worklist and freelist and display it in one go with: <td title="listall">+=</title> but this is unsatisfactory. Too much data is displayed and the result looks messy. I dont want to double the amount of cells by having + and - in seperate cells either. Is there a trick that allows seperate <title> info in the same cell. Help would be appreciated, regards, Guy I drew this example in photoshop, but I know I've seen tables (or divs) set up this way before where the there is text in the border. I was thinking it was a simple script, or maybe even just a property. I've searched everywhere and can't come up with an example. See my example below. Thanks!! How do you center the title in a table. Code: <table> <th>Monsters</th> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td></td> </tr> </table> is there a way to put a href into a title of an image? Hello, Im tyring to create a group by box with a title identical to the attached, I cant figure out how to make this happen Can someone show me a mock up of this? Need some info on <title>. i've noticed that when i use the <alt> tag and rollover an image the alternative text doesn't show up, it only show's up when i use the <title> tage... do i need to be using both? which file do i edit to change the title tag? lol i know i suck. Sorry that my first post on this forum is a question, but I've spent way too much time trying to figure this out on my own. What's the HTML or code to place images in the title of a webpage? As in this image... Any help you can give would be greatly appreciated!! -Matt My title disappears in Ie, but is visible in FF. Site validates. Any ideas? http://www.apnaonline.ca Thanks, Geoserv. Hey! (Hey, so, I'll see a game "SEO" on the website of zero!) I was a little silly question, but hey .. I am currently redoing my site A to Z and I asked a basic question! We know that it is advisable not to exceed 70 letters in the title tag, but the spaces between words count for a letter? Thank you in advance amigos Hello HTMLforum this is my first post. I'm looking for a code that changes the title of the page constantly, like you often see on defaced webpages... Thanks How do i change the circled text in a browser? EDIT: Its a Pop-up.. Just wondering how do I get the innerHTML of document.title using javascript, I tried; var title document.title.innerHTML; But it's not working, anyone help me please? I heard that the <title> tag is the most important meta tag you use on your page, so I want to use it more fully than I currently am. At the present, I have a single title tag that I use in my header file that every page on my web site (link in my signature) uses. My question is, would it be better to put a <title> tag on each page individually and get rid of the title tag in my header file? My site is new, and I'm pretty new to the specifics of web hosting (I'm a hobbyist webmaster) so any help would be appreciated . Hello, For some reason my title tag is still showing up as "Untitled Document" below is a snippet of the code that I currently have for my site. It reads correctly after I upload it to my FTP but it doesnt display correctly in the preview mode in dreamweaver cs5. I have never seen this happen and I'm not sure why it is doing this. I have some php on my site and have a testing server set up. Maybe this is why?Please help... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Eau Claire Coupon Advertising::Local Ad Saver</title> <style type="text/css"> how do i put a picture on the title bar? well, some sort like the bulb on this website. Hello, I am new to the forum, my question is, how do you get the little image that shows in the title of the web page and on the browser tab? Thanks Chunk Ok, just made a website on photosohp and transfered it to notepad, then hosted it on free webs http://www.freewebs.com/narcotica. At the top of the window the title says "New Page 1", how would i change this? Many Thanks, Narc Hi, I've got this issue. I've got a thumbnail of a post of wordpress on top of the title of the post. I want to so the thumbnail is to the left of the title. so its like this: ----------- | Image | Title ----------- Here is the link to the website: I tried putting in the tag align="left" to the image but that didn't make a difference at all. I would appreciate the help. |