Plan a website a visitor can navigate
HTML tells a browser what each part of a web page means. It describes which words make up a title or heading, which controls form a question, and which links go to other pages. Assistive technologies can use that structure to present headings, landmarks and form controls in a useful way. CSS and JavaScript can build on that structure later. This guide uses a fictional student coding club in Ambala as the sample brief, so you can practise with realistic content and invented names.
The club needs a home page answering when the next session is and a contact page explaining who to ask about joining. Give visitors three tasks to try. They should find the meeting date, check what to bring and choose the right contact topic. Draft a brief list of headings for each page. Keep obvious information near the top. For example, the date and location can appear in a “Next session” section before detailed instructions for preparing a laptop.
Open a plain text editor and create a club-site folder. Save index.html for the home page, contact.html for the second page and a subdirectory called images. Choose consistent lowercase filenames such as club-workshop.jpg. Match each file referenced in a URL to its exact spelling and capitalisation. A local system might handle a case mismatch differently than your eventual host. Use invented examples and an appropriate image you are allowed to reuse.
Sketch the structure before adding features
Write the home page text in reading order and the contact instructions in a separate file. Decide which pieces repeat, such as the club name and the menu, and which belong only to one page. Use short sentences and name the actions directly. A heading such as “Bring a laptop to the layout clinic” tells readers what to prepare more clearly than “Session requirements.” Use the sketch to test if the whole site has one clear purpose. Remove a block when it gives a visitor no information or action.
Build the home page document
Begin with a doctype and an html element with a suitable language attribute. Include head and body. Put the document title and character encoding in the head, and put visible content in the body. Add a viewport declaration so the visual layout can adapt to narrow devices when you style it. Choose a distinct page title, for example “Ambala Student Coding Club | Next Meeting.” The name in the browser tab should help a reader distinguish this page from the contact page.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ambala Student Coding Club | Next Meeting</title>
</head>
<body>
<main>
<h1>Ambala Student Coding Club</h1>
<h2>Next session</h2>
<p>Bring a notebook and a charged laptop for the markup clinic.</p>
</main>
</body>
</html>
Inspect what the browser built
Open the file in a browser and change only the title in the head. Reload and check the browser tab. The visible primary heading should stay unchanged. Next change the heading in the body and compare the result. This exercise makes the two roles obvious. It also gives you a reference when a theme later shows matching or different search and page titles for good reasons.
Developer tools let you inspect the document tree. Inspect the main element and find its first heading and paragraph. View the original source separately and compare it with the inspected tree. The browser parser may close or move invalid markup while building the tree. If a section appears outside its intended parent, compare the open and close tags and check the nesting rather than assuming the browser displays your exact source as typed.
Give headings a meaningful hierarchy
Use a first-level heading for the page's main subject. Use second-level headings for major areas such as Next session and Activities. If Activities has two distinct topics, put those under third-level headings. Choose headings according to what each item covers and use CSS later to change font size. Outline the pages by reading just their headings and ask whether a first-time learner can find the next session or the form without reading every paragraph.
Use semantic elements and descriptive links
A page header can introduce the site and contain the primary menu. Put the unique page content inside main. Use nav around a major collection of navigational links, and use footer for supporting information such as club contact or copyright. Group related content under a heading and use a section when it represents a coherent area of the document. An article works for a self-contained item that makes sense outside the original page, such as a workshop announcement you could share on its own.
A div is useful when several items need a styling wrapper without a separate semantic role. Before using one, decide whether an existing element describes the content more precisely. A group of activities might be a list, the mark for a page location might belong on a heading, and the registration control might be a button. Native elements provide established browser and assistive technology behaviour, so choosing them deliberately reduces work later.
Create a navigation system for two pages
On the home page link to contact.html with meaningful text. On the contact page pass the visitor back to index.html or to index.html#next-session. A fragment beginning with a hash targets a matching ID in the document. Give the next session element a unique ID and test its use even when the link starts on the second page. If a link points to the wrong location, verify that the URL path and the fragment name address different parts of the destination correctly.
Add a keyboard-reachable link at the top that jumps to main when activated. Test using Tab and Enter, then check where the next Tab lands. Add useful link text so the visitor can recognise the job of each link. “Contact the organiser about joining” is more informative than “Click here.” Use navigation links for destinations and buttons for actions. A native button has built-in keyboard behaviour and can submit a form when placed in it with the suitable type.
Practise three kinds of paths
A file alongside the home page can use the relative path contact.html. An image in a subfolder can use images/meeting-room.jpg. An external website uses a complete URL with its host. A path starting with a slash starts at the root of its website and can fail when your practice project is hosted underneath a folder. Copy your project folder and open the copy somewhere else to see which relative links still work. Rename a practice image and review the requested path in the Network panel to see why it fails.
Put an image, list and timetable to work
Write alternative text for the information an image contributes. If a photo shows an entrance that a new member needs to recognise, describe the feature that identifies it. If an image is decorative and the surrounding text conveys everything needed, use an empty alt attribute. When an image is the entire content of a link, give it text that makes the linked destination clear. Check that the description still works if you replace the photograph with another.
Use a figure and caption when a caption adds helpful information, for instance a sentence about what participants built in a previous mock design challenge. An image's alternative and its caption can have different purposes. Give the browser the image's width and height dimensions in proportion so it can reserve layout space before downloading the file. Later use the stylesheet to make the image fit on a narrow device without distorting it.
Select the right structure for equipment and times
Use an unordered list for equipment that can be packed in any order. Use an ordered list for completing steps such as saving a file, reloading the page and checking the browser. Use a table when a reader needs to relate times, tasks and materials across rows and columns. For the club timetable add a clear caption, column headers marked with th, and the appropriate scope attributes for simple headers. A table cell should make sense alongside its assigned headers.
Build three mock rows such as “10:00, HTML structure, text editor,” “10:30, add labels, sample form,” and “11:00, peer check, laptop.” Ask someone to select the material at a particular time. If they cannot connect the cell to its column heading, inspect the markup and clarify the labels. Try reading a sample data value without its header to understand why the header information matters. Use a list for a simpler schedule if the visitor only needs a sequence of times and tasks.
Build and test a labelled enquiry form
On the contact page use a name, email, topic and message. Give every control a visible label. An explicit label connects to a field through the same value in the label's for and the control's id. The input's name is the field name carried in a submission. Give input types that fit the answer, such as email for a contact address and textarea for a longer question. Use a labelled select when a small group of topics is useful. If several checkbox or radio options answer one question, group them with fieldset and a legend describing it.
<label for="club-email">Email address (required)</label>
<input id="club-email" name="email" type="email" autocomplete="email" required>
<label for="club-question">Your question (required)</label>
<textarea id="club-question" name="question" rows="5" required></textarea>
Give the visitor useful required-field instructions in visible text. If a field needs extra context, place a short explanation nearby and connect it with aria-describedby. A placeholder can illustrate what an answer looks like, although essential instructions should remain available while someone types. Use fake personal details in the prototype and keep it local. HTML's built-in validation can help someone correct missing or malformed values. A real form needs a useful destination and server-side validation before it can accept any enquiry.
Check errors with the mouse and the keyboard
Submit the prototype with a blank email and see whether the browser directs the visitor to it. Type an invalid address and try again. Then use a valid sample address and complete the other required fields. Verify that the prototype accepts the browser checks and arrange for the test not to send any real data. Click the visible labels and observe which controls receive focus. Try navigating forward and back using only the keyboard. If a field in the intended section is skipped, inspect the actual source order and use appropriate native controls.
Move the form below one extra block of headings and repeat the same test. All field labels, hints and destinations should continue to point to the right control after content is moved. This check can uncover brittle IDs or associations before you start styling the page. A good error message should identify what can be changed and help a visitor correct the value without losing the other information they entered.
Finish the two-page project and record your checks
Add a session timetable, a useful image, two connected pages with a labelled form and a link back to the next meeting. Decide how visitors will know which page they opened if they arrive through a search result. Give each page a distinct document title and main heading. Compare how the site feels at a narrow width and a larger screen. Future CSS can make the layout more attractive, but a page that has an understandable order gives you a stronger foundation.
- Ask a peer to identify the location and meeting time using only the visible headings.
- Use a keyboard to navigate from the home page to the contact page and back.
- Try the three form cases and check the email label consistently moves focus.
- Validate the markup and inspect the errors rather than relying on appearance alone.
- Check the image alternatives, table headers, long text and the narrow viewport.
- Share the files with a README that describes their structure, test cases and what a future backend would need.
A site can pass markup validation and still be hard for someone to use. Run both checks independently. Ask a classmate to choose a topic and explain what would happen when they submit. If a link description is vague, improve it and rerun the user test. If the validator reports a duplicated ID, follow every related label, heading or fragment link to make sure your change fixes all references. Write down one problem you found, the edit that solved it and how you confirmed the fix.
A follow-up exercise for a real use case
Adapt the same structure as a fictional college event site or workshop portfolio. Add a different page for equipment and let the visitor return to the main event timetable. Use an entirely different set of links and images while keeping the same understanding of sections and document order. Compare the two site outlines. A well-chosen markup structure can support new content without carrying forward the original site's terminology or data.
Prepare to demonstrate HTML in an interview
Use “choice, reason, check” when explaining your work. For the form, name the label and control, explain why their association matters, and then show that clicking the label focuses the control. For the menu, show which links repeat and use the keyboard to move across them. Prepare one narrow-screen example and one markup issue you repaired. A reviewer can repeat these tests from your own project rather than taking your word for what you learned.
- Where do the document title and main heading appear? Show the tab, then point to the heading in the browser and to the relevant source.
- Why use a button for a submit action and a link for navigation? Demonstrate each one with the keyboard.
- What makes the alt text useful for your chosen photograph? Name the information it carries and explain what a similar decorative image would need.
- How do you link to a heading on another page? Explain the path and fragment separately, then show the destination.
- Which parts of your form still need a server? Distinguish native browser checks from accepting and storing the data.
Common questions before learning HTML
Can I make a useful page with only HTML?
Yes. You can organise text, images, links and controls before adding design or scripting. Start with a small site someone can navigate. Add CSS to improve layout and JavaScript for interactive behaviour. Decide how to handle submissions before creating a real enquiry path.
What can I bring to the first training session?
Prepare two files and one short question about links, headings or form labels. Bring the source and the expected browser result so the trainer can reproduce it. If you plan your class around school, college or travel from Ambala Cantt, check current timings and the lab setup with the centre.
Which next topic fits my first project?
Choose CSS if the main issue is readability across widths. Choose JavaScript when the page needs a dynamic filter or similar interaction. If your aim is to send an enquiry and process it on a server, take that mock HTML form into a PHP or backend exercise after the structure and field relationships are solid.
Diagnose five mistakes with deliberately broken markup
Create a separate copy of your two pages in a folder called troubleshooting. Keep the original working version open so you can compare results. Reproduce each problem with one intentional edit. If a browser still displays something that looks usable, record the defect you found in the inspected tree or the keyboard test. A browser often tries to recover from invalid markup, so a page can appear normal until it is used with assistive technology or updated by another developer.
A paragraph seems to end in the wrong place
Place a list inside a paragraph in the troubleshooting copy. Inspect the browser's tree and compare it with the source. The parser closes the paragraph when it encounters the list. Rewrite the paragraph as a short introduction, close it, then start the list as a sibling. Check which of the two elements contains the final sentence. This problem often appears when pasted content contains a block element inside markup intended for ordinary sentences.
A shortcut link leaves the visitor at the wrong location
Create two sections with the same ID, then activate a link containing that ID. Rename the second section and retest both destinations. For a similar failure on the contact page, compare the fragment after the hash with the exact target on the destination page. Check spelling and punctuation before changing the layout. Use a meaningful ID for each section rather than deriving it from position, because the section may move.
A checkbox has no usable label
Add a checkbox for “Send me the meeting checklist.” Try clicking the words and then tabbing to the control. If the text does nothing, connect a separate label with its for value or place the input within the label. Inspect the accessible name. Check whether the label text still makes sense when read aloud away from the rest of the form. For a set of checkboxes sharing one question, use a fieldset and put the full question in the legend.
A link points to the local copy on your machine
Copy an absolute file path from your address bar into a link and move the project folder to a different location. The link breaks because it refers to the old machine-specific location. Replace the path with a relative link, move the copied folder again and verify both pages. This check is useful before sharing a zipped project with a trainer, since the trainer has no access to files on your drive.
User-facing text is confused with markup
Show a help note that mentions the literal string “<main>”. Write it as text using an escaped less-than character, then compare it with an actual opening tag. A literal example should be readable on the page. In a real site, text from outside your code should be escaped by the technology that renders it. If an organiser later adds a course title that contains an ampersand, confirm that the title displays correctly and that characters interpreted by HTML are handled safely.
Put each of these failures into a small troubleshooting log. List the original symptom, the test that revealed the fault and the fixed markup. The useful part of the log is the explanation, such as why a missing label affects more than appearance. Include the amended project as evidence, so the next person can reproduce your result.
Adapt the page for a second language and a screen reader
Add a short bilingual equipment note to the fictional club home page. Keep the original document language because the surrounding interface is still English. Put the Hindi note in an element with an appropriate language attribute and preserve its Unicode characters in the UTF-8 file. Use ordinary HTML text for the note so it can be selected, enlarged and read aloud. Copy the note as plain text into the browser inspector and confirm that you did not accidentally insert an image of the words.
Check reading order with a minimal example
On a scratch version of the page, add two sections under Activities. The first should explain the markup clinic and the second should describe the short practice challenge. In the accessibility inspector look for the level-two Activities heading followed by level-three headings for both topics. Then move the first activity below the second in the source and check the order again. You can use this test before introducing any CSS that changes visual placement.
Give instructions and errors separate roles
For a preferred session control, use a visible label “Preferred session,” with options that include a clear time or topic. Put an explanatory hint beside the control if a visitor must attend the whole activity. Connect it using an appropriate ID and aria-describedby. In a working site where a form can re-render after submission, preserve the user's choice and add the specific error beside the field. Mention the error in the linked description where that suits the experience. The question label stays the same, while the hint and error communicate different information.
Review one page without seeing its layout
Ask a partner to read the headings, text and controls from top to bottom. Ask what they think the site is for, which event is next and how they would ask a question. If they skip important context because it only appears in a photo, include that context as real text. If they cannot distinguish a page from a section, use clearer titles. Save the two most useful notes for your next project. A small markup improvement often makes it easier for different people and devices to use the same content.
If your project will eventually embed an external form or map, decide what happens when that service is unavailable. Add a meaningful link or address in text, and give the embedded frame a short, descriptive title. Check that every required task remains understandable while the external content is loading. Keep the main learning project limited to its own two pages until you can test those pages confidently.
Practise an admission enquiry with a clear contact page
Create a third scratch page for a fictional training enquiry. Give it a heading with the course name and a separate short paragraph with a sample class location. Format the information as normal text that can be copied or read aloud. Add a list of three topics a student can ask about: prerequisites, batch timings and practice projects. Include a labelled select whose visible options use the same language. Confirm the form starts with a neutral prompt such as “Choose your topic” and can still be understood without an image or icon.
Ask two people to find the sample location and select the project enquiry topic. Both should be able to tell which course they are asking about, even if they entered the page directly. If they make different guesses about the meaning of a field, improve its label or short hint. Use a descriptive document title and retain a link back to the course information so they can confirm what they are asking. This exercise connects markup choices to the questions a real student might bring to class in Ambala.