Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Basics Structuring Your Content Marking Up a Blog Post

Alexandra Cianciara
Alexandra Cianciara
2,465 Points

Creating subpages and CSS style sheet for each page

How to create the subpages of each of the pages under Home, News etc.

I created this pages

Homepage Gallery Contact Us

But would like to know how to create subpages to each of them, is this in HTML and CSS?

Also, would I use the same CSS style sheet for each page? I have created a new one for pages other than the Homepage and will be amending from there accordingly. It will be similar but some of the elements may be specific to the pages different than the homepage.

Thank you

3 Answers

Gabriel Plackey
Gabriel Plackey
11,064 Points

Okay. You're going to make this in html then link them in anchor tags like

<a href="gallery.html">clickable text</a> 

which will then lead to the subpage, which will be gallery.html .

I would use the same stylesheet/css file for all of them. That way some styling is universal for all pages and you're using DRY css, then what you need to be different give unique class or id names.

Alexandra Cianciara
Alexandra Cianciara
2,465 Points

Thank you Gabriel, but I'd like to have the pages visible in menu, maybe this is easy but I cannot get my head around it

Thanks re classes.

Alexandra Cianciara
Alexandra Cianciara
2,465 Points

I have explained there. E.g. in this page each page has sub pages, that's what we call it in the UK. I'd like to know how to create it.

http://www.oceanologyinternational.com/

Thank you

Samuel Llibre-Pillco
Samuel Llibre-Pillco
15,467 Points

Hi, Let me give you a link where you can learn about what you want to do. https://www.w3schools.com/howto/howto_css_dropdown.asp

Maybe know you can do what you want.

Have fun.