Implementation: HTMLLinks using HTML

The main structure of an HTML page makes use of <head>, <title> and <body> tags. Implementation of HTML through use of titles, videos, audio, div, anchor, headings, paragraphs and links provides a solid basis for future implementation.

Part ofComputing ScienceWeb design and development

Links using HTML

There are three different types of link that are commonly used when creating a webpage. One is a hyperlink, which links to another webpage. These links are structured as follows:

<a href="url">link text</a>

Here is an example of a hyperlink that would take you to the BBC hompage.

<a href="www.bbc.co.uk">BBC Homepage</a>

This would display the text ‘BBC Homepage’ on the website. When a user clicks on ‘BBC Homepage’ they are then taken to www.bbc.co.uk.

The other links are used to create a link between the webpage file and other files that the webpage may use. These links are not seen by the user and let the HTML file link to CSS files (used for styling) and JavaScript files (used to add interactive content).

Here is an example of a link to a CSS file, these links are placed within the head section of HTML files:

<link rel="stylesheet" type="text/css" href="theme.css">

Here is an example of a link to a JavaScript file:

<script src="homepagescript.js">
</script>