0
votes

I use PhpStorm 2017.2.4.

When write <table> tag and type space to insert some attributes like bordercolor I cant see bordercolor attribute in code completion but it show in Adobe DreamWeaver CC.

When I wrote bordercolor manually PhpStorm displays a warning

Attribute bordercolor is not allowed here".

I changed Default HTML language level to HTML 4.0 in : File | Settings | Language & Frameworks| Schemas and DTDs| Default XML Schemas but only warning was disabled and bordercolor did not appear in code completion list yet.

Why is this problem? How can I solve it?

I use CSS but I want to change border-color of one of the tables differently from the base of the styles created .

I'm afraid some of the old PHP and HTML codes and tags that I knew well, would not be on the list, and I have to learn things that are my scheduled plan for after the completion of this project and for now I dont have enough time to learn new content.

Please help me to solve my problem...

1
Code samples/screenshots please -- need to see the context -- maybe you are doing something wrong (there is always a chance for that).LazyOne
Why not use CSS for that (in a .css file .. or at very least in style attribute for <table> if you want to hardcode it)? bordercolor attribute is deprecated AFAIK -- I do not see it in allowed attribute list in HTML 4 spec w3.org/TR/html401/struct/tables.html#h-11.2.1.LazyOne
I use CSS but I want to change border-color of one of the tables differently from the base of the styles created . I'm afraid some of the old PHP and HTML codes and tags that I knew well, would not be on the list, and I have to learn things that are my scheduled plan for after the completion of this project and for now I dont have enough time to learn new content.harix
<table style="border-color: #eee;">....</table> -- pretty similar to what you are trying to use with bordercolor="#eee"LazyOne
thanks.I knew that.I want to know how can I set phpstorm to appear old tags and codes in code completion. Is there a way to do this???harix

1 Answers

2
votes

This attribute is non-standard, not a part of HTML spec, implemented differently by different browsers. so, in general, it's not recommended to use it, try using CSS properties instead. But, if you need using it for some special reason, try adding it to custom HTML attributes: hit Alt+Enter on attribute highlighted as not allowed, choose to add it to custom attributes:

enter image description here

Custom attributes are no reported as unknown and are available in completion