+ 1
Why not use <ph> instead of <span> ?
I never used <span> before. Isn't it for styling a specific text or element? This is amazing <span style="color:red"> isn't it </span> So if that is the usage, why not just use <ph> ?
17 Answers
+ 1
If you remove ph from the CSS it won't look any different than normal text. So the browser obviously doesn't know what <ph> is supposed to do. And as you can see in the code I posted, you can use all kinds of non-existing tags and style them to your needs
+ 8
Anna I agree. It's not clear if all browsers yet support "autonomous custom elements" - the technical name for such elements that do not extend from a builtin HTML element.
https://caniuse.com/#feat=custom-elementsv1
For those who do want to use them, it's advised to use names with a hyphen to avoid possible name conflicts in the future with the release of new standard HTML elements.
Here are some links for people to read up on if interested:
https://www.webcomponents.org/specs#the-custom-elements-specification
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements
https://html.spec.whatwg.org/multipage/custom-elements.html
https://blog.revillweb.com/extending-native-dom-elements-with-web-components-233350c8e86a
https://w3c.github.io/webcomponents/spec/custom/#autonomous-custom-element
+ 3
Yes! there is a <ph> tag in HTML. I can't believe you guys haven't used it or seen it. WOW!
it's my best friend and I use it all the time!
Here I will show you...
<ph>
https://code.sololearn.com/WhChllf19pG0/?ref=app
+ 3
ahh - now makes sense. back when I was learning HTML, i used <ph> thinking it stands for paragraph. and i had a question - what's the difference <ph> vs. <p>.
Now bases on what you said I understand it.
That's why i was able to use imoji as a class name - html is a dumy 😄
+ 3
Looks like it, but I wouldn't rely on every browser being able to handle them. It's definitely not something you should do in real life, other than for educational/testing/fun purposes
+ 2
never heard of it. there is a <p> tag though which is a block element. span on the other hand is an inline element, which is why it is used within the p tag.
+ 2
Calviղ html6 !
+ 2
wait--- there is html6??!
+ 2
No there's no html6 yet and there's no <ph> tag also in html.
+ 2
take your time , i came here to learn
+ 1
what is ph?
+ 1
paragraph - (i think)
+ 1
ph tag? A new html5 tag? 😮
+ 1
I don't know if you're kidding, but there's no ph tag just as there are no maurice or lampedusa tags
https://code.sololearn.com/WsnToZH8uCBG/?ref=app
+ 1
Anna , with that being said, could we use random tags
(<ph> <rand> <abc> ) instead of <span> ?
0
I just realized something. I think I confused you guys with the word 'tag'.
I agree if you say it's not a tag. BUT... did you know it exists in HTML in whatever name it is | has (tag, attribute, input, or whatever it is).
=>
https://code.sololearn.com/WhChllf19pG0/?ref=app
0
Anna , I don't know where i got it from, and also i don't know that its a tag, but i know it works... right here:
https://code.sololearn.com/WhChllf19pG0/?ref=app