Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7164199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:02:01+00:00 2026-05-28T14:02:01+00:00

I am working with a HTML application with Python. I usually use the %

  • 0

I am working with a HTML application with Python. I usually use the % sign to indicate that I’m using a Python element, and never had a problem with that before.

Now, I am using some tables which I’m trying to control their size bye the percentage using the % sign. So now the Python does not show the Python elements.

Here is some code to explain myself:

<table width="90%">
<tr>
<td width="60%">HELLO</td>
<td width="40%">GOOD BYE</td>
</tr>
</table>

<input type="button" value="BUTTON" onclick="function(%s)" /> ''' % variable

The error that I am having says

unsupported format character ‘”‘ (0x22) at index 19″

making reference to the %s string in the onclick=function(%s)

Does someone know if the % sign in the tables affects Python or something like that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:02:02+00:00Added an answer on May 28, 2026 at 2:02 pm

    You need to escape ‘%’ as ‘%%’ in python strings. The error message you’re getting probably is about the other percent signs. If you put only single percent sign in a string python thinks it will be followed by a format character and will try to do a variable substitution there.

    In your case you should have:

    '''
    
    ....
    <table width="90%%">
    <tr>
    <td width="60%%">HELLO</td>
    <td width="40%%">GOOD BYE</td>
    </tr>
    </table>
    
    <input type="button" value="BUTTON" onclick="function(%s)" /> ''' % variable
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm an email n00b but I am working on an application that sends HTML
Hey all. I'm working on an application that was originally intended for HTML, but
I am working on an application which connects to the mail server using python
I am working with the sample Home application project on http://developer.android.com/resources/samples/Home/index.html I've added another
I have a strange problem working with HTML,CSS in different browsers: Firefox 3.6 and
I'm working on an HTML class in PHP, so that we can keep all
I'm working on HTML for a small web application; the design calls for a
I have problem with using template in Google App Engine by Python. the thing
I'm working on a web application that will return a variable set of modules
I am working on a python application which allows me to post updates/statuses to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.