Chosen Solution

I replaced the HDD drive with an SSD drive..reconnected the 4 cables but not the temperature sensor cable for the new drive. After restarting the system I only get the black screen but the computer is running. Anybody can help me what might be wrong??

First, give the external display a try before you pull things apart. The onboard diagnostic LED’s are located on the bottom left edge of the logic board

After peeling the tape (which you do need to put back on) read the LED’s from Left to Right 1 ~ 4 Here’s what they mean: LED #1 - Indicates that the trickle voltage from the power supply has been detected by the main logic board. This LED will remain ON whenever the iMac is connected to a working AC power source. The LED will remain on even when the computer has been shut down or put to sleep. The LED will turn off only if the AC power source is disconnected or the power supply is faulty. LED #2 - Indicates that the main logic board has detected proper power from the power supply when the computer is turned on and that logic board voltage regulators are functioning properly. This LED will be ON when the computer is turned on and the power supply is working correctly. LED #3 - Indicates that the computer and the video card are communicating. This LED will be ON when the computer is communicating properly with the video card. If LEDs 1 and 2 are ON and you heard the startup sound, but LED 3 is OFF, then the video card might be installed incorrectly or need replacement. LED #4 - Indicates that the computer and the LCD panel are communicating. This LED will be ON when the computer is turned on and video signal is being generated. If the LED is ON and there is no image on the display, then the LCD panel, the LED backlight board, or the cables between might be installed incorrectly or need replacement.