Publishing and Maintaining a Website

Take a finished set of web pages from your computer to the web. Organize the project files and paths, check the code with validators and browser developer tools, and make pages fast with well-prepared images. Add markup that helps search engines understand each page, publish the site on a static host, connect your own domain with DNS, secure it with HTTPS and keep it working after launch.

BeginnerLesson 8 of 8 in Web Development Basics Course

What you will learn

  1. Set up a website's files so they work the same on your computer and on a server, link them with correct paths, and use validators to find mistakes in the HTML and CSS.
    • Organize site files and folders
      Plan one project folder with a home page, clear file names and separate folders for styles, scripts and images.
    • Link pages and files with correct paths
      Write relative and absolute paths that find the right file both on your computer and after upload, and avoid the case and slash mistakes that only show up online.
    • Validate HTML and CSS
      Check pages and style sheets with the W3C validators, read their messages, and fix errors in a sensible order.
  2. Use the tools built into every major browser to see what the browser actually does with your HTML and CSS, find errors and missing files, and fix problems step by step.
    • Inspect and adjust HTML and CSS live
      Open the developer tools, inspect an element, see which CSS rules apply to it and why, and try out fixes before changing your files.
    • Find errors with the Console and Network panels
      Read error messages, find missing or slow files, and understand the status codes the server sends back.
    • Debug step by step and test across browsers and screen sizes
      Follow a repeatable process to find the cause of a problem, and check pages in several browsers and screen widths before publishing.
  3. Prepare images in the right format and size, add them to pages so they load efficiently, and measure and improve how fast pages appear.
    • Prepare image files for the web
      Choose a suitable image format, resize images to the size they are shown at, and compress them without visible loss of quality.
    • Add images to pages that load efficiently
      Write image markup that reserves space, offers the right file for each screen and format, and delays images the visitor has not scrolled to yet.
    • Measure and improve page speed
      Find out what makes a page slow with measuring tools, read the Core Web Vitals, and apply the basic fixes that help most.
  4. Give each page the HTML that helps search engines and link previews understand what it is about, find it and show it well.
    • Describe each page with a title, description and headings
      Write a unique title and meta description, declare the page language, and structure content with meaningful headings and semantic elements.
    • Help search engines find and index the right pages
      Use links, clear addresses, robots.txt, a sitemap and canonical and noindex tags so the right pages can be found and shown in search results.
  5. Understand what a static host does, choose one that fits the site, put the site online and publish updates safely.
    • Understand static hosting and choose a host
      Explain how static hosting differs from other kinds of hosting, and compare hosts by what a small site needs.
    • Deploy a site and publish updates
      Put a site online with the host's publishing method, check the live version, and publish later changes without breaking anything.
  6. Register a domain name, connect it to the host with DNS records, serve the site securely over HTTPS, and look after the site once it is live.
    • Choose and register a domain name
      Read the parts of a domain name, pick a suitable name and ending, and register and manage it with a registrar.
    • Point a domain to the host with DNS
      Create the DNS records a host asks for, understand how long changes take, and check that the domain points to the right place.
    • Serve the site over HTTPS
      Explain what HTTPS protects, get and renew a certificate through the host, redirect all traffic to HTTPS and fix mixed content.
    • Maintain a live site
      Keep a published site correct, working, secure and reachable with routine checks, backups and renewals.

Publishing a Website study guide

6 chapters

1

Prepare files that work online

A site can look finished on your computer and still fail after upload. The server needs a complete, well-organized set of files, and the browser must be able to find each one through its address. Start by choosing the folder that will become the site root. Then trace links from their starting locations and check the HTML and CSS for errors that a browser may quietly repair or ignore.

1.1 The folder that becomes your website

A website needs one project folder containing every file visitors will use. This is the site root. Publishing is much easier when that folder is a complete, portable site: no images borrowed from Downloads and no style sheet left in another project's folder.

Give each kind of file a place

A small repair shop could use this layout:

riverside-bikes/
  index.html
  prices.html
  contact.html
  404.html
  css/styles.css
  scripts/menu.js
  images/logo.svg
  images/workshop-800.jpg
  images/workshop-1600.jpg
  blog/index.html
  blog/winter-checklist.html

The HTML pages are the content, css/ holds styles, scripts/ holds JavaScript files, and images/ holds the images ready for visitors. A site without scripts does not need a scripts folder. Separate folders make related files easier to find without changing how a browser uses them.

Most web servers send index.html when a visitor requests a folder. The address https://www.example.com/ opens the root home page. The address https://www.example.com/blog/ opens blog/index.html. A file named home.html is still a page, but the server usually will not choose it for the bare site address.

Choose names before launch

Use lowercase letters, hyphens between words, and the correct extension. opening-hours.html and team-photo.jpg are clear names. Spaces can appear in URLs as %20, making an address harder to read and type. Names become part of the site's public addresses, so choose them for the content they identify.

The extension should match the file: .html for HTML, .css for CSS, .js for scripts, and a suitable image extension such as .jpg, .webp or .svg. The server sends a Content-Type header describing the file's format. Hosting systems commonly use extensions to choose that type. Renaming a photo from .jpg to .webp does not convert its contents; export it in the new format with an image tool.

Most servers distinguish uppercase and lowercase names. A link to Logo.svg can fail when the uploaded file is logo.svg, even if it worked on a computer with a case-insensitive file system. A lowercase naming habit keeps that difference out of new projects.

Separate public files from working files

Keep camera originals, design files and notes outside the site root, for example in riverside-bikes-originals/. Export only the prepared web images into images/. Files in the published folder can be downloaded even when no page links to them. Keep passwords, private documents and personal data out of that folder.

Before upload, check that every linked local asset is inside the project. A photo at a personal file:// address exists on your computer; it does not travel with the site unless you copy it into the published folder. After moving it, update the link and test it again.

A stable structure also protects links after launch. Moving prices.html to a new address breaks old bookmarks unless the host redirects that old address to the new page.

Key Takeaways

  • The site root contains the complete public site, with index.html at its top level.
  • Use descriptive lowercase names, hyphens and extensions that match the file contents.
  • Keep original assets and private working files outside the published folder.
  • Moving a published page requires a redirect to preserve its old address.

1.2 Paths from the page to the file

A path tells the browser where to look for a file. To write one correctly, identify both the file being requested and the location from which the browser will resolve the path.

Start in the referring file's folder

A relative path begins from the current page's folder. In the bike shop site, index.html links to prices.html with href="prices.html", to the logo with src="images/logo.svg", and to a post with href="blog/winter-checklist.html".

From inside blog/winter-checklist.html, the route changes:

<link rel="stylesheet" href="../css/styles.css">
<a href="../index.html">Home</a>
<img src="../images/logo.svg" alt="Riverside Bike Repair">
<a href="autumn-tips.html">Autumn tips</a>

For the logo, first go up from blog/ with ../, then enter images/. A file in the same folder needs only its name. Two levels up use ../../. Always use forward slashes / in web paths, including when writing on Windows.

A path in a CSS file starts from the CSS file's folder. In css/styles.css, the rule background-image: url("../images/pattern.svg"); goes up from css/ and then down into images/. It does not start from whichever HTML page happens to load the style sheet.

Distinguish three address forms
FormExampleStarting point
Relative path../images/logo.svgReferring file's folder
Root-relative path/images/logo.svgDomain root
Absolute URLhttps://www.example.com/images/logo.svgFull stated web address

An absolute URL includes the scheme and host name. Use one for another website. Relative paths let your own site move between a local server, a preview address and its final domain without replacing the domain in every link.

A leading slash has a specific meaning. At https://username.github.io/riverside-bikes/, /css/styles.css requests https://username.github.io/css/styles.css. It drops the project folder from the address. From the site's root page, css/styles.css keeps that folder and reaches the intended file.

Test the address the browser actually uses

Opening HTML directly from disk gives a file:// address. Folder links and paths beginning with / can behave differently there. Run a local development server from the site folder, for example with python3 -m http.server, or use a code editor's live preview. Then open the local HTTP address it supplies.

On a server, href="blog/" opens blog/index.html. If a link or image fails, open DevTools before reloading and find its request in Network. A 404 means the requested resource was not found. Read the full requested URL and compare each folder, slash, letter and extension with the uploaded files. A capital letter or missing ../ is enough to send the browser elsewhere. A personal computer path copied from a file explorer cannot serve visitors; replace it with a path inside the site.

Key Takeaways

  • Relative paths start from the referring file; ../ goes up one folder.
  • CSS image paths start from the style sheet, not the HTML page.
  • A leading / starts at the domain root and can skip a project subfolder.
  • Use forward slashes and exact letter case in paths.
  • Trace a broken link through its full Network request URL.

1.3 Errors a browser can hide

Browsers try to display pages even when the code contains mistakes. That recovery is useful for visitors, but it can hide problems from the author. Validation checks HTML or CSS against the rules of its standard, independently of whether the page happens to look right.

Use the checker for the language

The W3C Nu Html Checker checks HTML. The W3C CSS Validation Service checks CSS. You can submit a published URL, upload a file or paste code. An editor's built-in checks are useful while writing; the web checkers also let you check the published copy.

Read the line and column attached to each message. An error breaks a rule and needs fixing. A warning or information message asks for attention but may describe allowed code. Read what it says before deciding whether a change is needed.

Work from the first error downward and rerun the checker after the fix. One missing quote or badly closed element can make later code appear to belong somewhere it does not, producing many follow-on messages.

Repair structure in HTML

Consider incorrectly nested elements:

<p>Open <strong>daily</p></strong>

The inner <strong> must close before the outer <p>:

<p>Open <strong>daily</strong></p>

For a meaningful photo, supply an alt attribute describing its relevant content, such as alt="Mechanic adjusting the brakes of a city bike". A decorative image uses an empty alt="". Each id must also be unique within its page. Use a shared class when several elements need the same style.

Other useful checks include the doctype, a page title, complete attribute quotes and list items inside a list. A <div> cannot sit inside a paragraph. The browser closes that paragraph before the division, and a later </p> can become a stray closing tag. The corrected browser structure can differ from the text you wrote.

Repair declarations in CSS

A number and its CSS unit belong together: write width: 100px;, with no space between 100 and px. The property for text color is color. An unknown property is ignored.

A missing semicolon can damage the next declaration too:

.card {
  margin: 10px
  padding: 5px;
}

The browser reads the two lines as one invalid declaration. Add the missing semicolon after 10px, then check again. Browsers usually skip invalid declarations without displaying an on-page error.

Combine code checks with page checks

Passing validation does not establish that the page is accessible, fast, useful or factually correct. Try keyboard navigation, examine the layout in browsers and check the content itself. If the CSS checker flags a very new feature, check its specification and MDN support information before removing working code; checkers can lag behind newer features.

Validate after substantial changes and before publishing. After upload, submit the live address and verify that the latest content is visible. A valid older page can pass just as easily as the updated one.

Key Takeaways

  • Validate HTML and CSS with their separate checkers.
  • Fix the earliest error and rerun before chasing later messages.
  • Browsers repair HTML and skip invalid CSS, so appearance alone can hide errors.
  • Read warnings and decide whether they identify a real problem.
  • Check accessibility, behavior and the live version alongside validation.
2

Find the cause with browser tools

A browser can show you the structure it built, the styles it selected and every file it requested. These clues turn a vague problem such as "the page looks wrong" into something you can test. Use Elements to inspect the affected item, Console and Network to check loading problems, and a repeatable process to isolate a cause. Save a successful fix in your source files and test it in other browsers and screen sizes.

2.1 See which CSS actually wins

Developer tools, often called DevTools, show how the browser interprets your page. Right-click an item and choose Inspect. You can also use F12 or Ctrl+Shift+I on Windows and Linux, or Cmd+Option+I on macOS. In Safari, first enable "Show features for web developers" in Settings, Advanced.

Inspect the browser's structure

The Elements panel, called Inspector in Firefox, shows the DOM: the structure built from the HTML. The browser may have repaired invalid markup, so this is not always a direct copy of the source. A <div> written inside a paragraph appears outside it in the DOM because the browser ends the paragraph first.

Select the item with the problem. The Styles pane lists matching CSS rules and links to their source files and line numbers. A crossed-out declaration is not active. Another rule may beat it, or a warning icon may show that the declaration is invalid. The Computed pane shows the final property values after the browser has resolved those rules.

Follow a losing color rule

Suppose this link appears navy even though its button class asks for white:

<a class="btn" href="contact.html">Contact us</a>
#main a { color: navy; }
.btn { color: white; }

Both rules match when the link is inside id="main". The id selector makes #main a more specific: its specificity is (1, 0, 1), compared with (0, 1, 0) for .btn. In these ordinary rules, putting .btn later does not overcome that difference.

One targeted fix is #main .btn, with specificity (1, 1, 0). Another is replacing the broad id rule with a link class such as .nav-link. Two single-class selectors have equal specificity, so their order can decide the color. Changing #main a to .main a still leaves (0, 1, 1), which beats .btn. Inspect the actual winner before choosing the smallest useful correction.

Measure the whole box

The box model diagram separates content, padding, border and margin. With box-sizing: content-box, a 300px content width plus 20px padding on each side and 2px borders takes:

300+2×20+2×2=344

That is a 344px border box, before any margins. With box-sizing: border-box, the whole border box stays 300px wide; its content width becomes:

300−40−4=256

Use the diagram to explain a gap or overflow instead of repeatedly changing widths by guesswork. Flexbox and grid badges can also show layout tracks, lines and gaps.

Try a change, then save it

Toggle a declaration off, edit a value or add a rule in Styles. Force :hover or :focus to examine a state without keeping the pointer or keyboard in place. These edits are temporary: ordinary DevTools editing does not update your project files. Copy the working change into the source, save and reload. If the fix disappears, it has not yet been saved in the copy the browser loads.

Key Takeaways

  • Elements shows the browser-built DOM; Styles shows matching rules; Computed shows final values.
  • Trace a crossed-out declaration to the rule or invalid value that prevents it from applying.
  • Inspect content, padding and border together when diagnosing widths.
  • Copy tested DevTools changes into the source and reload to verify them.

2.2 Read failed requests and stale files

A page is assembled from several requests. The HTML can arrive successfully while a style sheet or image fails. Console messages and the Network panel show these separate outcomes.

Open the tools before reloading

The Console reports errors and warnings, including script failures, missing resources and mixed content. Messages often link to the affected file and line. Even an HTML-and-CSS site can have useful Console messages.

The Network panel records the page's requests while DevTools is open. Open it, reload, then filter by CSS, images or fonts to reduce the list. Read the requested URL, status, type, size and time. Select an entry to inspect its response headers and contents.

StatusMeaningWhat to check
200OK; a response was sentWhether it is the intended file and type
301 or 308Permanent redirectThe destination address
304Not modifiedThe saved copy is being reused
404Not foundPath, case and uploaded file
5xxServer problemHost status and server response

A status in the 400s concerns the request; one in the 500s concerns the server. A 404 is not evidence that you need to change the CSS layout.

Trace a missing logo

The live page has an empty image space. In Network, its request is https://www.example.com/images/Logo.svg, returning 404. The uploaded file is images/logo.svg. The requested capital L does not match the actual lowercase name. Correct the HTML path, deploy the page, and confirm the request now succeeds.

Trace an unstyled page

Look for the CSS request first. If no request appears, inspect the <link> element, including rel="stylesheet". If the request is 404, compare its URL with the uploaded location.

A 200 is only a successful response, not confirmation that the response is CSS. Check the Console and the response's Content-Type, which should be text/css. A host can mistakenly return an HTML error page with 200 status, and the browser will refuse to apply it as a style sheet. Once the correct CSS has arrived with the right type, inspect invalid declarations and selectors that do not match the affected element.

Rule out the browser's saved copy

A cache stores files for reuse. It saves download time, but an old copy can make a successful update look missing. With DevTools open, enable "Disable cache" in Network and reload. In Chrome, Edge and Firefox, Ctrl+Shift+R on Windows and Linux or Cmd+Shift+R on macOS forces a full reload. Inspect the returned content before concluding that the upload failed.

The size and timing columns also help with speed problems. A 3.6 MB image among tiny text files is a useful starting point. Network throttling simulates a slower connection. An HTTPS page that requests a file with http:// can trigger a mixed-content warning; inspect the exact resource URL to find the insecure reference.

Key Takeaways

  • Open Network before reloading so it records the requests you need.
  • A 404 calls for a path and upload check; a 200 still needs the correct response contents and type.
  • Use Console messages and response headers together to diagnose refused CSS.
  • Disable the cache when checking whether a new version arrived.
  • Network size and timing columns reveal heavy or slow resources.

2.3 A fix you can repeat and trust

A useful bug report describes an observable difference: "At 360px wide, the contact page scrolls sideways." That is easier to investigate than "the mobile layout is broken." Record the page address, browser, screen width, actual result and expected result.

Follow evidence through five steps
  1. Reproduce. Make the problem happen again in the same conditions.
  2. Gather evidence. Read Console and Network, validate the code, and inspect the affected element.
  3. Isolate. Disable one rule or temporarily remove a small piece of code to narrow the cause.
  4. Change one thing. Test whether that change explains the result.
  5. Save and retest. Put the fix in the source, reload and check other conditions.

Changing several things at once makes the result hard to interpret. One change may solve the original issue while another creates a new one. Keep the failing case available so you can compare before and after.

Work through a narrow-screen overflow

A page fits on a laptop but scrolls sideways at a 360px viewport. Open responsive mode at that width. Hover over elements in Elements and watch their highlighted boxes. An image is wider than its column; its HTML gives a large intrinsic width, and no CSS limits it.

Try this rule:

img {
  max-width: 100%;
  height: auto;
}

The maximum width lets the image shrink to its container. Automatic height preserves its proportions. If the overflow disappears, save that rule in the correct style sheet and reload. Then test the image at wider widths too. Hiding horizontal overflow on the page could conceal part of the image without making it fit.

If the change does nothing, use the evidence to narrow the next step. Does the rule appear in Styles? Is it overridden? Did the browser load the file you edited? Common causes include mismatched class names, incorrect paths, missing braces or semicolons, unsaved files and cached copies.

Test engines as well as window sizes

Responsive mode changes viewport width and can simulate touch, but it does not reproduce every detail of a real phone's speed, fonts or rendering. Check the media-query breakpoints and the widths between them, then use at least one real phone.

Chrome and Edge use Blink, Firefox uses Gecko, and Safari uses WebKit. Two browsers using the same engine do not provide the same breadth of testing as browsers using different engines. Safari is particularly relevant for the many iPhone browsers that use WebKit. Check MDN's support information before relying on a newer feature.

Check the published version

Server behavior can expose failures hidden on disk: case-sensitive names, missing uploads and paths that skip a project subfolder. Open the live address, follow the links and inspect failed requests there.

Before publishing, validate the HTML and CSS, inspect Console errors, check for unintended 404s, try phone, tablet and desktop widths, and check at least two browser engines. Use the keyboard to follow navigation and activate controls. After deployment, repeat the checks on the live site where the changed feature is used.

Key Takeaways

  • Describe a reproducible problem with its address, browser and viewport.
  • Isolate a cause and change one thing at a time.
  • Test different browser engines and a real phone alongside responsive mode.
  • Check both the saved source and the published version.
  • Include links and keyboard navigation in launch checks.
3

Make pages fast and stable

Large images often account for most of a small site's download. Preparing the files saves data; good image markup then helps the browser choose a suitable file and reserve its space. Measure the page to find the largest remaining delays and unexpected shifts. Use Network, Lighthouse and real-visitor data to decide what to improve, keeping the visitor's screen, connection and device in view.

3.1 Smaller image files with enough detail

An optimized image is a small file that still looks good at its displayed size. Start with the format, pixel dimensions and compression. Shrinking an oversized photo with CSS changes its appearance, but the browser still downloads and decodes the original file.

Match the format to the content
FormatUseful choice forMain property
JPEGPhotosLossy compression; no transparency
PNGScreenshots, sharp graphicsLossless; supports transparency
WebP or AVIFPhotos and other raster graphicsModern lossy or lossless formats; transparency
GIFExisting simple animationsLimited to 256 colors per frame
SVGLogos, icons, simple drawingsVector shapes that stay sharp when scaled

Raster images store pixels. Enlarging a small raster image reveals blur because no extra detail is created. SVG stores shapes and lines, so it suits a logo but not a camera photo. Current major browsers support WebP and AVIF. For animation, a modern image format or short video often makes a smaller file than GIF.

Lossless compression preserves pixel values. Lossy compression removes some detail to save more bytes. Lower quality eventually produces blocky areas or blurred edges. Compare the export at its actual displayed size. Make each new export from the original, avoiding repeated lossy saves of an already compressed copy.

Resize for the largest use

A photo displayed at most 800 CSS pixels wide needs about 800 image pixels on a standard-density screen and 1,600 on a screen using two device pixels per CSS pixel. Prepare suitable alternatives instead of sending the camera original to everyone.

The bike shop's original is 4,000 × 3,000 pixels and 3.6 MB. A 1,600 × 1,200 export has:

1600×1200=1920000

pixels, or 16% of the original 12 million. A JPEG export at quality 80 might be about 240 KB; the actual size depends on the photo. That example saves about 93% of the file bytes.

At 10 Mbit/s, using decimal MB, the original's ideal transfer time is:

3.6×8÷10=2.88

seconds. The 0.24 MB export takes about 0.19 seconds. These are transfer times only; real loading also includes connection and server delays. Decoded at 4 bytes per pixel, memory use drops from 48 MB to 7.68 MB. A smaller encoded file and fewer decoded pixels are separate gains.

Export a public copy

Use an image editor's export controls or a tool such as Squoosh. Keep the original outside the published folder and give the exports clear names such as workshop-800.jpg and workshop-1600.jpg. Strip camera metadata during export; it can include the photo's date, camera details and GPS location.

For an SVG, an optimizer such as SVGO removes drawing-program leftovers. Text compression on the server can reduce its transfer size further. For any format, inspect the finished image: a photo saved as PNG can be unnecessarily large, while a text-heavy logo saved as JPEG can have smeared edges.

Key Takeaways

  • Choose a format for the image content: photos need raster formats; simple logos often suit SVG.
  • Resize the actual file for its display size and screen density.
  • Compare lossy exports at their displayed size and export from the original.
  • Remove unnecessary metadata from public image copies.
  • Pixel dimensions affect decoded memory as well as download size.
  • CSS scaling alone does not reduce the downloaded image file.

3.2 Images that fit without pushing text around

An image can be small enough to download quickly yet still make a page jump. The browser needs to know its proportions before the image arrives and needs useful choices for different screens.

Reserve space with dimensions

Write numeric width and height attributes without units:

<img src="images/workshop-800.jpg"
     width="800" height="600"
     alt="Mechanic adjusting the brakes of a city bike">

These dimensions tell the browser the 4:3 aspect ratio. With max-width: 100%; height: auto; in CSS, the image shrinks to fit a narrow column. In a 360px-wide column, its height is:

360×600÷800=270

pixels. Reserving that space keeps the text below from moving down when the image loads. Missing dimensions can produce layout shifts, the unexpected movements measured by CLS.

Offer widths the browser can choose

For the same photo at two sizes, use width descriptors and a description of its display width:

<img src="images/workshop-800.jpg"
     srcset="images/workshop-800.jpg 800w,
             images/workshop-1600.jpg 1600w"
     sizes="(max-width: 840px) 100vw, 800px"
     width="800" height="600"
     alt="Mechanic adjusting the brakes of a city bike">

800w and 1600w state the actual file widths. In this layout, sizes says the image occupies the viewport width up to 840px and 800px above that. The browser uses the declared slot width, screen density and its selection rules to choose a file. Make sizes match the real layout; a full-viewport claim for a much narrower column can cause unnecessary downloads.

Offer formats with a fallback
<picture>
  <source srcset="images/workshop.avif" type="image/avif">
  <source srcset="images/workshop.webp" type="image/webp">
  <img src="images/workshop.jpg" width="800" height="600"
       alt="Mechanic adjusting the brakes of a city bike">
</picture>

The browser chooses the first supported source format. The required <img> supplies the fallback, dimensions and alternative text. This is a format choice; srcset with width descriptors solves the related problem of choosing a suitable pixel width.

Delay images that are not needed yet

Use loading="lazy" for images farther down a page. The browser can wait until the visitor gets near them, saving data for images never reached. Keep images visible at first load eager, especially the large main hero image. Lazy loading that image delays the content visitors are waiting to see. A hero in the HTML is discovered early; fetchpriority="high" can request higher fetch priority for it.

Write alt text for the image's purpose in context. A decorative image gets alt="". Meaningful photos and diagrams belong in HTML as images; a CSS background suits decoration and has no alt attribute or native loading attribute.

Key Takeaways

  • Correct width and height attributes reserve the image aspect ratio before loading.
  • Use srcset and accurate sizes to offer suitable image widths.
  • Use <picture> sources for format choices and keep the required fallback <img>.
  • Lazy-load below-the-fold images, keeping first-screen and hero images eager.
  • Place meaningful images in HTML with useful alternative text.

3.3 Measure what visitors wait for

Page weight is the total data downloaded for a page. The HTML leads to requests for CSS, images, scripts and fonts. File sizes, request count, connection speed and device performance all contribute to the experience.

Find the largest share

The bike shop home page downloads 15 KB of HTML, 30 KB of CSS, two 40 KB fonts, a 2,400 KB hero and three 350 KB photos:

15+30+80+2400+3×350=3575

KB. Images account for 3,450 KB, about 96.5%. With a 220 KB hero and three 45 KB photos, the total becomes:

15+30+80+220+3×45=480

KB, about 87% less. At 10 Mbit/s, ideal transfer time drops from about 2.86 seconds to 0.38 seconds. Server response and connection setup add time. Removing a few spaces from CSS would have little effect beside this image saving.

Read the experience measures

The Core Web Vitals, as of October 2026, measure different problems:

MeasureWhat it tracksGood threshold
LCP: Largest Contentful PaintWhen the largest visible image or text block appears2.5 seconds or less
INP: Interaction to Next PaintDelay from interaction to the next visible response200 milliseconds or less
CLS: Cumulative Layout ShiftUnexpected movement over the page's lifetime0.1 or less

Good field performance meets each threshold at the 75th percentile. CLS can include a banner shifting content after loading, not just an image arriving during initial load.

Lighthouse in Chrome or Edge runs a lab test with scores and suggested fixes. PageSpeed Insights runs online tests and, when enough observations exist, shows field data from real Chrome visits. A lab score is one test under chosen conditions. Repeat comparisons with the same settings and look at real visits when available.

Improve the biggest costs first

Prepare images and their markup first. Then reduce unnecessary font families and weights, use WOFF2 fonts, and use font-display: swap so fallback text appears while the font loads. Add defer to suitable external scripts so downloading does not block HTML parsing and execution follows parsing. Large maps, video players and other third-party embeds can be loaded on demand.

Minification removes spaces and comments from code. gzip or Brotli compression reduces transferred text bytes. These help, but already compressed JPEG, WebP and AVIF images gain little from further text-style compression.

Caching lets returning visitors reuse files, controlled through headers such as Cache-Control. A CDN keeps copies in different regions to reduce the distance requests travel. When a long-cached resource changes, a name such as styles-v2.css or address such as styles.css?v=2 makes it a new request. Test under network throttling and on a phone; a quick laptop on Wi-Fi can hide a slow mobile experience.

Key Takeaways

  • Use page weight and request timings to choose the largest useful improvement.
  • LCP, INP and CLS track loading, responsiveness and visual stability.
  • Compare lab tests under matching settings; field data reflects real visits.
  • Optimize images before small text-file savings when images dominate.
  • Keep fonts, scripts and third-party embeds light.
  • Caching and CDNs speed delivery; changed long-cached files need a new address.
4

Make pages clear to search engines

Search engines discover pages through links and read their content to understand them. A useful page title, an honest description and a clear heading outline give each page a recognizable purpose. Crawling and indexing controls then help guide which public pages are found and shown. Learn the different jobs of links, robots.txt, noindex, sitemaps and canonical URLs so one setting does not accidentally defeat another.

4.1 Titles, descriptions and a readable outline

Each page should explain its own purpose in its HTML. Search engines read that markup, while browser tabs, bookmarks and screen readers also depend on it. Clear structure begins with the content visitors can actually read.

Name the page in the head

The <title> element belongs in <head>. Give each page its own descriptive title, with the site name after the specific topic:

<title>Repair Prices – Riverside Bike Repair</title>
<meta name="description"
      content="Prices for flat repairs, brake adjustments and full services at Riverside Bike Repair. Walk in Monday to Saturday or book online.">

The title appears in the browser tab and bookmarks and usually contributes the headline in search results. HTML does not impose a title length limit, but search displays cut text to fit, so put the useful words first. A generic title such as "Home" gives little information when separated from the site.

The meta description is a readable one- or two-sentence page summary. Search engines may use it for a result's snippet, but they can select page text instead. Match the description to that page's content. Copying one description across every page hides the differences between them; a list of repeated keywords is not a useful summary. Google ignores the old keywords meta tag.

Declare language and characters

Use <html lang="en"> for an English page. It helps screen readers choose pronunciation and browsers handle language features. Google identifies language from visible text and ignores this attribute, so do not treat it as a Google language-setting switch.

Place <meta charset="utf-8"> early in the head so characters such as é and an en dash display correctly. Include the viewport meta tag used for responsive pages:

<meta name="viewport" content="width=device-width, initial-scale=1">
Make the outline match the ideas

Use one clear <h1> for the main page topic, <h2> for its main sections and <h3> for subsections. On the prices page, "Services" is an h2, with "Basic service" and "Full service" as h3 headings beneath it. Choose heading levels for this relationship; adjust their visual sizes with CSS.

Semantic elements identify roles: <nav> for navigation, <main> for the main content, and appropriate <header>, <article>, <section> and <footer> elements. Use actual lists, links for navigation and buttons for actions. A page of generic divisions loses these role signals. Keep important words such as prices, opening hours and headings in HTML text, where they are available as text to visitors and tools.

Set a useful shared-link preview

Open Graph tags describe a link preview in social and chat apps. Common properties are og:title, og:description and og:image:

<meta property="og:title" content="Repair Prices">
<meta property="og:image"
      content="https://www.example.com/images/workshop-800.jpg">

Use a full HTTPS URL for the preview image. These tags describe the shared card; they do not replace the visible page headings or its ordinary title and description.

Key Takeaways

  • Give every page a specific title and an honest, unique description.
  • Use lang for language-aware browsers and assistive technology.
  • Choose heading levels for the content outline and style their size with CSS.
  • Semantic HTML and real page text make content easier to interpret.
  • Open Graph tags supply shared-link preview details.

4.2 Discovery, indexing and preferred addresses

Crawling is fetching pages, often by following links. Indexing is storing information about those pages for search results.

Give every page a route in

Link each page from at least one other page with an ordinary <a href> link. Descriptive text such as "repair prices" tells visitors and crawlers what the target contains. A readable path such as /blog/winter-checklist.html gives more context than /page7.html.

A sitemap lists the full preferred URLs you want discovered. An XML entry can look like this:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/prices.html</loc>
    <lastmod>2026-10-01</lastmod>
  </url>
</urlset>

The optional last-modified date should represent a significant change. Update the sitemap as pages change. A small, well-linked site can be discovered without a sitemap.

Keep crawling and indexing controls distinct

A robots.txt file at the domain root asks compliant crawlers which paths not to fetch:

User-agent: *
Disallow: /drafts/
Sitemap: https://www.example.com/sitemap.xml

This does not lock the folder. People can open its addresses, and a blocked URL may still appear in results if other pages link to it. Without a robots.txt file, crawlers are allowed to fetch pages. A copied Disallow: / blocks crawling across the site, so remove a test-site block before launch when the site should be crawled.

To request exclusion from search results, put this in the page's head:

<meta name="robots" content="noindex">

The crawler must fetch the page to read that instruction. Blocking the same URL in robots.txt can stop it from discovering noindex. Neither setting makes a page private: private content needs access control or must stay off the public site.

Choose one address for duplicate content

A page may answer at HTTP and HTTPS addresses, with and without www, or at both /blog/ and /blog/index.html. A canonical link identifies the preferred address:

<link rel="canonical" href="https://www.example.com/blog/">

Use the full absolute URL. Canonical markup is a strong hint; a redirect that actually sends visitors to the preferred address is a stronger signal. Match internal links and sitemap URLs to that preference to avoid sending conflicting signals.

Check what search engines can see

Google Search Console and Bing Webmaster Tools accept sitemaps and show indexing and crawl problems after you verify site control. A site:example.com search gives a rough view of indexed pages. New sites may take days or weeks to appear. A sitemap, clean markup or a payment cannot guarantee a high ranking; these tools help you find technical obstacles and understand what has been processed.

Key Takeaways

  • Crawling fetches a page; indexing makes its content available for search.
  • Link every page with useful link text and list preferred URLs in a sitemap.
  • robots.txt controls crawling requests, while noindex requests exclusion from results.
  • A crawler needs access to read a page-level noindex tag.
  • Canonical links suggest a preferred URL; redirects send visitors there.
  • Use webmaster tools to inspect discovery and indexing problems.
5

Publish and update a static site

Static hosting serves the HTML, CSS and other files you have prepared. Choose a service whose publishing method, limits and features fit the site you need to run. Then deploy the correct folder, check the host's live address and follow a controlled route for later changes. A successful upload is the start of the live check: missing assets, old content and broken addresses still need to be caught.

5.1 Choose hosting for the site you have

A static website serves prepared HTML, CSS, image and script files. Its content can be updated whenever you publish new files; "static" describes how the host serves them. The hosting server keeps delivering them when your own computer is switched off.

Know what the host provides

A dynamic site builds responses on the server, often from a database. A small informational site or portfolio built with HTML and CSS can use static hosting without server-side programming. Adding a contact form's markup does not by itself create a service that stores or emails submissions. That requires host-provided form handling or a separate service.

Static hosts commonly provide a temporary address, publishing controls and HTTPS. Many serve files through a content delivery network, which keeps regional copies. GitHub Pages, Netlify, Cloudflare Pages and Vercel are examples, with different plan terms and workflows. Shared hosting is another option and often supports secure file transfer.

A static page can still run JavaScript in the visitor's browser, such as a menu interaction. The host still serves a prepared script file. With no site application code or database running on the server, there are fewer application components to attack; the hosting account and public files still need protection.

A GitHub Pages user site uses the root address https://username.github.io/ from a repository named username.github.io. A project site uses a subfolder such as /riverside-bikes/. That address structure matters when testing root-relative asset paths.

Compare needs with the current plan

Read the plan's limits and conditions before choosing. Check:

  • Storage and monthly data-transfer allowances.
  • Whether the plan permits commercial use.
  • Custom-domain support and automatic HTTPS.
  • A publishing method you can use reliably.
  • Custom error pages, redirects and previous-deploy recovery.
  • Form handling if visitors must submit information.
  • How easily you can take your files to another host.

A photographer's six-page portfolio with 40 prepared photos fits the size of many free static plans. If it attracts paid work, however, its commercial purpose also matters. Size alone does not establish that a free plan permits it. Terms change, so check the actual service and plan rather than relying on an old comparison.

Pick a manageable publishing route

Drag-and-drop publishing can suit a small project: you upload the folder through the host's interface. A repository connection publishes from a chosen stored code source and can deploy updates when changes are pushed. Command-line tools offer another route. Shared hosting often supports SFTP, an encrypted file-transfer method. Plain FTP exposes credentials and files during transfer, so use a secure route.

For GitHub Pages on a free plan, publishing is available from public repositories. Anyone can read the repository files. Published assets are public too, even when navigation does not link to them. Keep the upload limited to intended public files and protect the hosting account with two-factor authentication.

Check a feature in its actual workflow

If the site includes a contact form, locate the form endpoint or host feature that receives it. Confirm the plan includes that feature and send a test submission after launch. A form that looks complete can still have nowhere to send data. If a custom 404 page or permanent redirect matters, confirm the host's exact configuration method before depending on it.

Key Takeaways

  • Static hosts serve prepared files and keep them available independently of your computer.
  • Check current plan limits, commercial-use rules and needed features.
  • A working contact form needs a receiving service beyond its HTML.
  • Choose a publishing route you can maintain and secure the hosting account.

5.2 Deploy the right folder and verify it live

To deploy is to publish the current site files to a host. The publish directory becomes the site's root online. For plain HTML and CSS, there is no build step: select the folder containing the finished index.html and its assets.

Make the first release

For a drag-and-drop host:

  1. Open the folder you intend to publish and confirm that index.html is directly inside it.
  2. Validate the pages and test their links and layout through a local server.
  3. Upload that folder using the host's publishing interface.
  4. Wait until the host reports the deployment is live.
  5. Open its supplied web address and check the site there.

If the home page appears only at /riverside-bikes/index.html, you may have uploaded the containing folder one level too high. The intended publish directory is riverside-bikes/, not the folder holding it. Fix the directory selection and publish again; merely linking visitors to the nested address leaves the bare home address wrong.

Publish from a repository

In GitHub Pages, open the repository's Settings and Pages. Choose "Deploy from a branch", then select the branch and publishing folder, either its root or /docs, and save. When a new version is pushed to that publishing source, Pages deploys it again. Check the displayed Pages address after the deployment finishes. A project URL may include the repository name, so test paths at that actual location.

Other hosts have their own repository connection and directory settings. For a site made from plain files, do not add a build command simply because the interface offers a field for one.

Check the delivered version

Open every page, follow internal links and inspect Console and Network for failed resources. Force a full reload to avoid mistaking cached files for the new release. Try the site on a real phone. Check the visible change you intended to publish, not just the absence of an error message.

Configure a custom 404.html where the host supports it. It should tell the visitor that the address was not found and provide a useful way home. Check an invented missing address to verify the host actually uses it. A helpful error page does not replace a redirect when the content has moved.

Keep a source you can recover

The local project or connected repository is the source of truth, the copy from which future releases are made. A quick correction in a host's web editor can disappear on the next upload unless you also put it into that source.

Use a preview deployment when available to test an update before visitors receive it. If an update breaks the live site, a host's rollback can restore a previous deployment. Then correct the source too, or the next release may reintroduce the fault.

When a page changes address, add a permanent 301 redirect from the old URL to the new one using the host's redirect rules. Test the old address after publishing: it should lead to the intended new page. On Netlify, a _redirects file is one configuration route; other hosts use different settings.

Key Takeaways

  • The publish directory has index.html directly at its top level.
  • Check the actual live address, asset requests and newest content after every deploy.
  • Keep the local project or repository as the source for future releases.
  • Preview updates and use rollback when a release needs recovery.
  • Use a permanent redirect for a moved page; use a 404 page for a missing one.
6

Connect a domain and keep the site running

A custom domain gives the site a lasting public name, but several services work together to make that name usable. Registration keeps your right to use it, DNS points it to the host, and HTTPS protects connections to the correct name. After launch, renewals, backups and regular checks keep those pieces working. Follow the connection through each service so a change to one does not quietly break another.

6.1 Register a name you can keep

A domain name is a readable name such as example.com. DNS connects that name to information such as a host's IP address. Registration gives you the right to use the name for a period; it is not a permanent purchase.

Read a web address

In https://www.example.com/prices.html, https is the scheme, www.example.com is the host name and /prices.html is the path. Read the domain labels from right to left: .com is the top-level domain, or TLD; example is the registered name under it; www is a subdomain.

Generic TLDs include .com, .org, .net, .dev, .shop and .studio. Country-code TLDs use two letters, such as .de, .fr, .jp, .ca and .au. Some names are registered under a second-level category, such as .co.uk.

Some endings have eligibility rules. .ca requires a Canadian connection; .eu accepts eligible EU or EEA citizens, residents and established organizations; .us requires a US connection. Check the registry's rules before choosing a restricted ending. The .dev and .app endings require HTTPS in browsers.

Know who handles registration

A registrar records your registration with the registry that operates the TLD. ICANN coordinates the generic TLD system and accredits its registrars; country-code registries set their own rules. Registrations commonly last from one to ten years and need renewal.

Choose a name that is short, easy to say and spell, and close to the project or business name. Avoid confusing numbers and hyphens, and check that the name does not use someone else's trademark. If a preferred .com name is taken, compare a clear longer name, a suitable local ending or a relevant generic ending. Availability alone is not permission to use another business's name.

Compare the ongoing commitment

Check the renewal price as well as the first year's offer. Extra services, including email, may have separate charges. The domain and the website hosting can come from different companies; registering a domain does not by itself upload a website.

Provide accurate owner and contact information and respond to the registrar's verification email. Unconfirmed contact details can lead to suspension. For generic TLD registration information, RDAP became the definitive public lookup route in January 2025, replacing the older WHOIS service requirements. Public lookup commonly hides personal details; the registrar still needs accurate records.

Keep control with the owner

The project or business owner should control the registrant account, even when a designer builds the site. Enable two-factor authentication and keep recovery details current. To change registrars, follow the transfer process, including a transfer code and unlocking the domain when eligible.

Record the expiry date, enable renewal and keep the payment method valid. An expired registration can interrupt the website and domain email; after applicable grace and deletion periods, another person may register the name. Hosting backups cannot preserve a domain registration you let lapse.

Key Takeaways

  • A domain, hosting service and page path perform different jobs.
  • Choose an eligible TLD and compare renewal costs as well as introductory offers.
  • A registrar manages the registration through the TLD registry.
  • Keep registration details accurate and the owner in control of the account.
  • Renew the domain and maintain account recovery and payment details.

6.2 Point the right name at the right host

The Domain Name System, or DNS, stores records for names. A resolver looks up those records, often keeping a cached answer. The authoritative nameservers are the servers responsible for the domain's DNS information. Make changes at the provider whose nameservers actually serve the domain.

Choose the record type
TypeRecord's jobExample value
AName to IPv4 address192.0.2.44
AAAAName to IPv6 address2001:db8::44
CNAMEName to another host nameriverside-bikes.pages.example
TXTText, often verificationA service's verification token
MXEmail receiving serverA mail server name
NSNameserverA DNS server name

The IP addresses and .example name here are documentation values. For a real connection, use the values supplied by your host for your site.

The apex is the registered root name, such as example.com. Standard DNS does not permit a CNAME there because the apex also needs other records, including NS. Use the host's A and AAAA values, or a provider-supported ALIAS, ANAME or CNAME-flattening feature. A subdomain such as www commonly uses a CNAME.

Connect two forms of an address

Suppose a host asks for an apex A record and a www CNAME. A provider that uses @ for the apex might show:

Type    Name    Value                           TTL
A       @       192.0.2.44                       3600
CNAME   www     riverside-bikes.pages.example    3600

Enter the custom domain in the hosting settings too. The host must recognize the requested name and assign it to the site. Choose the main address and configure the other form to redirect to it.

Read the provider's name-field instructions. If it automatically adds example.com, typing www.example.com may create www.example.com.example.com. Remove obsolete address records when replacing a host; leaving both old and new values can send visitors to different servers.

Allow cached answers to expire

TTL, time to live, states how many seconds a DNS answer may be cached. A TTL of 3,600 is one hour; 86,400 is 24 hours. After an update, different visitors can temporarily receive different answers. Changes may take 24 hours or longer to be seen everywhere.

For a planned move, lower the TTL to 300 seconds at least one old TTL period before switching. Lowering it at the moment of the switch cannot shorten the lifetime of an answer already cached under the old TTL.

Move DNS without losing other services

You can leave DNS with the registrar and edit records, or change nameservers to a new provider. A nameserver change does not copy records. Recreate and check the required MX, TXT and other records at the new provider before switching, especially when domain email already works.

Check answers with nslookup www.example.com, dig example.com A +short or a DNS lookup service, and compare them with the host's settings. Add wildcard records only deliberately and where the host supports them. When removing a hosted site, remove DNS records pointing to it too; a forgotten alias may allow another person to claim the abandoned host target.

Key Takeaways

  • Edit records at the authoritative DNS provider.
  • A and AAAA point to IP addresses; CNAME points to another name.
  • The apex needs A/AAAA records or a supported alias-style feature, not a standard CNAME.
  • TTL controls cached answers; lower it ahead of a planned move.
  • Recreate all required records before changing nameservers.
  • Configure the custom domain at the host and remove obsolete DNS targets.

6.3 HTTPS for the names visitors use

HTTPS sends HTTP over an encrypted TLS connection. It protects the privacy and integrity of data in transit and lets the browser authenticate the server for the requested domain. Plain HTTP exposes data to people who can observe the connection.

A certificate identifies the domain

A TLS certificate binds a domain name to a public key and is signed by a trusted certificate authority, or CA. It lists the names it covers and its expiry. If visitors use both example.com and www.example.com, the certificate coverage must include both names, even when one redirects to the other: the browser connects securely before receiving that redirect.

An HTTPS connection is not a judgment about the honesty of a business. A fraudulent site can obtain a certificate for a name it controls. The connection's protection and the site's trustworthiness are separate questions.

Let the host issue and renew it

Many static hosts automatically request a free certificate, often from Let's Encrypt, once DNS points to the host and the domain is configured. The CA checks control of the name, for example through a DNS record or a file fetched over the web. Issuance can take minutes to about a day.

As of October 2026, newly issued publicly trusted TLS server certificates have a maximum lifetime of 200 days under the rules effective March 15, 2026. The maximum becomes 100 days in March 2027 and 47 days in March 2029. Let's Encrypt's default classic certificates currently last 90 days, with shorter profiles also available. Automatic renewal avoids having to repeat this work manually.

For a 90-day example, a certificate issued on March 1, 2026 expires on May 30. Renewal with 30 days remaining would occur around April 30. The actual expiry and renewal status are available through the host or certificate details; do not assume a working domain registration also means the certificate is current.

Redirect to HTTPS and fix insecure assets

Turn on the host's HTTPS enforcement. It redirects http:// requests to the HTTPS address, commonly with status 301 or 308. Also choose one main host name, with or without www, and redirect the other to it.

Mixed content occurs when an HTTPS page requests a resource through http://. Browsers block insecure scripts, style sheets, frames and fonts. They try to upgrade some media requests to HTTPS, which fails if the source cannot serve it. Check Console messages and search the code for http://. Use relative paths for your own files and working HTTPS URLs for external resources.

HSTS, HTTP Strict Transport Security, tells browsers to use HTTPS for a set period. Enable it when HTTPS works reliably; browsers that have received the policy will not fall back to plain HTTP during that period. The .dev and .app endings are preloaded for HTTPS-only behavior.

If a certificate warning appears after connecting a domain, check DNS, issuance status and name coverage. The bare domain can work while www fails when only the bare name is covered. Correct the configuration and wait for issuance where needed; visitors should not bypass a certificate warning.

Key Takeaways

  • HTTPS protects data in transit and authenticates the connection for the requested domain.
  • Certificate coverage must include each HTTPS name visitors use.
  • Keep automatic certificate renewal working; registration renewal is a separate task.
  • Enforce HTTPS and replace insecure resource URLs to fix mixed content.
  • Enable HSTS only after HTTPS works reliably.
  • An encrypted connection does not establish that a site is honest.

6.4 A maintenance routine that catches failures

A live site changes even when its files do not. External links move, contact details become outdated, domains approach expiry and third-party widgets change. Maintenance keeps the content correct and the delivery reliable.

Follow the same route for every update

Edit the local project or repository, test in a browser, validate the affected code, deploy, and verify the live pages. Make a preview when the host supports one. Check a successful correction in the copy used for future releases so it cannot be lost in the next upload.

A content change deserves a content check too. Confirm dates, opening hours, prices and contact details against their current source. Give pages an owner or review date. Remove or replace information that no longer describes the service; an old event notice can mislead visitors even when every tag is valid.

Check links and visitor tasks

Link rot is the gradual failure of links as target pages move or disappear. Use a link checker such as the W3C Link Checker, then verify and repair the reported failures. When your own page moved, a redirect preserves old inbound links. For an external page, update the target or remove the link when no useful replacement exists.

Try real visitor tasks. Send a contact-form test and confirm it arrives. Follow navigation with a keyboard. Test a phone layout. An uptime check that receives a page cannot establish that a form or navigation works.

Keep recoverable copies

Back up the source and required assets in at least two places, such as a computer plus an external drive, cloud storage or repository. A hosting account problem or mistaken deployment can remove the live copy, so the live host is not your only backup. Version history can make earlier versions recoverable. Keep enough information to reconnect the domain and republish the site.

Protect renewals and account access

Enable domain auto-renewal and keep the payment method valid. Check the expiry date and confirmation messages. Make sure registrar and host accounts use two-factor authentication and current recovery details. Certificate renewal also depends on a working domain configuration, so check HTTPS after DNS changes.

An uptime monitor checks the site repeatedly and alerts you when it stops responding. Webmaster tools can reveal crawl failures and 404s from old addresses. Review those reports, then test the underlying problem rather than assuming every alert has the same cause.

Schedule work by the kind of change
WhenUseful checks
After each changeValidate, deploy, verify changed pages and resources live
MonthlyCheck links, send a form test, review errors and run a quick speed test
YearlyConfirm renewal and payment details; review every page, dependency and plan limit

Third-party fonts, scripts, maps and other embeds may slow down, change or disappear independently of your site. Keep them few and review whether they are still needed. Where a license permits, hosting a local copy of an asset can reduce dependence on another server. Recheck its license and update needs when replacing it.

Key Takeaways

  • Use a repeatable edit, test, validate, deploy and live-check routine.
  • Review facts and visitor tasks as well as code and links.
  • Keep recoverable source and assets in at least two places.
  • Maintain domain renewal, certificate renewal and account recovery separately.
  • Use monitoring and webmaster reports to find faults, then investigate their cause.
  • Review third-party dependencies and plan limits as the site changes.

Publishing a Website examples

6 Walkthroughs

1

Prepare a workshop site for upload

12 steps
Organize a small workshop site, trace its links and repair validation errors before publishing.
  1. 1
    IntroductionMake the folder portable

    Willow Workshop has a home page, an events page and a logo. The site looks right on its author's computer, but that is only a local result. The host needs a complete public folder, and every resource path must still work after that folder moves, so each path is written from the page that uses it.

    You will prepare its layout, trace links from a nested page and repair markup that a browser might hide, errors you find when you validate the code.

  2. 2
    ExampleChoose the public folder

    Use one folder named willow-site/, with index.html directly inside it. Add events/next.html, css/main.css and images/mark.svg.

    Keep the camera originals and planning notes in a separate folder outside it. The public folder should contain the files visitors need; an unlinked file is still downloadable if someone knows its address.

  3. 3
    ChallengeFind the upload risk

    The author adds an unlinked contact list to willow-site/ for convenience. Does leaving it out of the navigation keep it private?

    ---reveal---

    No. A visitor can request the file directly if its address is known or guessed. Remove the private list from the folder before publishing; a missing navigation link does not control access to a file.

  4. 4
    ExplanationStart from the referring page

    The home page and the nested events page begin in different folders. In index.html, images/mark.svg reaches the logo. From events/next.html, the same text would look inside events/images/.

    Trace the route as folder moves: ../ first leaves events/, then images/mark.svg enters the correct folder. The complete path is ../images/mark.svg.

  5. 5
    ExampleWrite the nested page links

    Inside events/next.html, write:

    <a href="../index.html">Home</a>
    <link rel="stylesheet" href="../css/main.css">
    

    Both requests go up one level to the site root. A link to another page inside events/, such as later.html, needs only that file name. Always use forward slashes and match the uploaded names exactly, including letter case.

  6. 6
    Key InsightCSS has its own starting folder

    The style sheet css/main.css needs images/paper.svg as a background. Its URL starts from css/, even when the stylesheet is loaded by the nested events page.

    body { background-image: url("../images/paper.svg"); }
    

    Go up from css/ and down into images/. Changing the HTML page's depth does not change this external stylesheet's starting location.

  7. 7
    ChallengeKeep a project subfolder in the route

    The site is now previewed at https://pages.example/willow-site/. Its home page links to /css/main.css. Where does that request go, and what relative path reaches the intended stylesheet?

    ---reveal---

    It requests https://pages.example/css/main.css, skipping /willow-site/. Use css/main.css from the home page. The leading slash starts at the domain root, not at the project's folder.

  8. 8
    ExplanationCheck what the browser repairs

    Run the HTML through the W3C Nu Html Checker and CSS through the W3C CSS Validation Service. The page's appearance cannot reveal every error: browsers recover from malformed HTML and skip invalid CSS.

    Start with the earliest error message, using its line and column. Fix it and check again before editing later messages that may be consequences of the first mistake.

  9. 9
    ExampleRepair the element nesting

    The events page contains this fragment:

    <p>Bring <strong>gloves</p></strong>
    

    strong begins inside the paragraph, so close it before closing the paragraph:

    <p>Bring <strong>gloves</strong></p>
    

    Save the correction and rerun the checker. Inspect the surrounding messages again; one structural fix can remove several later complaints.

  10. 10
    ChallengeRepair a skipped CSS value

    The checker flags margin: 16 px;, and the intended spacing is missing. What should the declaration be, and why?

    ---reveal---

    Write margin: 16px;. The number and unit must stay together as one length. The spaced value is invalid and can be ignored by the browser, so adding a second layout rule would leave the original cause in place.

  11. 11
    ChallengeTrace a live failure

    The local logo works. On the live events page, Network requests /willow-site/events/images/Mark.svg, but the uploaded file is /willow-site/images/mark.svg. What two path corrections are needed?

    ---reveal---

    Use ../images/mark.svg: leave the events folder and match the lowercase file name. Then redeploy and inspect the live request. Both the starting folder and the case must be correct.

  12. 12
    RecapFinish with checks that see different faults

    Prepare the release folder, then test it through a local HTTP server so folder routes behave realistically. Validate the code and follow the actual page links. After upload, repeat the relevant checks at the live address and confirm the latest content.

    If a resource fails, compare its requested URL with its uploaded location before changing unrelated layout code.

2

Find why a page looks wrong

13 steps
Use the browser's structure, style and request evidence to isolate faults and save a lasting fix.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionTurn a symptom into a test
  2. 2
    TipInspect the affected link
  3. 3
    ExampleRead the competing rules
  4. 4
    ChallengeMake the fix survive reload
  5. 5
    ExampleExplain a box wider than expected
  6. 6
    ExplanationRecord the resource requests
  7. 7
    ExampleAn HTML response at a CSS address
  8. 8
    ChallengeSeparate a stale view from a failed upload
  9. 9
    ExplanationNarrow the overflow cause
  10. 10
    ChallengeChoose a test you can interpret
  11. 11
    ConnectionUse devices and engines for different checks
  12. 12
    ChallengeCombine the evidence
  13. 13
    RecapVerify the saved correction
3

Improve a gallery page step by step

15 steps
Reduce image costs, reserve layout space and compare performance evidence without chasing a score.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionFollow the largest delay
  2. 2
    ExplanationChoose the representation
  3. 3
    ExampleCalculate the useful export size
  4. 4
    TipCompare exports from the original
  5. 5
    ChallengeWhy the download did not shrink
  6. 6
    ExampleReserve the gallery image space
  7. 7
    ExplanationDescribe the slot honestly
  8. 8
    ConnectionFormats and widths solve different choices
  9. 9
    ChallengeChoose what may wait
  10. 10
    ExampleAdd the actual page bytes
  11. 11
    ExplanationMatch a symptom to a measure
  12. 12
    Key InsightA lab run is one kind of evidence
  13. 13
    TipAddress the next largest cost
  14. 14
    ChallengeChoose a complete next check
  15. 15
    RecapCompare the experience, then keep the improvement
4

Help the right pages appear in search

11 steps
Describe individual pages clearly and choose crawling, indexing and duplicate-address controls for their actual jobs.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionSeparate understanding from discovery
  2. 2
    ExampleName the individual page
  3. 3
    ExplanationGive the outline a structure
  4. 4
    ChallengeRepair the copied template
  5. 5
    TipSet metadata for its real users
  6. 6
    ExplanationCreate a discoverable route
  7. 7
    ExampleKeep a public page out of results
  8. 8
    ChallengeExplain a blocked URL still showing
  9. 9
    Key InsightOne preferred route for a duplicate
  10. 10
    ChallengeCheck a launch with no search visits
  11. 11
    RecapCheck the intended page states
5

Publish a site you can update

10 steps
Choose a suitable static-hosting workflow, verify the release folder and recover cleanly from later changes.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionMove from local files to a live address
  2. 2
    ExplanationMatch the plan to the actual use
  3. 3
    ChallengeLook beyond file size
  4. 4
    ExampleSelect the release folder
  5. 5
    ExampleRelease and verify the same version
  6. 6
    ConnectionUse a repository as the publishing source
  7. 7
    ChallengeRecover the next release too
  8. 8
    TipPreserve a moved address
  9. 9
    ChallengeCatch two different launch faults
  10. 10
    RecapKeep the release source complete
6

Connect a custom domain and maintain it

18 steps
Follow registration, DNS, HTTPS and recurring checks through a complete custom-domain setup.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionFollow the name through the services
  2. 2
    ExplanationRegister with lasting control
  3. 3
    ChallengeSeparate the name from the host
  4. 4
    ExplanationEdit where the answers come from
  5. 5
    ExampleAdd the requested address records
  6. 6
    Key InsightKeep record jobs distinct
  7. 7
    ChallengeMove DNS without losing email
  8. 8
    ExplanationPlan around cached answers
  9. 9
    ExplanationLet domain control unlock a certificate
  10. 10
    ExampleA redirect still needs TLS first
  11. 11
    ChallengeFix the insecure stylesheet
  12. 12
    TipKeep enforcement and renewal working
  13. 13
    ExplanationProtect the source beyond the host
  14. 14
    ChallengeTest what an uptime check misses
  15. 15
    ConnectionSchedule checks by their triggers
  16. 16
    ChallengeClose an abandoned route
  17. 17
    ChallengeInvestigate a partial domain launch
  18. 18
    RecapKeep a record you can use during an outage

Publishing a Website practice questions

50 Practice Questions in 5 sets

Set 1: Diagnose requests and connect services10 Practice Questions

Question 1 of 10

A page downloads 20 KB of HTML, 40 KB of CSS, 80 KB of fonts and 1,860 KB of images. An image change saves 70% of image bytes; CSS minification saves 25% of CSS bytes. How much more data does the image change save?
  1. 1,302 KB
  2. 490 KB
  3. 1,390 KB
  4. 1,292 KB
Show answerHide answer
Answer: D
The image saving is 1,860 × 0.70 = 1,302 KB, while the CSS saving is 40 × 0.25 = 10 KB. Their difference is 1,292 KB. Reporting 1,302 KB gives the image saving alone and misses the comparison with the CSS change.

Question 2 of 10

What does crawling a web page mean?
  1. Guaranteeing the page a high search position.
  2. Encrypting the page for secure connections.
  3. Fetching the page, often by following a link.
  4. Reserving the page's registered domain name.
Show answerHide answer
Answer: C
Crawling means fetching a page so a search service can inspect it; links are a common discovery route. Indexing and ranking are later, different processes. A fetched page is not guaranteed a high position or even inclusion in the search index.

Question 3 of 10

A photo is shown at most 700 CSS pixels wide. You want a version for screens with two device pixels per CSS pixel. What export width supplies that density?
  1. 1,400 pixels
  2. 700 pixels
  3. 350 pixels
  4. 2,800 pixels
Show answerHide answer
Answer: A
Two device pixels per CSS pixel call for about twice the displayed width, so 700 × 2 = 1,400 image pixels. A 700px export suits standard density at that display width. Sending 2,800px adds more pixels than this stated 2× use needs.

Question 4 of 10

A folder contains home.html, css/ and images/. Its host expects the usual default home file. What should the home page be named?
  1. root.html
  2. default.css
  3. site.html
  4. index.html
Show answerHide answer
Answer: D
Most static hosts look for index.html when the address ends in a folder or slash. Naming the page home.html does not make it that default file. Keep the default home page directly in the selected publish directory so the bare site address can open it.

Question 5 of 10

A box uses content-box, width: 240px, padding: 12px and border: 3px solid. What is its border-box width, excluding margins?
  1. 255px
  2. 270px
  3. 240px
  4. 264px
Show answerHide answer
Answer: B
With content-box, the stated width covers only content. Add both side paddings and both side borders: 240 + 24 + 6 = 270px. The 255px result adds only one side of each, although the box has left and right padding and borders.

Question 6 of 10

A navigation layout fails in one browser. You change its width, padding and display value together, and the problem disappears. What is the most useful next step?
  1. Save every change because a passing view identifies the cause.
  2. Remove the failing browser from the site's test checklist.
  3. Retest the changes separately to identify the needed fix.
  4. Change the same three values on every other component.
Show answerHide answer
Answer: C
Testing the changes separately shows which one explains the failure and whether the others are unnecessary or harmful. A page looking right after three changes does not identify the cause. Keep the failing browser and viewport available to check the smallest verified correction.

Question 7 of 10

A site's home page appears at /public-site/index.html, but the bare host address gives an error. The uploaded parent folder contains public-site/, which contains index.html. What should change?
  1. Rename the parent folder to index.html.
  2. Select public-site/ as the publish directory.
  3. Add a meta description to the nested home page.
  4. Set the CSS path to /public-site/index.html.
Show answerHide answer
Answer: B
The publish directory becomes the web root, so it should contain index.html directly. Publishing the parent added an unwanted path level. Renaming the containing folder cannot turn it into the home HTML file or change which directory the host serves.

Question 8 of 10

A domain already receives email. Its owner will move authoritative DNS to the website host. The new DNS account currently holds only the web A record. What preparation avoids an email outage?
  1. Recreate and verify the required mail records before switching NS.
  2. Switch NS first and wait for the mail records to copy themselves.
  3. Replace the website A record with the existing mail server address.
  4. Add a www CNAME and keep the old mail records only at the registrar.
Show answerHide answer
Answer: A
After the nameserver change, resolvers ask the new authoritative provider. Needed mail records must already exist there; changing NS does not copy them. Keeping MX records only in the old, no-longer-authoritative account will not keep them available to new lookups.

Question 9 of 10

HTTPS works at example.com, but www.example.com gives a certificate-name warning before its redirect runs. Both names point to the intended host. What needs correction?
  1. A certificate for the bare domain only.
  2. Certificate coverage for the www name.
  3. A longer TTL for the working DNS records.
  4. A new redirect after the existing TLS failure.
Show answerHide answer
Answer: B
The browser must establish TLS for www.example.com before it can receive that name's redirect. The certificate therefore needs to cover www as well as the destination name. A redirect cannot repair missing name coverage after the secure connection has already failed.

Question 10 of 10

A monitor reports that the home page responds normally, but visitors say the contact form sends nothing. What is the best next check?
  1. Treat the successful home-page response as proof the form works.
  2. Renew the domain immediately without checking its expiry.
  3. Submit a form test and confirm receipt at its destination.
  4. Rename the home page so the monitor starts a new request.
Show answerHide answer
Answer: C
An uptime response checks reachability, not whether a form submission reaches its receiving service. Send a test and verify its arrival to examine the failing visitor task. Repeating the home-page request can keep passing while the form's endpoint or handling remains broken.
Set 2: Files, pages and first launch checks10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A page is stored at news/update.html. The logo is at images/mark.svg in the site root. What relative image path reaches it?
  1. images/mark.svg
  2. ../images/mark.svg
  3. ../../images/mark.svg
  4. news/images/mark.svg
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A site is published at https://pages.example/garden/. Its root page requests /css/main.css, but the style sheet is at https://pages.example/garden/css/main.css. What edit fixes the root page link?
  1. Use /garden/main.css.
  2. Use ../css/main.css.
  3. Use /css/main.css/.
  4. Use css/main.css.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

An HTML checker reports an unclosed attribute quote near the top, followed by many unexpected-attribute errors. What should you fix first?
  1. The unclosed quote, then validate again.
  2. All later attributes, then the quote.
  3. Only messages affecting visible layout.
  4. The CSS rules applied to those elements.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

Two ordinary CSS rules apply to a link inside id="content": #content a { color: green; } and, later, .action { color: white; }. What explains its green text?
  1. The green rule wins because it appears earlier in the file.
  2. A link element cannot take a color from a class selector.
  3. The id selector gives the green rule greater specificity.
  4. The white rule needs the link to have an action attribute.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A live page loads, but its photo request returns status 404. What should you inspect first?
  1. The photo's displayed width and CSS border.
  2. The HTML page's title and meta description.
  3. The requested image path and uploaded file name.
  4. The browser's saved DNS record lifetime.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A small line-art logo must stay sharp at many sizes. Which image format is the best fit?
  1. SVG
  2. JPEG
  3. GIF
  4. AVIF
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

An image has width="1200" height="800" and scales proportionally to a 450px-wide column. How much height should the browser reserve?
  1. 200px
  2. 450px
  3. 675px
  4. 300px
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

An independent page lists pottery class times on a site named Clay Studio. What is an informative page title?
  1. Home – Welcome to Our Website
  2. Class Times – Clay Studio
  3. Clay Studio – Clay Studio
  4. Classes, Classes, Clay, Classes
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A paid-work portfolio fits a free host's storage allowance. What else must its owner confirm before choosing that plan?
  1. The plan permits its commercial use and expected traffic.
  2. The plan generates every page from a database at request time.
  3. The plan makes every uploaded file inaccessible without a link.
  4. The plan keeps serving only while the owner's laptop is awake.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A club will keep its existing host but take domain control back from its designer. The designer proposes a registrar transfer and warns that the site files must move too. The club also notices an introductory renewal offer. What plan preserves continuity and lasting control?
  1. Move the site files to the new registrar, leaving renewal with the designer.
  2. Keep the registrar account with the designer, changing only the hosting login.
  3. Transfer registration, replace working DNS with defaults, and keep the discount receipt.
  4. Transfer registration to club control, preserve working DNS, and check renewal terms.
Show answerHide answer

Save this lesson to see this answer.

Set 3: Read the evidence before changing the site10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A public folder contains a useful homepage, optimized photos and an unlinked spreadsheet with customer addresses. What must happen before deployment?
  1. Keep the spreadsheet and hide its name with CSS.
  2. Keep the spreadsheet and remove its navigation link.
  3. Remove the spreadsheet from the publish folder.
  4. Rename the spreadsheet and add it to robots.txt.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A CSS declaration reads padding: 18 px;. What is the correct syntax?
  1. padding: 18px;
  2. padding: px18;
  3. padding = 18px;
  4. padding: "18px";
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A style-sheet request returns 200. Its response body is the host's HTML fallback page and its Content-Type is text/html. The page is unstyled. What should you fix first?
  1. The stylesheet's selector specificity so its rules beat the fallback.
  2. The page's cache headers so the HTML response stays fresh longer.
  3. The response header alone so the same HTML is labeled text/css.
  4. The URL or host routing that returns HTML for the CSS request.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A site passes layout checks in desktop Chrome and Edge. What additional browser check most directly broadens rendering-engine coverage?
  1. Test a new Chrome profile.
  2. Test the pages in Firefox.
  3. Test a private Edge window.
  4. Test Chrome with no history.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A first-screen hero occupies 600 CSS pixels on a 2× screen. It offers 600w and 1200w files but declares a 1200px slot and uses lazy loading. Distant thumbnails load eagerly. Which loading plan fits the layout and visible priorities?
  1. Keep the hero lazy, declare its 600px slot, and lazy-load distant thumbnails.
  2. Load the hero eagerly, declare its 600px slot, and lazy-load distant thumbnails.
  3. Load the hero eagerly, retain its 1200px slot, and lazy-load distant thumbnails.
  4. Load the hero eagerly, declare its 600px slot, and load all thumbnails eagerly.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A template uses <h3> for every heading because its default size looks right. What change gives the content a clearer structure?
  1. Keep all h3 elements and shorten the title in the head.
  2. Replace headings with bold paragraphs at matching sizes.
  3. Use h1 for every heading and keep the default styling.
  4. Choose heading levels by section depth and set sizes in CSS.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A public page has a noindex meta tag and is blocked in robots.txt. A search service still shows its linked URL. What change lets the crawler process the intended exclusion?
  1. Allow crawling while keeping the noindex tag.
  2. Keep the crawl block and remove the noindex tag.
  3. Keep both controls and list the URL in a sitemap.
  4. Replace noindex with a canonical link to the same URL.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A static HTML form needs to email submissions to its owner. What additional capability is required?
  1. A different file name for the form page.
  2. A canonical URL pointing to the form page.
  3. A receiving form service or host-provided handler.
  4. A larger image-storage allowance at the host.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A host asks for www to point to studio.pages.example. What standard DNS record represents that name-to-name relationship?
  1. An A record for www.
  2. An AAAA record for www.
  3. A CNAME record for www.
  4. An MX record for www.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

An HTTPS page loads its own logo with an HTTP absolute URL and an external script through HTTP. Both resources have working HTTPS versions. What edit fixes the insecure requests and keeps the local logo portable?
  1. Use an HTTP logo URL and an HTTPS script URL.
  2. Use a relative logo path and an HTTPS script URL.
  3. Use an HTTPS logo URL and keep the HTTP script URL.
  4. Redirect the document and keep both resource URLs.
Show answerHide answer

Save this lesson to see this answer.

Set 4: Plan updates without breaking working services10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A site lives under /field-notes/. Its css/main.css requests url("images/paper.svg"), but the image is at /field-notes/images/paper.svg. The same CSS is used by root and nested pages. What URL should the CSS use?
  1. /images/paper.svg
  2. ../images/paper.svg
  3. ../../images/paper.svg
  4. images/paper.svg
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A DevTools color edit makes a button readable, but reloading restores the old color. What should you do?
  1. Change only the browser's cached color value.
  2. Save only the HTML element's inline preview state.
  3. Edit a different local stylesheet with the same name.
  4. Apply the verified edit in the loaded source stylesheet.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

After an update, one browser still shows the old footer. A fresh cache-disabled request returns the new footer. What is the likely explanation?
  1. The browser had reused a cached page.
  2. The host had deleted the new footer.
  3. The domain had stopped resolving anywhere.
  4. The footer upload had failed validation.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A 3,000 × 2,000 photo is displayed at most 600 CSS pixels wide. A 2× export is planned at the same proportions. What fraction of the original pixel count will it contain?
  1. 40%
  2. 20%
  3. 16%
  4. 8%
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

What does a high Cumulative Layout Shift value describe?
  1. A long delay before the first DNS lookup completes.
  2. A large total number of files in the site's backup.
  3. Visible content moving unexpectedly during the page's lifetime.
  4. A slow response from the domain registration service.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A page sets lang="en" and shows its prices only inside a photo. What change makes those prices available as ordinary page text?
  1. Write the prices in HTML text on the page.
  2. Repeat lang="en" on the surrounding division.
  3. Put the price list only in the image file name.
  4. Increase the resolution of the price-list photo.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A broken release is rolled back successfully. The local project still contains the bug. A teammate also corrected a contact number directly in the host's editor. What should happen before the next deployment?
  1. Redeploy the local project because rollback corrected its files.
  2. Keep the bug locally and copy only the current live HTML title.
  3. Upload the local project and reapply the contact fix afterward.
  4. Fix the bug and copy the contact correction into the project.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A project owner can register an eligible domain through one company and host the website through another. What connects the domain to that hosting service?
  1. A transfer of the website files to the registrar.
  2. DNS records pointing the name to the host.
  3. A matching password on both service accounts.
  4. A repeated title element on every HTML page.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A site moved from host X to Y. The old A value remains beside the new value, and some visitors reach X. Both have TTL 86400; it was lowered to 300 only at the move. What correction and timing explain the result?
  1. Remove the new A value; 300 seconds immediately replaces every cached lifetime.
  2. Remove the old A value; cached answers can still last under the earlier TTL.
  3. Keep both A values; their equal TTL makes resolvers choose the newer value.
  4. Keep both A values; lowering TTL later makes every resolver prefer host Y.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A site has a local folder and one live hosting copy. A proposed backup contains only exported page screenshots. The owner wants to recover after losing the hosting account. What backup plan is sufficient for republishing?
  1. Keep screenshots elsewhere and rely on the host for missing assets.
  2. Keep only DNS screenshots and renew the hosting plan early.
  3. Keep the current live URL in a separate password manager note.
  4. Keep source and assets in another recoverable storage location.
Show answerHide answer

Save this lesson to see this answer.

Set 5: Resolve launch and maintenance cases10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A published file named opening-times.html is renamed to visit.html. The page content stays available, but old bookmarks fail. What preserves those old visits?
  1. A permanent redirect from the old URL to the new one.
  2. A navigation link using only the new URL everywhere.
  3. A custom 404 page displaying a link to the home page.
  4. A canonical link on the new page naming its new URL.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A page passes HTML validation, yet keyboard users cannot reach a control. What does the validation result establish?
  1. All visitor tasks work because the HTML is valid.
  2. Keyboard access follows from correct visual layout.
  3. The checked markup passed the checker; usability still needs testing.
  4. Browser repair guarantees accessible control behavior.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

At a 360px viewport, a card with width: 100%; box-sizing: content-box; padding: 20px; border: 2px solid; causes sideways scrolling. The stylesheet loads correctly. What change and verification address the cause while retaining the padding?
  1. Use overflow-x: hidden on the body; check only the wide-screen result.
  2. Use border-box on the card; save the rule and retest narrow and wide views.
  3. Use height: auto on the card; save the rule and retest the same viewport.
  4. Use border-box in DevTools only; publish the unchanged source stylesheet.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A card photo occupies half of a 600 CSS pixel viewport on a 2× screen. It offers 300w, 600w and 1200w files, but sizes says 100vw. Its caption jumps when it loads and the img has no dimensions. What markup plan matches this layout?
  1. Keep a 600px slot, target 1200 image pixels, and add correct dimensions.
  2. Declare a 300px slot, target 300 image pixels, and add correct dimensions.
  3. Declare a 300px slot, target 600 image pixels, and omit the dimensions.
  4. Declare a 300px slot, target 600 image pixels, and add correct dimensions.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

At the 75th percentile, real-visit data shows LCP 2.4 s, INP 230 ms and CLS 0.08. A separate Lighthouse run earns a high score. What conclusion about Core Web Vitals follows as of October 2026?
  1. Field LCP needs improvement; the high lab score overrides the interaction result.
  2. Field CLS needs improvement; the high lab score does not replace field results.
  3. Field INP needs improvement; the high lab score does not replace field results.
  4. All three field vitals are good; the high lab score confirms their thresholds.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A site serves identical pages at /guide/ and /guide/index.html. It links internally to the second, lists the first in its sitemap, and has no canonical or redirect. What plan gives visitors and crawlers one consistent preferred route?
  1. Choose /guide/, redirect the duplicate and align links and sitemap.
  2. Choose /guide/, block its crawling and keep linking to the duplicate.
  3. Choose both URLs, add each to the sitemap and leave canonicals absent.
  4. Choose /guide/, add noindex there and retain both navigation routes.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Why can visitors open a hosted static site while its author's computer is switched off?
  1. The author's browser sends files while closed.
  2. The domain registration stores every page file.
  3. The visitors' DNS servers generate its HTML.
  4. The hosting server delivers its uploaded files.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A repository-connected host reports a successful deployment. The public site shows yesterday's content even with cache disabled. The selected publish folder is /docs, but the edited files are in the repository root. What should be corrected?
  1. Keep /docs selected and edit only the public browser view.
  2. Align the selected publishing source with the intended edited files.
  3. Keep root edits and redeploy the unchanged /docs source again.
  4. Roll back the host and keep editing outside the selected source.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A host serves a valid HTTPS page, but its style sheet is blocked as mixed content. The owner proposes enabling HSTS without changing the stylesheet URL. What is the direct repair?
  1. Keep the HTTP URL and lengthen the HSTS duration on the page.
  2. Disable HTTPS enforcement while retaining the HTTP stylesheet.
  3. Renew the valid certificate without changing the stylesheet request.
  4. Use a working HTTPS stylesheet URL or a relative local path.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

After removing a site from a hosting service, its old domain CNAME still points to the abandoned target. What maintenance step is needed?
  1. Keep the CNAME as a backup of the deleted website.
  2. Add noindex to a local copy that is no longer deployed.
  3. Remove or replace the DNS record pointing to that target.
  4. Wait for domain expiry to remove the hosting connection.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

103 Key Terms, each with its definition

A

A record
An A record maps a DNS name to an IPv4 address, such as the documentation address 192.0.2.44 used in a hosting example.
The host asks for an apex A record using the actual IPv4 address supplied in its domain settings.
AAAA record
An AAAA record maps a DNS name to an IPv6 address, allowing clients to find a service through an IPv6 network address.
The owner adds an AAAA value only when the host supplies the IPv6 address for the site.
Absolute URL
An absolute URL gives a complete resource address, including its scheme and host name, without depending on the referring file's folder.
The preview image uses https://www.example.com/images/share.jpg so its host and location are explicit.
Apex domain
The apex domain is the registered root name, such as example.com without www, where standard DNS does not permit a CNAME with required records.
The provider uses its supported alias-style feature at the apex and a CNAME for the www subdomain.
Aspect ratio
An aspect ratio compares an image's width and height, letting the browser reserve proportional space when dimensions are known.
An image with a 3:2 ratio reserves 200px of height when its responsive column is 300px wide.
Asset
An asset is a supporting website file, such as an image, font or style sheet, that a page loads to display its content or behavior.
A copied page loses its logo when the logo asset is left outside the folder uploaded to the host.

B

Backup
A backup is a recoverable additional copy of source files and assets, kept separately so a lost or damaged working copy can be restored.
The project is stored locally and in a second independent location before a new release.
Box model
The box model describes an element's content, padding, border and margin, separating the regions that contribute to its layout size.
Highlighting a content-box card shows why its padding and borders make it wider than its content width.
Browser cache
A browser cache stores received resources for reuse, reducing later transfers but sometimes keeping an older version visible after an update.
After a site's new footer is deployed, disabling the browser cache during a reload makes that footer visible.

C

Canonical URL
A canonical URL is the preferred address for duplicate content, communicated through signals such as a canonical link and redirects.
When two directory forms of an address show the same article, its canonical link names the shorter one, /guide/.
Case sensitivity
Case sensitivity means uppercase and lowercase letters identify different names, which is the usual rule for paths on web servers.
A request for Photo.jpg fails on a case-sensitive host when the uploaded file is photo.jpg.
Certificate authority
A certificate authority is a trusted issuer that validates control of a domain and signs certificates used to authenticate TLS connections.
The host requests a certificate after domain control can be verified through the site or DNS.
Certificate renewal
Certificate renewal replaces an expiring certificate with a newly issued one so valid HTTPS can continue, often automatically through the host.
A DNS change is checked carefully because it can interfere with the host's later certificate renewal.
CNAME record
A CNAME record makes a DNS name an alias of another host name, often used for a www subdomain pointing at a static host.
The www CNAME uses the host's site name rather than an IPv4 number or a URL path.
Computed value
A computed value is a property value resolved by the browser after applying the relevant CSS rules to an element.
The Computed pane shows the applied width while Styles reveals the declaration that supplied it.
Console
The Console is the developer-tools panel showing browser messages, including script errors, failed resources and mixed-content warnings.
A Console message identifies an insecure stylesheet that was blocked on the site's HTTPS page.
Content delivery network
A content delivery network, or CDN, serves copies from servers in different regions to reduce the distance files travel to visitors.
The static host's CDN serves a regional copy of the gallery instead of every visit reaching one distant server.
Content-Type
Content-Type is the response header describing the supplied data's media type, which a browser checks when applying resources such as CSS.
The CSS URL returns HTML, so its text/html Content-Type helps explain why the browser refuses it.
Crawling
Crawling is the process of discovering and fetching web resources, commonly by following links, before deciding how they may be indexed.
A crawler reaches a new workshop page through a descriptive link from the site's class listing.
Cross-browser testing
Cross-browser testing checks the same pages in different browsers, especially different engines, to find behavior or support differences.
A grid layout is tried in Firefox and Safari after it passes the author's Chrome check.
Cumulative Layout Shift
Cumulative Layout Shift measures unexpected visible content movement over the page's lifetime; a good CLS is at most 0.1.
A late banner pushes the article downward and adds a layout shift after the initial page load.

D

Debugging
Debugging is finding and correcting the cause of a fault by reproducing it, gathering evidence, isolating a cause and testing a change.
To test whether one width rule causes a page's overflow on narrow screens, the author disables that rule.
Default home page
A default home page is the file a server selects when an address requests a folder, commonly the index.html file inside it.
Requesting /news/ opens news/index.html when the host uses that default page convention.
Deployment
A deployment publishes a version of the site files to the hosting service so visitors receive that version at the live address.
After changing a page's opening times, the author waits for the deployment to finish, then confirms them on the live page.
Developer tools
Developer tools are a browser's built-in panels for inspecting page structure, styles, resource requests, errors and runtime behavior.
Inspecting the narrow card in DevTools reveals padding that was not obvious from its stated width.
DNS
DNS, the Domain Name System, stores records that translate names into service information such as IP addresses or aliases.
Changing the web address record points future lookups to the replacement host after cached answers expire.
DOM
The DOM, or Document Object Model, is the browser-built page structure, including any changes made while parsing or repairing the HTML.
The DOM shows a division outside a paragraph even though the source placed that division inside it.
Domain name
A domain name is a human-readable internet name whose DNS records can direct clients to services such as the website's host.
The owner keeps the same domain name while changing which hosting service delivers the site.
Dynamic website
A dynamic website generates responses on the server, often using a database, instead of simply serving the same prepared page files.
A service that creates a personal account page from stored data needs capabilities beyond plain static files.

F

Field data
Field data is performance evidence from actual visits, reflecting the devices and connections used by people who opened the site.
PageSpeed Insights can show field results when the page or origin has enough real Chrome observations.
File extension
A file extension is the ending after a file name's final dot, commonly used by hosting systems to identify the file's format.
The browser needs a CSS response for main.css; renaming an unrelated text file does not make it CSS.
Form handler
A form handler is a receiving service that processes submitted form data, which the form's HTML markup alone cannot store or email.
The author submits a test message and verifies that the configured form handler delivers it.

H

Heading hierarchy
A heading hierarchy expresses the page topic, sections and subsections through ordered heading levels, independently of their visual sizes.
An h3 introduces "Evening sessions" inside the h2 section "Class times", with sizes set in CSS.
Hero image
A hero image is a prominent main image near the top of a page, often important to the first impression and the page's LCP.
The first-screen hero stays in HTML without lazy loading so the browser can discover it early.
HSTS
HSTS, HTTP Strict Transport Security, is a response policy telling browsers to require HTTPS for a covered domain during a set period.
The owner enables HSTS only after confirming that the domain's HTTPS connections work reliably.
HTTP status code
An HTTP status code is a number in a server response describing the request's outcome, such as success, redirection or a missing resource.
The home page returns 200, but the separate logo request returns 404 because its file name is wrong.
HTTPS
HTTPS is HTTP carried over TLS, protecting data in transit and authenticating the server connection for the requested domain.
The host redirects the public HTTP address to HTTPS after the certificate is ready.
HTTPS enforcement
HTTPS enforcement redirects HTTP requests to the secure address, commonly through a permanent 301 or 308 response from the host.
With enforcement enabled, typing the HTTP page address takes the visitor to its HTTPS version.

I

Indexing
Indexing is storing information about fetched pages so a search engine can consider them for results when users search.
Search Console shows that a discovered page has not yet been included in the search index.
Interaction to Next Paint
Interaction to Next Paint measures the delay to a visible response after user interaction; a good INP is at most 200 milliseconds.
A slow response after a tap concerns INP even if the page's largest image appeared quickly.

L

Lab data
Lab data is performance evidence from a controlled test, useful for comparing changes under matching settings instead of measuring all real visits.
The author repeats the Lighthouse mobile test with the same settings before comparing two image exports.
Language attribute
The language attribute, lang, declares the language of an element's content for pronunciation and other language-aware browser features.
The page uses lang="en" so a screen reader can choose an English pronunciation for its content.
Largest Contentful Paint
Largest Contentful Paint measures the time until the largest visible image or text block appears; a good LCP is at most 2.5 seconds.
Removing lazy loading from the first-screen hero addresses one possible source of a slow LCP.
Lazy loading
Lazy loading delays an image request until the image is near the viewport, saving early data for content farther down the page.
Lower gallery rows use lazy loading, while the large image visible on arrival loads eagerly.
Link rot
Link rot is the gradual failure of links when their destination pages move or disappear, affecting external and internal navigation.
An old reference link is replaced after a link checker reports that its target now returns 404.
Local development server
A local development server serves a project over HTTP on your computer, helping folder links behave like links on a hosted site.
Running python3 -m http.server in the site folder makes it possible to test the project through HTTP.
Lossless compression
Lossless compression reduces an image's file size without changing its pixel values, preserving detail such as sharp edges and text.
A screenshot with small labels uses a lossless export to keep the lettering clear.
Lossy compression
Lossy compression reduces file size by discarding some image information, with lower-quality exports eventually showing visible artifacts.
A lower-quality photo export is smaller, but the author rejects it when faces start to look smeared.

M

Maintenance
Maintenance is recurring work that keeps a published site accurate, usable, secure and reachable through updates, checks and renewals.
A monthly review includes a form test, a link check and a quick page-speed comparison.
Meta description
A meta description is a brief page summary supplied in the head that a search engine may use, or replace, when creating a search snippet.
The class page description summarizes times and booking details that are actually on that page.
Metadata
Metadata is extra information stored with an image, such as camera settings, dates and GPS location, beyond the visible pixel content.
The export strips camera metadata before a photo taken at home is uploaded to the public gallery.
Minification
Minification removes unnecessary whitespace and comments from code to reduce its file size without changing its intended behavior.
On a page with a large hero photo, minifying CSS saves some bytes, but resizing that photo saves much more.
Mixed content
Mixed content occurs when an HTTPS page requests a resource over HTTP, risking blocking or a failed attempt to upgrade that resource.
The Console identifies an HTTP stylesheet URL that must be replaced with a working secure address.
MX record
An MX record names a mail server that receives email for a domain, so it must be preserved when authoritative DNS providers change.
Before switching nameservers, the owner recreates the MX record at the new DNS provider.

N

Nameserver
A nameserver answers DNS queries; authoritative nameservers provide the records for a domain at its active DNS provider.
Edits in the old DNS account have no effect after a new provider becomes authoritative.
Network panel
The Network panel records requests while DevTools is open and shows each resource's address, response status, type, size and timing.
When a page's logo is missing, the author reloads with Network open and filters for images to find its request.
Network throttling
Network throttling simulates a slower connection in browser tools so you can examine resource loading under less favorable conditions.
Throttling makes a large gallery's delay clear even though it appeared quickly on the author's Wi-Fi.
noindex
The noindex instruction asks search engines to exclude a page from results, and a page-level tag must be fetched before it can be read.
A public confirmation page with a noindex tag stays crawlable so that tag can be processed.

O

Open Graph
Open Graph is a set of metadata properties describing a page's shared-link preview, including its title, description and image.
A chat app can use the Open Graph image instead of guessing which gallery photo represents the page.

P

Page title
A page title is the HTML title element's text naming a page in tabs and bookmarks and commonly contributing the headline in search results.
The contact page title begins with "Contact" instead of repeating the same home-page title.
Page weight
Page weight is the total size of downloaded page resources, including HTML, CSS, scripts, images and fonts, commonly measured in KB or MB.
A Network review shows that photographs account for most of the page weight before optimization.
Parent directory
A parent directory is the folder containing the current folder; the path segment ../ moves one level upward toward it.
The stylesheet inside css/ reaches the root image folder through ../images/background.svg.
Permanent redirect
A permanent redirect sends a request from an old address to a lasting replacement, preserving visitor routes when pages move.
A 301 redirect carries old bookmarks from /classes.html to the new /learn/ page.
picture element
The picture element groups image sources with a required fallback img, allowing choices such as supported formats while retaining alt text.
In a picture element with AVIF and WebP sources, the browser tries AVIF first, then WebP, and otherwise uses the fallback JPEG image.
Pixel dimensions
Pixel dimensions are an image's width and height measured in stored pixels, affecting its detail, decoded memory use and suitable display size.
The photo is exported at 1,400px wide for a maximum 700 CSS pixel slot on a 2× screen.
Preview deployment
A preview deployment is a separate hosted version used to check proposed changes before those changes replace the public site.
A teammate tests the preview of a new gallery on a phone before the owner releases that gallery.
Publish directory
The publish directory is the folder served as the website root, with index.html directly inside it for a plain HTML site.
Selecting the parent of the folder holding index.html puts the home page one path level deeper than intended.

R

Raster image
A raster image stores a grid of colored pixels, so enlarging it beyond its available detail can make it look blurred or blocky.
A small raster photograph looks soft when it is stretched across a large desktop hero area.
RDAP
RDAP is the Registration Data Access Protocol, the definitive route for generic TLD registration lookups since January 2025.
The owner uses ICANN's RDAP-based lookup to identify a domain's registrar and registration information.
Registrant
A registrant is the person or organization holding the domain registration and responsible for accurate details and continued renewal.
The business is the registrant even though a designer is hired to build and deploy its pages.
Registrar
A registrar handles domain registration for customers through a TLD's registry and provides controls such as renewal and transfer settings.
The owner signs in to the registrar to update payment details before the domain renewal date.
Registry
A registry operates the registration database and infrastructure for a domain ending, working with registrars that serve customers.
The chosen ending's registry sets eligibility rules that the registrar applies during registration.
Relative path
A relative path locates a resource from the referring file's folder, letting the whole site move without changing its domain in every link.
From news/update.html, ../images/icon.svg goes up to the root and then into the images folder.
Rendering engine
A rendering engine is the browser component that interprets page code and draws it, with differences that can affect layout and feature support.
Testing Blink and Gecko gives broader engine coverage than testing desktop Chrome and Edge alone.
Responsive mode
Responsive mode is a browser-tool view that changes the viewport and simulates some device features for checking layouts at different sizes.
Responsive mode reveals a menu overlap at 380px, then a real phone is used to check the actual experience.
robots.txt
A robots.txt file at the domain root gives compliant crawlers fetch instructions for paths; it does not restrict visitor access.
A leftover Disallow: / line asks crawlers to skip the site even though visitors can still open it.
Rollback
A rollback restores an earlier hosted deployment to recover from a broken update, without necessarily correcting the project source.
When an update breaks a site's layout, the host restores yesterday's working version while the author repairs the bug locally.
Root-relative path
A root-relative path begins with / and locates a resource from the domain root, regardless of the current page's folder.
On a site under /club/, /css/main.css requests a different location from /club/css/main.css.

S

Semantic HTML
Semantic HTML uses elements that express content roles, such as navigation, main content, links and buttons, making structure understandable.
Using a real navigation element identifies the menu's role beyond the way it is positioned on the page.
SFTP
SFTP is an encrypted file-transfer protocol used to upload and manage files securely, unlike unencrypted plain FTP transfers.
The shared host supplies SFTP access so the author can upload pages without exposing a plain FTP password.
Site root
The site root is the folder whose contents form the public website, including its home page and every asset needed by its pages.
The host serves the contents of public-site/, so that folder is the site root for this deployment.
Sitemap
A sitemap lists full preferred page URLs to help search engines discover them, optionally with significant modification dates.
The new class page is linked from navigation and added to the sitemap at its preferred HTTPS address.
sizes
The sizes attribute describes an image's displayed slot width under different conditions when srcset uses width descriptors.
A card occupying one narrow column declares that slot instead of claiming the full viewport width.
Source of truth
The source of truth is the authoritative project or repository from which releases are made and in which lasting corrections must be saved.
A contact correction made on the host is copied back to the project before the next upload.
Specificity
Specificity is the weight of a CSS selector used to resolve competing declarations, with id selectors outweighing single-class selectors.
A later .action color loses to #main a in an ordinary rule conflict because its specificity is lower.
srcset
The srcset attribute offers image candidates, with descriptors such as actual pixel widths, from which the browser selects a resource.
The browser can choose between the 640w and 1280w versions offered for the same landscape photo.
Static hosting
Static hosting serves prepared site files without generating their contents for each request, suiting informational HTML-and-CSS websites.
A small public portfolio stays online through static hosting while its author's computer is off.
Styles pane
The Styles pane lists CSS rules matching the selected element and indicates declarations that are overridden or invalid.
A crossed-out text color in Styles directs the author to inspect the rule currently winning the conflict.
Subdomain
A subdomain is a name within another domain, such as www or blog under example.com, which can have its own service records.
The www subdomain points to the same website while a redirect selects the preferred public address.

T

Third-party dependency
A third-party dependency is a resource or service supplied by another provider that the page relies on and that can change independently.
A removed external font file changes the site's appearance even though its own CSS has not been edited.
TLS certificate
A TLS certificate binds covered domain names to a public key and is signed by a certificate authority trusted by the browser.
The certificate covers both the bare domain and www so either HTTPS connection can succeed.
Top-level domain
A top-level domain, or TLD, is the rightmost domain label, such as com or ca, identifying a part of the domain-name hierarchy.
The owner compares a generic ending and an eligible country-code ending before choosing a domain.
Transfer compression
Transfer compression uses methods such as gzip or Brotli to reduce data sent over the network, especially text files such as HTML and CSS.
The host compresses the stylesheet during delivery while the browser receives its original text content.
TTL
TTL, or time to live, states in seconds how long a resolver may cache a DNS answer before looking for an updated one.
Lowering TTL ahead of a migration helps new answers expire sooner once the old cache lifetime has passed.
Two-factor authentication
Two-factor authentication adds a second proof of identity during sign-in, reducing the risk that a stolen password alone grants account access.
The registrar and hosting accounts both use a second factor, with recovery details kept current.
TXT record
A TXT record stores text in DNS, often including a token used by a service to verify control of the domain name.
The owner adds the search service's verification token as a TXT record without changing the website A record.

U

Uptime monitor
An uptime monitor repeatedly requests a site and alerts when it stops responding, helping detect availability failures after launch.
An alert starts an investigation, while a separate form test checks whether messages still arrive.

V

Validation
Validation is checking HTML or CSS against the rules of its standard, including errors that browser recovery can hide from view.
The HTML checker catches a duplicate id even though both affected sections appear on the screen.
Validation error
A validation error is a checker message identifying code that breaks a standard rule and should be repaired before publishing.
An unclosed attribute quote produces an early validation error and can also trigger later messages.
Validation warning
A validation warning flags code needing attention or judgment even when it is allowed, so its message should be read before editing.
A warning prompts the author to check intent instead of deleting an allowed feature without review.
Vector image
A vector image describes shapes and lines instead of a fixed pixel grid, keeping simple graphics sharp when they are scaled.
The SVG logo stays crisp when the same file is displayed in the navigation and a larger footer.

W

Webmaster tools
Webmaster tools are search-service dashboards for verified site owners to inspect indexing, crawl errors and sitemap processing.
The owner checks a reported 404 in Search Console before adding the needed redirect.

#

404 Not Found
A 404 Not Found response means the server did not find the requested resource, often because its path is wrong or its file was not uploaded.
A lowercase photo name fixes a 404 caused by a capital letter in the page's requested address.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started