Need help for an assignment (HTML & CSS)

ساخت وبلاگ
I'm new in HTML and CSS,
I recently got this assignment:
I have a text, I need to be able to switch between 3+ Fonts(Must have: 1 Serif, 1 Sans-Serif, and 1 of my choice), 3+ colors, font size, line spacing, character spacing, make the text bold, italic and/or underlined.
Basically have a menu as in a basic text editing program.
(Yes I know... a bit complicated for somebody who hasn't worked with HTML or CSS before but my teacher is an *** so I have to deal with it)
I looked around and all I could find were guides/exercises to change those things but not in a form of a menu, but rather in the whole page as a style for it
(I need to only have 3-4 examples of size and spacing, not the whole array of sizes)

--------------------------------------------------------------------------------------------------------------------------
Example as an end result:
Change font from Arial to Comic Sans (it's just an example!!)
Change color to Red
Change size from 12(lets say it's the default) to 16
Increase line and character spacing a bit, nothing drastic
and make the text bold.
(All this should be changed at the same time(or in real time) if I haven't managed to explain that until now)
--------------------------------------------------------------------------------------------------------------------------

Now my first idea didn't quite work out...
I was thinking I could just do it with copies of the Original Page just with the changes made
For example: Picking red color for the text would send me to a copy of the original page but with the text colored red
now the problem with this one was, if I then change the font to something else, it would send me to a page with the font changed but the changes to the color would be reverted and if I pick color again the changes to the font would then be reverted.
Then I though I would just make it so I have a few more copies like Color1_Font1, Color2_Font1 etc.
Well the amount of Copies I would need would be incredibly big as all the option-combinations I would have to choose from would have to be accounted for

What do you suggest I do to complete this assignment?
Is there a way to implement a menu into the page that changes all those things in real time?(This is my dream-idea at the moment, but anything i found uses JS and I'm not allowed to, only HTML and CSS)
Even links to guides or lectures regarding this problem are greatly appreciated!

If it's necessary tell me and I will reply with my HTML and CSS codes :o

Thanks for reading,
Sheboodle
CodingForums...
ما را در سایت CodingForums دنبال می کنید

برچسب : نویسنده : codingforums بازدید : 160 تاريخ : چهارشنبه 28 تير 1396 ساعت: 12:53