0

Hi just curious if there is a way to create a box that can be typed in to enter information so that I can take the output and use it in an anser page? Also is there a special HTML code to create spaces between lines of text? Thanks for help in advance and this is the c++ code I have so far w/ the HTML text

#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    
    cout << "Content-type:text/html\n\n <br>";
    cout << "<html> <br>" << endl;
    cout << "<head> <br>" << endl;
    cout << "<body> <br>" << endl;
    cout << "<body bgcolor=\"red\"> <br>" << endl;
    cout << "<font color=\"white\"> <br>" << endl;
    cout << "<center><b><font size=\"+4\"><blink>My Christmas Wish List</blink></font></b></center>\n <br>";
    cout << "\n<font size=\"+2\">The one thing I want most for Christmas is:</font> \n <br>";
    cout << "\n<font size=\"+2\">The reason I think I deserve to get this is:</font> \n <br>"; 
    cout << "<font size=\"+2\">1: I have been a very good boy/girl all year.</font> \n <br>";
    cout << "<font size=\"+2\">2: I have been a very good boy/girl most of the year.</font> \n <br>";
    cout << "<font size=\"+2\">3: I have been a very good boy/girl for the month of December.</font> \n <br>";
    cout << "<font size=\"+2\">4: I was a very good boy/girl yesterday.</font> \n <br>";
    cout << "<font size=\"+2\">If I was on a good boy/girl list my name would be shown as:</font> \n <br>";
2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by MattEvans
0

you'll want to use a form, and some inputs:

http://www.w3.org/TR/html4/interact/forms.html
http://www.cs.tut.fi/~jkorpela/forms/cgic.html

as for a space in text, i'm guessing you don't mean a line break because you're using them (<br/>)... If you put alot of spaces, HTML converts them into one space, so use an entity: &nbsp; for a non breakingspace and &emsp; for a normal space.... or &thinsp; for a thin space...

I usually use &nbsp;... eg:

[B]This[/B]&nbsp;&nbsp;&nbsp;&nbsp;[B]text[/B]&nbsp;&nbsp;&nbsp;[B]will[/B]&nbsp;&nbsp;&nbsp;[B]have[/B]&nbsp;&nbsp;&nbsp;[B]big[/B]&nbsp;&nbsp;&nbsp;[B]spaces[/B]
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.