No, these are not compatible. CPUs need to have the right socket on the motherboard, but also the right chipset. The H310 chipset is only compatible with CPUs from intel's 8th and 9th generation - ie. i7 8700k, 9700k, not the 7th gen CPU you have there. I also would not recommend using such a low tier motherboard with a high tier CPU - it may work, but with worse performance if it struggles to deliver enough power, and the motherboard's power delivery circuit may not be able to handle the power the CPU draws, leading to a much shorter lifespan for the motherboard - as in, a year or even potentially less