Hello guys,
I am looking to create a poll in WordPress using HTML code.
I found many usufull into on the web, but i have a problem with undestanding how to put answer keys side-by-side?

I imagine it to look somewhat like this :

Far Cry 5

Yey! (button) Nay! (button) .. if possible Click to buy (button)

This is what i have so far :

<form action="server_file_to_process_form_data" method="post"><b>Poll</b>
<b>Far Cry 5</b>
<input name="answer" type="radio" value="1" />Yey!
<input name="answer" type="radio" value="2" />Nay!
<input name="submit" type="submit" value="Submit" />
</form>

But it looks so dull. Maybe someone can help?

Thank you a ton!
Nataie

Hello!!!
Firstly as you are using WordPress so the best way for creating a poll is to install a plugin activate it and then customize as per your needs.

On the other hand if you still need a code for it then here you go

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <link rel="stylesheet" type="text/css" href="style.css">

    </head>
    <body>
        <div class="poll">
            <div class="poll-question">
                This is the poll question
            </div>
            <form action="vote.php" method="get">
                <div class="poll-options">
                    <div class="poll-option">
                        <input type="radio" name="Choice" value="1" id="c1">
                        <label for="c1">Yey</label>
                    </div>
                    <div class="poll-options">
                        <input type="radio" name="Choice" value="20" id="c2">
                        <label for="c2">Nay</label>
                    </div>

                </div>
                <input type="submit" value="Submit answer" class="btn">
                <input type="hidden" name="poll" value="1">
            </form>
        </div>
    </body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.