Quick Contact

    HTML Links

    Creating Links in HTML

    A link, often known as a hyperlink, seems to be a link that connects one web site to another. Users may navigate from one website to another on any server in the globe by using links.

    A connection has two endpoints known as anchors. The link begins with the sources anchor and leads to the destinations anchor, which might be any online resource, such as an image, an audio or video clip, a PDF file, an HTML page, or an element inside the document itself, and so on.

    Several websites would display links as follows by default:

    • An unvisited link is highlightedin blue.
    • A visited link is highlightedin purple.
    • An active link is highlightedin red.

    We may, however, override this using CSS. Find out more about style connections.

    HTML Link Syntax

    The < a> element is used in HTML to specify backlinks.

    A link or hyperlink might be a single word, a combination of words, or a picture.

    < a href=”url“>Link text< /a>

    Anything between the opening < a> tag and the ending < /a> tag forms the link which the user can view and clicks in a browser. Here are a few instances of links:

    Setting the Targets for Links

    The target property directs the browser to the location of the referenced content. There are four defined targets, and each target name starts with an underscore(_) character:

    • _blank —

      This function opens the referenced document in a browser window or tab.

    • _parent —

      This command displays the linked documents in the parent window.

    • _self —

      Displays the linked document in the same window or tab as the original. Because this is the default, it is not essential to mention it explicitly.

    • _top —

      Displays the linked document in its entirety in the browser window.

    Creating Bookmark Anchors

    We can also utilize bookmark anchors to direct people to a specific area of a website. Bookmarks are extremely useful if you have a lengthy website.

    Bookmark creation is a two-step process: Add the id property to the component which users wish to move, then use that id attribute value preceded by the hash symbol (#) as the value of the < a> tag’s href attribute, as seen below:

    < !DOCTYPE html>
    < html lang="en">
    < head>
    < title>Creating Bookmarks in HTML< /title>
    < style>
            h2 + p{
    	line-height: 80px; /* increase height between lines */
    < /style>
    < /head>
    < body>
    < p>< a href="#What is Java">What is JAVA< /a>< /p>
    < p>< a href="#What is PHP">What is PHP< /a>< /p>
    < p>< a href="#What is HTML">What is HTML< /a>< /p>
    < h2 id="JAVA">JAVA< /h2>

    < p>Java is a widely used object-oriented programming language and software platform that runs on billions of devices, including notebook computers, mobile devices, gaming consoles, medical devices and many others. The rules and syntax of Java are based on the C and C++ languages.< /p>

    < h2 id=”PHP”>PHP< /h2>

    < p>PHP (Hypertext Preprocessor) is known as a general-purpose scripting language that can be used to develop dynamic and interactive websites. It was among the first server-side languages that could be embedded into HTML, making it easier to add functionality to web pages without needing to call external files for data.< /p>

    < h2 id=”HTML”>HTML< /h2>

    < p>HTML (HyperText Markup Language) is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables.< /p>

    < /body>
    < /html>

    Creating Download Links

    We may also make a file download link using the same way that users would a text link. Simply point the destination URL to the file that should be available for downloading.


    < !DOCTYPE html>
    < html lang="en">
    < head>
    < title>HTML Download Links< /title>
    < /head>
    < body>
    < p>< a href="/examples/downloads/test.zip">Download Zip file< /a>< /p>
    < p>< a href="/examples/downloads/masters.pdf">Download PDF file< /a>< /p>
    < p>< a href="/examples/downloads/sample.jpg">Download Image file< /a>< /p>
    < /body>
    < /html>


    Download Zip file

    Download PDF file

    Download Image file


    When users click a link to a PDF or picture file, the file is not instantly downloaded to the hard disc. The file will only be opened in your web browser. You may also permanently store or download it to your hard disc.


    Q1. What are the HTML links?

    Hyperlinks were HTML links. Users can get to another paper by clicking on a link. When users move the cursor over a link, the mouse arrow transforms into a little hand. It should be noted that a link does not have to include text.

    Q2. What is the purpose of HTML links?

    They produce links, which are clickable text or images that lead us to a new page or a different section of the same website when clicked. Hyperlinks are used in HTML. They are a crucial and distinguishing element of the World Wide Web, and they are responsible for the Web’s success.

    Q3. How do I link to another website?

    The anchor tag, the < A> tag, is used in HTML code to link. The attribute is then followed by the letter “A” in the tag. The “A” is followed by “HREF” for a connection to another website.

    Q4. What are the 4 basic HTML tags?

    There are several HTML tags that may be used to assist the build the web page. In HTML, four tags are necessary. These are the html tags, title, head, and body. The table below displays the opening and closing tags, as well as an explanation and an example.

    Copyright 1999- Ducat Creative, All rights reserved.

    Anda bisa mendapatkan server slot online resmi dan terpercaya tentu saja di sini. Sebagai salah satu provider yang menyediakan banyak pilihan permainan.