i know <h2>Hamburger</h2> are good, but how about this:
<div><h2>Food ยป Hamburger</h2></div>
or thats are ok for google seo?
The tag with an anchor link inside it will work same as a normal tag for Google SEO. Both the methods are Ok, but the problem that can occur is your readers may go away because you added a hyperlink in the Heading text of your webpage. So, it is not a good practice to use hyperlinks in tags or any tag.
Related
can someone please advice me on how I can display hyperlink words instead of the full pdf links on my whatsApp share text field, I have started with this:
https://wa.me/?text=Aqua-Right%203%20https://rolfesagri.co.za/wp-content/uploads/2021/01/Aqua_Right_3_Label-1.pdf, http://rolfesagri.co.za/wp-content/uploads/2021/01/Aqua_Right_3_SDS-1.pdf, http://rolfesagri.co.za/wp-content/uploads/2021/02/Aqua-Right_Range_Eng_Pamphlet.pdf
This link needs to look like this when you send it to someone:
Aqua-Right 3 Label, SDS, Pamphlet
Is this possible?
These are three different links and you need to treat a link using the <a> tag.
See the documentation for the detail but your code will look like:
Label
<a href="https://wa.me/?text=Aqua-Right%203%20http://rolfesagri.co.za/wp-content/uploads/2021/01/Aqua_Right_3_SDS-1.pdf>SDS</a>
<a href="https://wa.me/?text=Aqua-Right%203%20http://rolfesagri.co.za/wp-content/uploads/2021/02/Aqua-Right_Range_Eng_Pamphlet.pdf>Pamphlet</a>
This is completely untested on what the link itself will do but is the right syntax to display a link on a webpage
I'm trying trying to link to specific sections of the page below using the ID anchor tags. You can see they work when you're on this page: http://lastergroup.com/epe/epe19-240/dev/education.html, but when you navigate to other pages of this site, and click on any of the links on that dropdown menu, none work. What am I doing wrong? I have my IDs and links in place:
<div id="solarenergy">
Solar Energy
I found what was happening. After some research I learned that I have to use the anchor right before the div section I want to link to:
<a name="div1"></a>
Link
I have a fairly long list of quick links (approx. 20) that I'm going to embed on my main page. Instead of adding the full url of each link to the each anchor, is there a way to add maybe the end of each link.
For instance, if the link to the url is
http://support.proboards.com/index.cgi?display&thread=423890
as you can see, my forum is a proboards forum if that helps anything here.
the location of each url is local,
Instead of adding the complete url, is there a way to use something like
<a href = "&thread=423890">
or maybe
<a href = "this.thread=423890"> ?
Not in pure HTML, the best you'll get is <a href="index.cgi?display&thread=423890">, which is what you should already be using. Of course I'm assuming support.proboards.com is your site here.
You could use JavaScript and call a function like openThread(423890) if you really wanted, but a)I wonder what you really gain from it, b)this won't work for people with JavaScript turned off (a la NoScript), and c)I wonder if Google would properly see all the links.
Presumably, these pages are all being generated by server-side script anyway, so you should only really be coding index.cgi?display&thread= once anyway...
If you're hard-set on doing something shorter, I'd suggest using URL rewriting. You can have a URL like .../display/thread/423890 and then use something shorter if you're already from a /display/thread/ page. But this requires the link to go to a page you have control over.
I often found some URL which looks like the following:
www.something.com/some_page/#someword
After writing this page some_page will be open and then scroll will be set so that I can see that "someword" at beginning of my screen.
I don't know what the meaning of "#" is. As soon as I make #someotherword with any URL it works sometimes and sometimes it doesn't.
I am not getting what # is in the URL. Is it any functionality of any language or URL or something else?
It might be possible that you consider my question newbish, but I am not into web-designing technologies, I am simply curious about it.
I am not the owner of some website, but when I am concerned with some particular portion of some web page then how can I give the URL with # and give that URL to another?
I am concerned with the answer portion on my profile, and then I will prepare the URL just below and will give it to somebody.
https://stackoverflow.com/users/775964/mr-32#answers
This works, but some time it doesn't.
https://stackoverflow.com/users/775964/mr-32#tags
That doesn't work.
I am just a user and I don't want to know in which language the website is build.
Originally it was used as an anchor to jump to an element with the same name/id.
However, nowadays it's usually used with AJAX-based pages since changing the hash can be detected using JavaScript and allows you to use the back/forward button without actually triggering a full page reload.
This is known as the "fragment identifier" and is typically used to identify a portion of an HTML document that sits within a fully qualified URL:
Fragment Identifier Wiki Page
It is an anchor for links within a page - also known as "anchor tag"
http://www.w3.org/TR/html4/struct/links.html#h-12.2.3
It specifies an "Anchor", or a position on the page, and allows you to "jump" or "scroll" to that position on the page.
Apart from specifying an anchor in a page where you want to jump to, # is also used in jQuery hash or fragment navigation.
Anchor with an id
Dead link Hash or fragment navigation
Tips for better fragment navigation
Yes, it is mainly to anchor your keywords, in particular the location of your page, so whenever URL loads the page with particular anchor name, then it will be pointed to that particular location.
For example, www.something.com/some_page/#computer
if it is very lengthy page and you want to show exactly computer then you can anchor.
<p> adfadsf </p>
<p> adfadsf </p>
<p> adfadsf </p>
<a name="computer"></a><p> Computer topics </p>
<p> adfadsf </p>
Now the page will scroll and bring computer-related topics to the top.
I am using FckEditor in Create.aspx page in asp.net mvc application.
Since I need to show rich text in web pages, I used ValidateInput(false) attribute top of action method in controller class.
And I used Html.Encode(Model.Message) in Details.aspx to protect user's attack.
But, I had result what I did not want as following :
<p> Hello </p>
I wanted following result not above :
Hello
How can I show the text what user input?
Thanks in advance
The short answer is that HTMLEncode is making your markup show like that. If you don't HTMLEncode, it will do what you want.
You need to think about whether or not you need full control of markup, who is entering the markup, and if an alternative like BBCode is an option.
If your users using the editor are all sure to be 'safe' users, then XSS isn't likely to be as much a concern. However, if you are using this on a comment field, then BBCode, or something like SO itself uses is more appropriate.
You wont be able to use a WYSIWYG editor and do HTMLEncode though... (without BBCode, or some other token system)
It seems the user entered "<p> Hello </p>" (due to pressing Enter?) into the edit control, and it is displaying correct in the HTML as you have done an Html.Encode. E.g. the paragrahs are not rendered, they are outputted as "<p>..</p>" as the string is HTML encoded into something like "<p> Hello <p>".
If you do not want tags, I would suggest searching the text string for tags (things with <...>) and removing them from the inputted text. Do this before HTML.Encode.
...or am I missing something?
You can use HttpServerUtility.HtmlEncode(String)