Let g be a lie algebra, show that the center of g is an ideal in g.
attempt at proof: Let $\ \mathfrak g$ be a lie algebra. Define $\mathfrak h$ to be the center of $\ \mathfrak g$. Suppose that $\kappa $ is a sub-algebra of the lie algebra $\ \mathfrak g$ with $\ \kappa \subseteq \mathfrak g$. Then Letting $H = Y$ in the definition of center yields $[X,H]$ which is an element of $\ \kappa$ thus $\ \mathfrak h$ is an ideal of $\ \mathfrak g$.
I'm sort of lost with how to properly construct this proof, I'm not quite sure if I starting out correctly or need to use another approach.
Definition of Center
The Center of a Lie Algebra $\ \mathfrak g$ is the set of all $X \in \ \mathfrak g $ for which $ [X,Y]=0$ for all $Y \in \ \mathfrak g$.
Definition of Ideal
A subalgebra $\ \mathfrak h$ of a Lie Algebra $\ \mathfrak g$ is said to be an ideal in $\ \mathfrak g$ if $[X,H] \in \ \mathfrak h$ for all $X \in \ \mathfrak g$ and $H \in \ \mathfrak h$.