Step 1: Identify the sentence type.
This is a Type-3 conditional sentence (unreal past condition) used to express regret or hypothetical situations in the past.
Step 2: Applying the correct structure.
The correct structure is:
"If + past perfect, then + would have + past participle."
Here, "Had I known" is the inverted form of "If I had known", so the second clause should be:
"I would have attended it."