1. What is the purpose of the viewport meta tag?
It tells mobile browsers to size the page to the device width so text isn’t zoomed. Use:<meta name="viewport" content="width=device-width, initial-scale=1">
.
2. Does Google still care about the <meta description>
for ranking?
Not as a ranking factor, but a clear description boosts click-through rate—so write one for every indexable page.
3. How long should page titles be in 2025?
50–60 characters (600 px) so they don’t get truncated on desktop or mobile SERPs.
4. What is Core Web Vitals and why does it matter?
A Google signal combining LCP, INP, and CLS. Good scores improve user experience and ranking potential.
5. Should I still use <b>
/ <i>
or switch to <strong>
/ <em>
?
Prefer <strong>
and <em>
for semantic emphasis—screen readers announce them accordingly.
6. What image format provides the best compression today?
AVIF → WebP → JPEG/PNG fallback. Use the <picture>
element for progressive enhancement.
7. How do I lazy-load images?
Add loading="lazy"
(native in all evergreen browsers) plus explicit width
/height
to avoid layout shift.
8. Are self-closing tags valid HTML?
Yes for void elements (<img>
, <meta>
), but XHTML-style />
is optional in HTML5.
9. How do I mark the current navigation link?
Add aria-current="page"
or aria-current="true"
to the active <a>
element.
10. What structured data gives the biggest SEO win?
For blogs: Article
/BlogPosting
.
For products: Product
+ Offer
+ AggregateRating
.
Validate with Google’s Rich Results Test.
11. Do I need rel="noopener noreferrer"
on every external link?
Only when you also use target="_blank"
. It prevents the new tab from accessing window.opener
(security).
12. How can I make HTML tables responsive?
Wrap in .table-wrapper {overflow-x:auto}
or convert rows to grids on small screens with CSS.
13. Is inline CSS bad for SEO?
No, but it can bloat HTML. Use critical inline CSS only for above-the-fold styles to improve LCP.
14. Should I minify HTML?
Yes—reduces transfer size ~10 %. Use build-time tools (Vite, Next.js, Hugo) to strip comments/whitespace.
15. What’s the minimum colour contrast ratio?
WCAG 2.2 AA: 4.5 : 1 for body text, 3 : 1 for large text ≥ 24 px bold.
16. How do I embed YouTube GDPR-friendly?
Use https://www.youtube-nocookie.com/embed/ID
, set loading="lazy"
and add a consent banner if required.
17. Can I skip alt
on decorative images?
Yes—set alt=""
. Screen readers will ignore it.
18. How do I preload fonts correctly?
<link rel="preload" href="/fonts/Inter.woff2" as="font" type="font/woff2" crossorigin>
—then declare in CSS.
19. What’s the difference between section
and div
?
section
represents a thematic grouping and appears in the page outline; div
is purely generic.
20. Does duplicating content across pages hurt SEO?
Yes—use canonical URLs (<link rel="canonical" href="…">
) or consolidate pages to avoid dilution.
21. How many H1 tags can a page have?
Technically multiple, but one descriptive H1 inside <main>
remains best practice for clarity and assistive tech.
22. Is it OK to hide text with CSS for SEO?
Yes—only if the hidden text is available to everyone (e.g., skip-links, “read more” toggles). Cloaking content solely for crawlers can trigger penalties.
23. What’s the ideal robots.txt file size?
Stay below 500 KB to ensure Googlebot doesn’t truncate the file (the crawler stops reading after that point).
24. Do I still need an XML sitemap in 2025?
Absolutely—large and frequently updated sites benefit from faster discovery and indexation. Include <lastmod>
dates that genuinely change.
25. How often should I regenerate my sitemap?
Whenever URL sets or last-modified timestamps change; most CMSs can ping https://www.google.com/ping?sitemap=URL
automatically.
26. What’s hreflang
and when is it required?
Use hreflang
when the same content is available in multiple languages or regional variants. It helps the correct version rank in each locale.
27. Can JavaScript-rendered pages rank well?
Yes—provided you let crawlers reach rendered HTML through server-side rendering (SSR), static generation, or an isomorphic framework (e.g., Next.js). Avoid heavy client-only hydration for critical content.
28. Does adding <noscript>
content help?
For key messages (hero copy, CTAs), place a lightweight <noscript>
fallback. It aids users with JS disabled and serves as a graceful degradation signal to crawlers.
29. Should I inline or defer critical CSS?
Inline only the first-viewport styles (< 15 KB compressed) in <style>
; defer the rest via media="print"
swap or rel="preload" as="style"
with onload
.
30. What is INP and how do I optimise it?
Interaction to Next Paint measures latency of user actions. Optimise by reducing long tasks (> 50 ms), prioritising input handlers, and splitting bundles.
31. Do <meta http-equiv="refresh">
redirects hurt SEO?
They work, but 301/302 HTTP redirects are safer; meta refreshes may confuse crawlers and impair CWV.
32. What’s the difference between 301 and 308 redirects?
Both are permanent, but 308 preserves the request method (useful for POST). For standard page moves, 301 is still widely adopted.
33. Should I use preconnect
, dns-prefetch
, or preload
?
-
dns-prefetch
: resolve domain names early. -
preconnect
: establish TLS + TCP. -
preload
: fetch specific assets (fonts, hero images).
Use each sparingly to avoid priority conflicts.
34. How do I mark telephone numbers for easy tapping?
Wrap them in <a href="tel:+15551234567">
and add inputmode="tel"
on form fields. Do not disable viewport zoom; it hinders accessibility.
35. Are HTML microdata and RDFa still relevant?
JSON-LD dominates, but microdata/RDFa remain valid. If a legacy CMS outputs them, keep—but don’t mix multiple markup syntaxes for the same entity.
36. Can I omit the type
attribute on <script>
and <style>
?
Yes—type="text/javascript"
and type="text/css"
are no longer required in HTML Living Standard.
37. What file formats support transparency best on the web now?
AVIF > WebP > PNG. AVIF often yields 30-50 % smaller sizes than PNG at equal quality.
38. Does the order of attributes in a tag matter?
For rendering—no. For human diffing and style guides—keep class
, id
, then others for consistency.
39. How big can a single HTML file be before performance drops?
Aim for ≤ 200 KB compressed (≈ 1 MB uncompressed). Beyond that, first contentful paint may stall, especially on 3G/4G.
40. What’s the safe limit for the number of links on a page?
Google can crawl thousands, but UX suffers beyond ~100. Keep primary navigation concise and move deep links to sitemaps or progressive disclosure components.