= Exercise 5.4
// Refs:
:url-base: https://github.com/fenegroni/TGPL-exercise-solutions
:workflow: workflows/Exercise 5.4
:action: actions/workflows/ch5ex4.yml
:url-workflow: {url-base}/{workflow}
:url-action: {url-base}/{action}
:badge-exercise: image:{url-workflow}/badge.svg?branch=main[link={url-action}]
{badge-exercise}
Extend the `Visit` function so that
it extracts other kinds of links from the document,
such as images, scripts, and style sheets.
== Test
The test should cover all element types that contain links.
These are elements with attributes `src` or `href`.
E.g. `<script>` and `<img>` use `src`, `<a>` and `<link>` use `href`.
`<link>` is used in `<head>` to point to a style sheet.
== Example
Given this example HTML document as input:
[source,html]
----
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<a href="link">a</a>
<img src="imagelink">
<script src="scriptlink"></script>
</body>
</html>
----
the Example function's `Output` is:
[source,go]
----
// Output:
// style.css
// link
// imagelink
// scriptlink
----