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 216997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:36:59+00:00 2026-05-11T18:36:59+00:00

In HTML attribute name=value pairs, what are the characters allowed for the ‘name’ portion?

  • 0

In HTML attribute name=value pairs, what are the characters allowed for the ‘name’ portion? ….. Looking at some common attributes it appears that only letters (a-z and A-Z) are used, but what other chars could be allowed as well?… maybe digits (0-9), hyphens (-), and periods (.) … is there any spec for this?

  • 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-11T18:37:00+00:00Added an answer on May 11, 2026 at 6:37 pm

    It depends what you mean by “allowed”. Each tag has a fixed list of attribute names which are valid, and in html they are case insensitive. In one important sense, only these characters in the correct sequence are “allowed”.

    Another way of looking at it, is what characters will browsers treat as a valid attribute name. The best advice here comes from the parser spec of HTML 5, which can be found here: https://html.spec.whatwg.org/multipage/syntax.html#attributes-2

    It says that all characters except tab, line feed, form feed, space, solidus, greater than sign, quotation mark, apostrophe and equals sign will be treated as part of the attribute name. Personally, I wouldn’t attempt pushing the edge cases of this though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since 'HTML' do not have the attribute 'name',I am looking for a way to
I'm trying to get an HTML source code meta tag name attribute value in
I use html attribute title to set some hints like this: <a href... title=Go
I have some HTML that is stored as an attribute on a tag. I
Normally an HTML form sends query parameters as key-value pairs like this: http://blabla/?something=something&this=that But
I have the following HTML: <form id=test> <input type=radio value=A name=C1/> <a href=javascript:selectCheckbox('C1', 'A');>
jQuery has an attr() method which retrieves the value of a given HTML attribute.
I'm looking at dynamically setting the ID attribute of HTML Input elements which are
Can jquery.ajax post a value from an attribute Name? If can, I want send
The generated HTML code for my custom ASP.net server control generates the name attribute

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.