Realize basic Element class and TextElement class.