Make a CMS

I want to have a go at creating my own CMS using JavaScript, HTML and CSS. The idea would be to create a new page and edit the content of existing pages, but only the text, photos, videos and uploaded documents. I am not quite sure how to do this?