tell application "Safari"
set themax to number of tabs of window 1
set thelist to ""
repeat with x from 1 to themax
set thelist to thelist & "<a href=" & quote & (URL of tab x of window 1) & quote & ">" & (name of tab x of window 1) & "</a>" & return
end repeat
set the clipboard to thelist
end tell