How to add text into a link in src=" " - html

I have this src="https://open.spotify.com/embed/track/1Go9q6KaCpAsQ0wkZFGzY2?utm_source=generator" and I want it to be like this src="https://open.spotify.com/embed/track/{{ spotify_trackid }}?utm_source=generator"
how can I do this using django without it breaking the link?
sorry for the bad explanation i'm pretty new to this

You should use href attribute to add links to your text like this:
Your Text
And you can't play with URL of websites

Related

th:href Thymleaf inserting Variable in Link Text

Hey Guys so I'm using Thymelaf in my HTML Email template. I'm creating a hyperlink that looks like this:
<a th:href="#{https://example.com/#/login?username=__${username}__}">th:utext="https://example.com/#/login?username=${username}"</a>
The first part of the link works correctly and the username is correctly resolved by the template engine, but as you can see the link text doesn't map at all. I want the link text to be exactly like the link itself. Does anyone know how this can bed done?
Solved with a simple <span> tag :)
<a th:href="#{https://example.com/#/login?username=__${username}__}"><span th:text="'https://example.com/#/login?username='+${username}"></span></a></p>

Laravel displaying html div without images

When we are using text editor we can add different html tags. Like image, videos.
But i just want to show text fields. If i try {{$loop->content}} it prints
<p><strong>EXAMPLE</strong></p><img src='/..'>
But when try to {!! $loop->content !!} it prints "EXAMPLE" + "image"
I just want to print "EXAMPLE". Not an image. How can i make this?
Is there a way to do this in laravel shortcodes, php functions or css things? I searched the docs but not found. Thanks in advance.
{{strip_tags($loop->content)}}
Hope this will help you to remove the img tag

How to use a link as image title in html

I made attempt and tried to find my goal But I couldn't and found solution like this that didn't benefit for me!
I have <img src="url" title="ali.com"> I want to make ali.com a link. I used
title=ALI.com but doesn't work! any way?
The title attribute accepts only plain text, you cannot have any markup there.
If you want a tooltip with a link inside (and I'd urge you not to as it is a difficult UI to use), then you'll need to build the whole thing with JavaScript and DOM.
Above answers suffices your requirement, but specific to your use case :
<img src="image url" title="ali.com"/>
You can use url as a title (google.com?d=1&e=2 this is string)
You need to run little js code to achieve final goal
put something like this html
<a class="mylink"> <img title="blahblah" scr =""></img></a>
and you can get title string by
yourtitlestring = $(".mylink img").attr("title")
and now you can set href of link
$(".mylink").setAttribute("href", yourtitlestring);

How do I add html link to image title

I'm actually needing to include html links in the longdesc attribute. I've altered prettyphoto to use longdesc instead of title for images, but I need to include html links in those descriptions. I know it's possible with code for characters, I just don't remember what those are.
Thanks
This can be done with the longdesc attribute:
<img src="theimage.png" longdesc="thedescription.html" />
And then, in thedescription.html:
Link
One alternative way to do this is by using an OBJECT element, as follows:
<OBJECT data="theimage.png" type="image/png">
Link
</OBJECT>
Also, since you asked for it, here is how to convert html entities automatically in jquery:
$('<div/>').text('Some Link').html();
// the above evaluates to <a href="link.html">Some Link</a>
I'm not sure if this is what you're looking for, but you can use Walter Zorn's wz_tooltip to show a tooltip with any kind of content.
And example of use:
<img src="theimage.png" onmouseover="Tip('<a href=\'http://test.com/\'>Link</a>');" onmouseout="UnTip();">
The longdesc attribute is an URI, not a place to add code. In other words, you'll need to create a page that the longdesc links to. This page is where you'll make a thorough description of what's on the image.
Are you looking for the html entities?
If so, these are what you are looking for:
> = >
< = <
" = "
' = '

Inserting labels into image alt tag in Blogger

Just wondering whether anyone knows how to get blogger labels into "alt" tags in an image. I have tried alt="data:post.labels" to no available at all?
Doesn't anyone know how to assist with this on blogger?
P.S - I know about the ‘rel=tag’ - but for the specific template, I want to have the labels appear as text in the alt tags?
Looks like you may be using the XML version of templating Blogger. If that's the case, then you'll need to use something like the below if you want to have the ALT attribute show up with the name of the tag:
expr:alt='data:label.name'
You can use the same principle to display the label/tag in the TITLE attribute of a link, link so:
<a expr:href='data:label.url' expr:title='data:label.name'><data:label.name/></a>