Html Base Href Tag function
Thanks to the use of Html Base tag (<base href="">), which is a must for pagination logic, you can make search engine Url structures. The website written in the base href means the base url for other invoked include files.
When creating .htaccess rules in web design, you will definitely come across it in pagination logic or search engine optimizations (SEO). There is no harm in using this tag, on the contrary, it will be a plus for your website. This Url-based Head tag, which is based on the website, will definitely come in handy when doing .htaccess pagination operations.
Base Href Tag
Html Base Tag should be used in head tags as follows. It should not be used outside of the head tag.
<head>
<base href="https://codingsource.net/">
</head>
Another use is to set a target, that is, to set a target.
<head>
<base href="https://codingsource.net" target="_blank">
</head>
This will open all other forms and links in the target you specified.
Below, I will explain to you what the Html base parameters mean, and besides, I will give you side information about how to use the base tag.
- href : It means the base address of your website.
- Usage: url must be written.
- target : It determines the opened forms and the targets to which the links etc objects will go.
- _blank : Opening on another page.
- _parent : Opening on the side page.
- _self : Opening on the same page.
- _top : Opening at the top of the web page.
How to Use Base Tag?
The base tag is very simple to use. It is placed inside the <head> tag, which is mostly used for search engine optimizations and has a few rules. Below I will explain with you the rules of using the HTML Base Tag.
- The base tag must be written inside the <head> … </head> tag.
- The closure of this tag is in itself. You do not need to do another closure.
- Do not write any external url other than the url – link of your website.
On your website, css, js etc. are added to the beginning of the called files and your files are called in this way.