Build a Website
ActivitiesProjects
Plan, build, and publish a website around a real idea.
A website is a set of pages and resources shaped for a purpose, then delivered to visitors through a browser. Building one connects editorial choices with technical ones: what the site needs to communicate, how its content is structured, whether it changes in response to data, and how people will access it.
Begin with the site's purpose
MDN's first-site guide starts with three questions: what the site should do, what information it will present, and what its high-level look should be. It recommends beginning simply and sketching the page before writing code. Even professional teams use rough sketches before building digital mockups. A sketch gives a project a place to test its content and layout together: a title, an explanation, an image, and links can reveal whether one page is enough or whether the subject needs several connected pages.
Structure meaning before adding decoration
HTML gives content structure and meaning; CSS controls its appearance and layout; JavaScript adds behavior such as interactive changes. A first website does not need all three in equal measure. HTML can already organize headings, paragraphs, lists, links, images, and other media into a page. CSS then changes how that content is presented, while JavaScript is useful when the site needs interaction. Keeping content, presentation, and behavior in separate files can help people understand and maintain a project, though MDN presents that separation as a useful ideal rather than an absolute rule. If the site uses pictures found online, MDN warns that most web images are copyrighted; a search filter can be a lead, but the image's source and reuse terms still need checking.
Match the site's behavior to its model
A static site sends stored files to a browser unchanged. A dynamic site can generate a page from server-side code and data, such as a page that varies with a person's location or preferences. That difference helps set the scope of a project. A collection of pages explaining a topic may need no stored user data; a site that saves submissions or generates individualized results brings the browser-server relationship into the design. In that model, the browser requests a resource and the server responds; an interactive form can send information for the server to process.
Putting a website online also involves separate concepts. Hosting is space on a web server for the site's files; a domain is the address visitors use to find it. MDN describes several publishing approaches, from hosted files to online tools, whose features differ. The content and behavior you need should guide that choice; no one publishing route fits every site.
Check the experience beyond your own screen
A flexible site accounts for different screen sizes and browsers. MDN describes responsive layouts that adapt from wide desktop windows to compact phone screens, and says compatibility requires testing for browser-specific failures. Accessibility adds another layer: W3C's Web Accessibility Initiative explains that page content and markup, browsers, assistive technologies, authors, authoring tools, evaluation tools, and users all affect the result. Its example of image alternative text shows the chain clearly: a person writes meaningful text, the page carries it, software exposes it, and a visitor can use it. Privacy and security are related but separate questions too: MDN describes privacy in terms of avoiding unnecessary collection and security in terms of protecting information from malicious access.
