The tag (or tag) Html allows you to define the basic URL of all relative URLs. This is done via the attribute href. The second attribute target Defines the place where the respective reference targets must be opened. The HTML tag is always inside the element .
Qu’est-ce que le tag HTML ?
The HTML tag Defines the basic URL of all the relative URLs of a website. It contains the two HTML attributes: href And target. href makes it possible to determine the URL which must serve as Reference for all relative URLs, graphics, style sheets and scripts in an HTML document. This basic URL can also be relative. The attribute target determines the name of the window in which all reference targets must be opened. In addition, html Allows you to define how the links must open in the current document.
The HTML tag is always deposited inside the element et devrait être utilisé le plus tôt possible dans le code. S’il y a plusieurs balises only the first is taken into account, the others being ignored.
Web accommodation
Flexible, efficient and safe web accommodation
- SSL certificate and DDOS protection
- Data backup and restoration
- Assistance 24/7 and personal advisor
HTML tag syntax
HTML syntax presents itself as follows:
Examples of operation of
Remove the basic URL
In the first example, we deposit the basic URL https://www.exemple.com in the header of a document using the HTML tag . The basic URL defined with serves as a reference for all relative links, including images, style sheets (CSS) and scripts of the HTML document.
Tag HTML base : exemple
Le contenu de votre site Web se trouve ici.
html
Define the default destination for all URLs
In the following example, we define with the attribute target The destination to which all the URLs on the page must be directed:
Tag HTML base : exemple
Le contenu de votre site Web se trouve ici.
html
Use a basic URL for several sub-pages
In the third example, we use html To create a basic URL that will be used as a home page by all relative links. Here is what the code looks like:
HTML base : exemple
Différentes sous-pages
html
Domain name
Your domain in one click
- Domain .eu or .fr + free site publisher for 6 months
- 1 SSL WildCard certificate per contract
- 2 GB email box
What are the attributes supported by the HTML tag ?
The tag only supports the two attributes href And target.
href: makes it possible to determine the basic URL for all the relative URLs of the page. The value of this attribute is always indicated in the form of an URL. For our above examples, this value ishttps://www.exemple.com.target: indicate in which window targets an url should be opened. He can have the values_blank,,_parent,,_selfAnd_top._blankOpen links in a new window,_parentopen links in a parent frame,_selfOpen all links in the same window and_topOpen the links in the browser window and not as a page manager that makes the link.
Advice
In our digital guide, you will still find many other informative items on the Hypertext Markup Language (HTML). In particular, you will find a tutorial for beginners and an overview of the best HTML publishers.

