Linked Questions
606 questions linked to/from HTML: Valid id attribute values?
126 votes
5 answers
51k views
What characters are allowed in DOM IDs? [duplicate]
Possible Duplicate: What are valid values for the id attribute in HTML? Underscores seem fine. What about dashes? Other special characters?
27 votes
6 answers
13k views
What are legal characters for an HTML element id? [duplicate]
What characters can I use in an identifier for an HTML element? For example: <SPAN id="section[5]" ...> (Or rather, should I stick to certain characters to make sure the id works across all ...
36 votes
3 answers
10k views
Is it valid to put a period in the "name" attribute of a HTML5 input? [duplicate]
Possible Duplicate: What are valid values for the id attribute in HTML? valid value for name attribute in html It is valid to name a HTML5 input with a string containing a period? <input ...
9 votes
2 answers
5k views
Why can an element id not start with an integer? [duplicate]
I'm learning about jQuery selector. w3schools tutorial says that "Do not start an id attribute with a number. It may cause problems in some browsers". I tested and saw it really does not work. I ...
-1 votes
2 answers
864 views
html id/class first symbol digit, is valid? [duplicate]
In HTML, what characters are valid as the first character in an id or class attribute? For example, is <div id="4bla"></div> valid or must they start with only letters?
1 vote
2 answers
2k views
jQuery Syntax error, unrecognized expression - Using { [duplicate]
I'm using jQuery with SharePoint 2013, and have to get the table Id to add an attribute. The table Id is {44C80A95-F3E4-40DA-9A97-50CADFFFED61}-{DD02CEA7-CC2B-4E4A-A725-86E82C6D11FC} When I use: ...
7 votes
3 answers
401 views
div with the id="(name)" can I use this or not? [duplicate]
Can I use id with "(" and ")" in jquery mobile ? for example: <div id="RSI(3,4)"> </div> I have tried that id and want to access that element in js. $("#RSI(3,4)").html("some text"); ...
1 vote
1 answer
6k views
Javascript - Uncaught Error: Syntax error, unrecognized expression [duplicate]
Edit: I think the issue is not with concatenation itself but the special character in the id of the element I am trying to select. Original: I am having problem with concatenating two strings. It ...
1 vote
1 answer
1k views
Does getElementByID() method work if ID contains spaces [duplicate]
Element i have has spaces within the id attribute which is causing the getElementByID() to not work and not be able to capture the element. If there any workaround i can do in this. Do i have to ...
0 votes
4 answers
692 views
Different CSS for divs in jQuery loop [duplicate]
I want to do an jQuery fade in and fade out in a loop such as here in this jsfiddle But I want to maintain different css positioning for each of the .trip elements, ie, the elements fading in and out....
0 votes
2 answers
327 views
Is it allowed to use '/' within the value of the id of a html-element [duplicate]
Possible Duplicate: What are valid values for the id attribute in HTML? Hi, I'm struggeling with the jQuery UI Tabs and the needed ids. Let me give you an example: <div id="tabs"> <ul&...
-1 votes
1 answer
426 views
can not get element by id using jquery and d3 but working by native code [duplicate]
console log is below. -> d3.select("#node1") <- qa {_groups: Array[1], _parents: Array[1]} -> d3.select("#node1.1") <- Uncaught DOMException: Failed to execute 'querySelector' on 'Document': ...
0 votes
1 answer
213 views
Linear gradient is not working with <a> element [duplicate]
I am trying to apply CSS gradients to my <a> elements. It clearly doesn't work and I've been trying to work it out with no success. I am using Chrome if it has to do anything with the issue. ...
0 votes
1 answer
97 views
naming division id anything I want [duplicate]
Sorry for such a basic question. when writing different div elements to later ID and style in css, can I name them whatever I want? <div id="middle"></div> <div id="yellow box"><...
1 vote
0 answers
68 views
What are valid id and name attribute values in HTML? [duplicate]
Recently I ran into a problem with HTML that took me a while to figure out. HTML is not case sensitive, but it turns out that the values of id and name attributes are case sensitive. This made me ...