LED and resistor in series from +5V to digital in

Possibly a daft question and I've very likely missed something somewhere but any search just brings up variations on the "blink" sketch.
I'm wiring up a toggle switch across a digital input and was hoping to put in (for purely aesthetic purposes) an LED.
TO save writing code is it alright to to put the resistor and LED off the com pin of the toggle switch to the digital pin so that when the switch has +5V across it the LED comes on?

An Arduino input has many megOhms of resistance to ground hence there is no path to ground for the LED current.

You need the LED in parallel with the pin.

groundFungus:
An Arduino input has many megOhms of resistance to ground hence there is no path to ground for the LED current.

Right oh - another thought I had a few minutes after hitting post - won't the fact I forgot about the "diode" bit in "LED" cause the same problem for the pin when the switch is closed? Or will it just be left floating?

CrossRoads:
You need the LED in parallel with the pin.

Many thanks, that makes more sense.

That’s not good either as you have the Arduino powering an led without a series resistor .
Put 220R in series with the led .

hammy:
That’s not good either as you have the Arduino powering an led without a series resistor .
Put 220R in series with the led .

No - that Arduino pin is an input.

From the first post:-

I'm wiring up a toggle switch across a digital input and was hoping to put in (for purely aesthetic purposes) an LED.

Grumpy_Mike:
No - that Arduino pin is an input.

From the first post:-

It's still no good though, OP posted a picture with a red LED.
Red LEDs typically have a voltage drop of about 1.8 - 2V, that may not be enough for the Arduino to read the input as high even though the LED is on!

This should work:

arduinoinput.jpg

Or indeed so will the circuit I used here:- Chaotic Pendulum
And that has the advantage of not needing double throw switch.

Oops my mistake !

Edited : just a thought , this is the Arduino forum after all, you could use a standalone Attiny or similar and program it to do whatever you want.

GeronimoDK:
It's still no good though, OP posted a picture with a red LED.
Red LEDs typically have a voltage drop of about 1.8 - 2V, that may not be enough for the Arduino to read the input as high even though the LED is on!

This should work:

So just to ask the final daft question:

Is it still worth putting a pull-down resistor on this, and if so I assume that would be on the wire direct from the switch to ground rather than anywhere in series with the 220 and LED?