Jump to content
TNG Community

New to HTML - help with coding please

Recommended Posts


I am very new to HTML - I'm having to learn it because I want to create history pages based on historytemplate.php, and I need to be able to format my text etc so it looks good on screen.

At the moment I have two history files, the first (rogues1.php) was created by converting a Word file from Word into HTML, and copying the html into  my new file. This has resulted in a lot of messy code, but thanks to Newfloridian some of this has been stripped out.

The second (jamesmcaleerstory.php) was created by copying and pasting the contents of another Word document directly into a second php file, and starting the formatting from there. This is a much tidier file. 

Both are still very much a work in progress, so please be understanding.

I've been using the forums and online HTML tutorial where I have been able to find something that seems to be what I want,  but sometimes I can't find an answer that works, and other times it seems to work in one file and not another. I'm sure I am going to be posting a lot of queries for help in the next few weeks, but my first two questions are these:

1. Why do the two files handle single and double quotes differently from each other? In one (rogues1.php), I can just enter them directly and the display perfectly - as in father's or "The Flight of the Allens".  In the other (jamesmcaleerstory.php) this produces and error - so here father's appears on the page as  father’s. In this file I have to use codes  ' and " . However, there is at least one example in this same file where I have typed "Peter's"  in the html document and it appears exactly as that with double and single quotes which is exactly what I wanted! 😩

2. My second question is about center-justifying text - ie so that text ends neatly on both sides and is centred in the middle of the page . This will apply to various quotations that I've included like a newspaper article extract in rogues1.php and a quote from a letter in jamesmcaleerstory.php.  I found out how to produce the newspaper extract in two columns, which I liked but have since taken out, but it still didn't justify the text on both left and right.  

The files are attached and can be viewed on my website at 

http://parcel-of-rogues.org.uk/parcel-of-rogues/histories/rogues1.php and http://parcel-of-rogues.org.uk/histories/jamesmcaleerstory.php

Username: Guest; Password: Familyfriend

Can anyone help please?

Thank you





Share this post

Link to post
Share on other sites
Ken Roy


Take a look at the TNG Wiki Web Apps - The Least You Need to Know article.  There are some good references to HTML tutorials.

Page needs to be updated to add a Related Links section that makes it easier to find the tutorials  Sorry, I do not have the time to update the article that Leslie wrote at this time.

Share this post

Link to post
Share on other sites

What are you trying to do with HTML that you can't do with the controls at the top of the "Body Text" entry block? You use this just like you'd use the ribbon bar on MS Word, and it does the HTML for you behind the scenes. If you're seeing HTML code then click the blue button at the right end of the row of buttons



Share this post

Link to post
Share on other sites

Hi Sharon

Have you tried SeaMonkey Composer? http://www.seamonkey-project.org/

You can paste from MS Word into SeaMonkey without any formatting and then you can do search and replace in Notepad ++ if you need to do that.

Do not paste from MS Word source code, but directly from the document.

I used it when I first started to learn HTML  for many years ago.



seamonkey composer.png


Share this post

Link to post
Share on other sites

Sorry - only just seen these last two messages.

Roger - I was just trying to create a php file, and it seemd to save, but I couldn't see anywhere to specify where to save it, and I couldn't find the file anywhere on my site afterwards. 

cfj - thank you for that. I may try that in the future. I have done 3 pages so far, the last tryng to create html from scratch. Thanks to Newfloridian, I have spent some time simplifying the code and I am finding that there are certain ways of formatting that I repeat in each page - justifying, adding images with captions, putting in link and so on, so I can just copy over the bits of code I need. It's not as easy as creating a page using a wysiwyg editor, but it is definitely getting quicker to produce each one,.


Thank you both for your help.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now