This is my submission for the HNG Internship 2025 (Frontend Wizards Track) β Stage 1 Task: Multi-Page Application.
This project builds upon Stage 0 (Profile Card) and expands it into a responsive, accessible, and testable multi-page application with a Contact form and About page, using only HTML, CSS, and Vanilla JavaScript, following semantic and data-testid guidelines.
- π Task Description
- π§± Built With
- βοΈ Features
- π§Ύ Data Test IDs
- π JavaScript Logic
- π¨ Screenshots
- π Live Demo & Repository
- π§ How to Run Locally
- π¨βπ» Author
- π Submission
Stage 1 expands the Stage 0 profile card into a three-page application:
- π€ Name
- βοΈ Short biography
- π Current time (in milliseconds) using
Date.now() - πΌοΈ Avatar image
- π Social media links (Twitter, GitHub, LinkedIn)
- π‘ Hobbies
- π« Dislikes
- π Navigation to Contact and About pages
- Fully validated contact form with:
- Full Name (required)
- Email (required, must be valid)
- Subject (required)
- Message (required, minimum 10 characters)
- Real-time error messages
- Success confirmation after valid submission
- Full ARIA accessibility
- Personal bio
- Goals in the HNG program
- Areas of low confidence
- Note to future self
- Extra thoughts
All elements include specific data-testid attributes for automated testing.
- HTML5 β for semantic structure and accessibility
- CSS3 β for layout, styling, and responsiveness (Flexbox + media queries)
- JavaScript (ES6) β for real-time clock, form validation, and dynamic error handling
- Font Awesome β for professional social media icons
β
Semantic and accessible HTML structure
β
Fully responsive layout (mobile β tablet β desktop)
β
Real-time milliseconds clock that updates every second with clock icon
β
Contact form with full client-side validation
β
Real-time field validation with visual indicators
β
Character counter for message field
β
Smooth error message transitions
β
ARIA accessibility (labels, aria-describedby, aria-live)
β
Enhanced keyboard navigation with visible focus states
β
Clean, modern card design with soft hover animations
β
Social links open in new tabs with secure rel attributes
| Element | data-testid |
|---|---|
| Profile card container | test-profile-card |
| User name | test-user-name |
| User bio | test-user-bio |
| Current time | test-user-time |
| Avatar image | test-user-avatar |
| Social links container | test-user-social-links |
| Twitter link | test-user-social-twitter |
| GitHub link | test-user-social-github |
| LinkedIn link | test-user-social-linkedin |
| Hobbies list | test-user-hobbies |
| Dislikes list | test-user-dislikes |
| About page link | test-nav-about |
| Contact page link | test-nav-contact |
| Element | data-testid |
|---|---|
| Name input | test-contact-name |
| Email input | test-contact-email |
| Subject input | test-contact-subject |
| Message textarea | test-contact-message |
| Submit button | test-contact-submit |
| Name error message | test-contact-error-name |
| Email error message | test-contact-error-email |
| Subject error message | test-contact-error-subject |
| Message error message | test-contact-error-message |
| Success message | test-contact-success |
| Home page link | test-nav-home |
| About page link | test-nav-about |
| Element | data-testid |
|---|---|
| Main container | test-about-page |
| Bio section | test-about-bio |
| Goals section | test-about-goals |
| Low confidence section | test-about-confidence |
| Future note section | test-about-future-note |
| Extra thoughts section | test-about-extra |
| Home page link | test-nav-home |
| Contact page link | test-nav-contact |
function updateTime() {
const currentTime = Date.now();
const timeElement = document.querySelector('[data-testid="test-user-time"]');
if (timeElement) {
timeElement.innerHTML = `
<i class="fas fa-clock"></i>
<span>${currentTime.toLocaleString()} ms</span>
`;
}
}
updateTime();
setInterval(updateTime, 1000);- βοΈ Uses
Date.now()exactly as required. - βοΈ Updates automatically every second for live accuracy.
- βοΈ Displays with clock icon and formatted numbers.
// Validates all fields on form submission
// Provides real-time error messages
// Shows success confirmation after valid submission
// Includes character counter for message field
// Visual feedback with valid/invalid states- βοΈ All fields required
- βοΈ Email format validation
- βοΈ Message minimum 10 characters
- βοΈ ARIA accessibility with aria-describedby and aria-live
π Live URL:
https://kontractour.github.io/profile-card/
πΎ GitHub Repo:
https://github.com/Kontractour/profile-card
- Clone this repository:
git clone https://github.com/Kontractour/profile-card.git- Open the folder:
cd profile-card- Launch
index.htmlin your browser.
Godswill Okereke
Frontend Developer & Content Writer
This project fulfills all HNG Stage 1 requirements, including:
- β
Correct
data-testidattributes for all fields and error messages - β Form validation (all fields required, email format, message length)
- β Success message display after valid submission
- β
ARIA accessibility (labels with
for,aria-describedby,aria-live) - β Keyboard accessible
- β
Wrapped in
<main data-testid="test-about-page"> - β
All 5 required sections with correct
data-testidattributes - β Semantic HTML structure (section, h2, h3, p)
- β Proper heading hierarchy
- β Semantic and accessible HTML structure
- β Responsive, testable layout
- β Keyboard navigable with visible focus states
- β Continuation and upgrade from Stage 0
Built with clean code, creativity, and attention to detail. β¨
Stage 0 β Stage 1 Progression Complete
