See the Pen Technical documentation page by Ty Mick (@TyMick) on CodePen.
View this project in its own window, or view the source on GitHub or CodePen.
Technical documentation page
I created this page as a requirement for my freeCodeCamp Responsive Web Design Certification, using W3.CSS. I modeled it some after their example, but I was more inspired more by W3School’s sidebar tutorials. It fulfills the following user stories:
- I can see a
mainelement with a correspondingid="main-doc", which contains the page’s main content (technical documentation). - Within the
#main-docelement, I can see severalsectionelements, each with a class ofmain-section. There should be a minimum of 5. - The first element within each
.main-sectionshould be aheaderelement which contains text that describes the topic of that section. - Each
sectionelement with the class ofmain-sectionshould also have an id that corresponds with the text of eachheadercontained within it. Any spaces should be replaced with underscores (e.g. Thesectionthat contains the header “JavaScript and Java” should have a correspondingid="JavaScript_and_Java"). - The
.main-sectionelements should contain at least 10pelements total (not each). - The
.main-sectionelements should contain at least 5codeelements total (not each). - The
.main-sectionelements should contain at least 5liitems total (not each). - I can see a
navelement with a correspondingid="navbar". - The navbar element should contain one
headerelement which contains text that describes the topic of the technical documentation. - Additionally, the navbar should contain link (
a) elements with the class ofnav-link. There should be one for every element with the classmain-section. - The
headerelement in the navbar must come before any link (a) elements in the navbar. - Each element with the class of
nav-linkshould contain text that corresponds to theheadertext within eachsection(e.g. if you have a “Hello world” section/header, your navbar should have an element which contains the text “Hello world”). - When I click on a navbar element, the page should navigate to the corresponding section of the
main-docelement (e.g. If I click on anav-linkelement that contains the text “Hello world”, the page navigates to asectionelement that has that id and contains the correspondingheader. - On regular sized devices (laptops, desktops), the element with
id="navbar"should be shown on the left side of the screen and should always be visible to the user. - My Technical Documentation page should use at least one media query.
Content was sourced from Getting started with HTML by Mozilla Contributors, which is licensed under CC BY-SA 2.5.