Does a move html entity exist - html

I'm looking for an html entity code for a move symbol (with left right up down arrows). The same one that appears after cursor: move; is applied in css. Does anyone know if this is possible? I can't find it anywhere.

The closest I found was this ✥ (✥ or ✥).

✥ ✥
✥ ✥
➥➥
☇ ☇
↑↓ ↑↓
⇄ ⇄
As mentioned in the other answers, there is no exact match. Here are some that might be close enough for some.

↔ (↔ or ↔) and ↕ (↕ or ↕) are available, however there is no up/down/left/right arrow symbol in the arrow subgroup.

No, there is no such entity, and there is even no character like that. In interesting way to check whether the symbol you are looking for exists as a character is to visit http://shapecatcher.com/ and draw it. It’s not exact science, of course.
It is generally pointless to look for HTML entity codes. Those codes add nothing to the expressive power of the language: you can use character references &#... instead, or enter the characters directly if you are using UTF-8, as you normally should. The real question, after identifying a character, is whether it is supported in fonts and what to do about this. Whether there is an HTML entity for it is really irrelevant.

To the spec! Check out table 8.5, "named character references". A quick search of the word "arrow" doesn't turn up exactly what you're looking for but with over 2200 named entities, maybe you can find something that looks "close enough".

I made a pen for this purpose, feel free to use it : Create a Move cursor with html + css
<div id="wrapper">
<div class="cp-drag">
</div>
</div>
// see codepen for css please

I came to the same conclusion, no easy character, but my fix was to create a div with both the up/down arrow and side/side arrow in the same space. A bit finicky, but if you had to have it...
<div style="font-size:200%;display:inline-block;position:relative;top:-11px;left:-15px;">
<div style="display:inline-block;">↔</div>
<div style="display:inline-block;left:-32px;position:relative;">↕</div>
</div>

Related

How to comment out classes inside class=""? Is this even possible?

Is it possible to comment out specific classes inside the HTML (<div class="" ...>)?
For example:
<div data-group="group1" data-container="true" class="container-lg d-flex /* slider */ p-0">
Where in this example the class "slider" should be (temporarily) excluded from the class list.
[UPDATE]
Based on the comments I understand the way of thinking, so I go for the solution Lee Taylor mentioned. When I want to disable a specific class assignment, I just add a prefix to that class. For example:
<div class="slider container"...
becomes:
<div class="disable-slider container"...
Life could be so easy if the mind is thinking too complex :-D
Thank you all for thinking with me!
[/UPDATE]
This would make life a lot easier, in my opinion, in these ways:
You don't have to switch to your style sheet and go searching for the matching class, commenting out and switch back again to the code.
It's clear for everyone that you just exclude the complete function, which - if named clearly - gives other developers a better overview.
For testing purposes you could use this as (style) modules, which are enabled/disabled in a snap! Again, no more hopping between screens/tabs/windows.
Easier debugging. Just comment out some classes and you've got the source of the problem in no time.
It stimulates developers to use recognizable and clearly named classes
Currently I copy the whole element/row, comment this out and add a comment and then paste the copied row below. Then I remove classes from this line of code.
Most of the time this doesn't get updated, so you can't see it as a reliable backup if you're debugging.
I know for sure that such would be possible with JS, but why? (Also changing the HTML structure with JS gives a lot of headaches when it comes to layout shifts and not everyone has the possibility to make use of server side scripting.) Such should exist HTML in my opinion.
Am I the only one who has this in mind?
Per the HTML Specification on the class attribute:
When specified on HTML elements, the class attribute must have a value that is a set of space-separated tokens representing the various classes that the element belongs to.
Here is the definition for space-separated tokens:
A set of space-separated tokens is a string containing zero or more words (known as tokens) separated by one or more ASCII whitespace, where words consist of any string of one or more characters, none of which are ASCII whitespace.
A string containing a set of space-separated tokens may have leading or trailing ASCII whitespace.
Therefore, no, you should technically not be allowed to comment out class list members in any way. If any implementation of the specification does allow this, then it is undefined behavior and should not be depended upon.

RegEx to substitute tag names, leaving the content and attributes intact

I would like to replace opening and closing tag, leaving the content of tags and its attribute intact.
Here is what I have:
<div class="QText">Text to be kept</div>
to be replaced with
<span class="QText">Text to be kept</span>
I tried this expression which finds all expressions I want but there seems to be no way to replace found expressions.
<div class="QText">(.*?)</div>
Thanks in advance.
I think #AmitJoki's answer will work well enough in certain circumstances, but if you only want to replace div elements when they have an attribute or a specific set of attributes, then you would want to use a regex replacement with backreferences - how you specify and refer to a backreference, unfortunately, depends upon your chosen editor. Visual Studio has the most unique and annoying "flavor" of regex I know of, while Dreamweaver has a fairly typical implementation (both as well as I imagine whatever editor you're using do regex replacement - you just have to know the menu item or keystroke to bring up the dialog).
If memory serves, Dreamweaver has replacement options when you hit Ctrl+F, while you have to hit Ctrl+H, so try those.
Once you get a "Find" and "Replace" box, you would put something like what you have in your last example above: <div class="QText">(.*?)</div> or perhaps <div class="(QText|RText|SText)">(.*?)</div> into your "Find" box, then put something like <span class="QText">\1</span> or <span class="\1">\2</span> in the "Replacement" box. A few utilities might use $1 to refer to a backreference rather than \1, but you'll have to lookup help or experiment to be sure.
If you are using a language to run this expression, you need to tell us which language.
If you are using a specific editor to run this expression, you need to tell us which editor.
...and never forget the prevailing wisdom on regex and HTML
Just replace div.
var s="<div class='QText'>Text to be kept</div>";
alert(s.replace(/div/g,"span"));
Demo: http://jsfiddle.net/9sgvP/
Mark it as answer if it helps ;)
Posted as requested
If its going to be literal like that, capture what's to be kept, then replace the rest,
Find: <div( class="QText">.*?</)div>
Replace: <span$1span>

What am I missing in my RegEx expression?

So, regex has been the bane of my existence for some time. I feel that I'm on the cusp of understanding it, but I'm just getting very frustrated. In short:
I'm attempting to scrape data from the following website via PHP:
http://magicseaweed.com/Asbury-Park-Surf-Report/857/
I want to extract the bold wave height at the top of the page (at the moment, it reads 3-5). I understand why this works:
preg_match('/<div class="msw-fct-ccd msw-sr-details span3"> <h3> <span>(.*)
<small>ft<\/small> <\/span> <div class="msw-fct-ccr msw-sr-rating">/', $pageMagic,
$height);
But I don't understand why this will not:
preg_match('/<div class="msw-fct-ccd msw-sr-details span3"> <h3> <span>(/d-/d)|(/d)
<small>ft<\/small> <\/span> <div class="msw-fct-ccr msw-sr-rating">/', $pageMagic,
$height);
In my mind, logically speaking, it should be looking for a digit, a dash, then another digit OR just one digit. I tested out regex in http://gskinner.com/RegExr/ and it picked up 3-5. Thank you in advance!
Your slashes are the wrong way around. It should be:
(\d-\d)|(\d)
Incidentally, you can simplify this to:
\d(-\d)?
...but note that this would change the capture groups. I leave the fix for that as an exercise for you :)

Mathematical set symbols in HTML

I wanted to put a bar over my variable such as not(x) and also some set symbols in my web page? How do I incorporate that in my html page.
For the set symbols, you ought to use unicode HTML entities.
For the line over a variable (p), I'd rather use an alternate symbol for not, such as:
¬p (¬p)
You may also, as a commenter pointed out, use the combining diacritical unicode HTML entity like so:
p̅ (p̅)
Lastly, you may use one of the CSS methods provided.
<div style="text-decoration: overline">X</div>

Superscript registered mark '®' inside select menu

Is is possible to have a superscript registered mark "®" inside a select menu? If so, how is this done? Can you use CSS to achieve this?
There's no way to make a single character superscript inside an <option>. You're stuck with a regular ® (®).
You can achieve results in tough cases using this method to superscript special characters with jQuery.
But I must admit that inside an option... I'm blank.
CSS1 : The numbers need tweaking depending on your font and point size.
<div style="font-size:96px;">
Registered<span style="vertical-align:2.7em; font-size:0.2em;">®</span>
</div>
You can use this key shortcut for ®:
Ctrl + Alt + R
I don't know if this is possible with CSS but in html you could write:
Company<sup>®</sup>