Using new HTML elements

I want to define a new HTML5 elements <desc> and I want to setup a style for this 'tag' in CSS and when I try that I'm getting an error.

Is there a way to add user defined elements to PHPStorm ver 9.0 (PS-141.1000).

Regards,
Rich

8 comments
Comment actions Permalink

Do you mean 'selector matches unknown element' error shown for your CSS? I can suggest adding this tag to custom HTML tags - Alt+Enter on selector, choose 'Add <tag_name> to custom HTML tags'

custom.png

0
Comment actions Permalink

That works perfectly, however, let's say you mispelled and you need to remove the tag element, how do you do that?

0
Comment actions Permalink

Settings/Editor/Inspections/HTML/Unknown HTML tag, press the button to the right of 'Custom HTML tags' field, in 'Edit custom tags' dialog remove/change the tag name

0
Comment actions Permalink

Hummmm.... I checked Editor->Code Style->Inspection->HTML->Unknown HTML tag and it wasn't there, now I check, and it is there. (Could there be a delay issue when the new tag gets added?)  When I go to the CSS, 'Selector matches unknow element D1...' shows. THANK YOU!
Rich

0
Comment actions Permalink

I've done as directed and the only custom tags are:



I added the custom tag d1:

0
Comment actions Permalink

Sorry, not sure I understand what the problem is - can you explain? All your images are missing

0
Comment actions Permalink

I tried to copy and paste a screen image and I got a message saying the message could NOT be posted, but it posted anyway? I don't understand how this message got uploaded.

Regards,
Rich

0
Comment actions Permalink

Use "camera" icon to upload & insert images.

Alternatively -- just attach them to the post as ordinary files.

Alternatively #2: upload to any photo hosting site and just share the link (e.g. Postimage.org )

0

Please sign in to leave a comment.