How does one typeset a URL?

I thought this was a duplicate but I think I was thinking of email addresses. URLs are simple:

\usepackage{hyperref}
...
\url{http://google.com}

Colours can be changed by setting up hyperref as desired:

\hypersetup{
  colorlinks, linkcolor=red
}

If you're not using hyperref then load the url package:

\usepackage{url}
...
\url{http://google.com}

but you won't get hyperlinks, of course.


Also,

\href{http://google.com}{Google}

so that when you press on the word Google you get connected to Google's site.

Here is what you should put in the preamble:

\usepackage[colorlinks]{hyperref}
\hypersetup{citecolor=DeepPink4}
\hypersetup{linkcolor=DarkRed}
\hypersetup{urlcolor=DarkBlue}
\usepackage{cleveref}

This should be placed as is at the bottom of the list of added packages.

Tags:

Pdftex

Urls