Along with experience, education is one of the primary building blocks that constitute your LinkedIn Profile. It is important to prominently display your educational background as it increases your profile's visibility.
As a rule of thumb, the most relevant part of your education is either a bachelor's degree or master/postgraduate studies such as an MBA. Therefore, if you have attended higher education, elementary school and high school are not considered relevant to include in your profile.
Having said that, if no further education other than elementary school or high school has been obtained, these should be included. Even though the education might not be relevant for your existing job or the field you work in, the fact that you are affiliated with an educational institution helps expand your online network and reach All-Star level on LinkedIn.