Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hw01-intro

My demo repo for webdev

Deployed on: https://hw01-intro.vercel.app/

index.html -- the minimum you should actually write

<!DOCTYPE html>
<html>
<head><meta charset="UTF-8" /><title>Hello</title></head>
<body>Hello, world!</body>
</html>

This includes <meta charset="UTF-8"> even though the page would render fine without it (the content here is plain ASCII) -- omitting it isn't just a style nit, it's a real security anti-pattern (see ../anatomy.md), so it's worth including even in the minimal example.

The literal fewest bytes a browser will still render identically

HTML5's parser auto-inserts <html>, <head>, and <body> even if you omit them, so this technically works too:

<!DOCTYPE html><title>Hello</title>Hello, world!

Not something to actually write or teach as a pattern -- it relies on browser-implied structure instead of explicit, readable markup, which is exactly the kind of "too clever" shortcut that makes code harder to reason about later. Included here as a fact about how HTML5 parsing works, not a recommendation.

About

My demo repo for webdev

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages