Skip to content
Navigation Menu
Toggle navigation
Sign in
Product
GitHub Copilot
Write better code with AI
Security
Find and fix vulnerabilities
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Discussions
Collaborate outside of code
Code Search
Find more, search less
Explore
All features
Documentation
GitHub Skills
Blog
Solutions
By company size
Enterprises
Small and medium teams
Startups
By use case
DevSecOps
DevOps
CI/CD
View all use cases
By industry
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
Topics
AI
DevOps
Security
Software Development
View all
Explore
Learning Pathways
White papers, Ebooks, Webinars
Customer Stories
Partners
Open Source
GitHub Sponsors
Fund open source developers
The ReadME Project
GitHub community articles
Repositories
Topics
Trending
Collections
Enterprise
Enterprise platform
AI-powered developer platform
Available add-ons
Advanced Security
Enterprise-grade security features
GitHub Copilot
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search or jump to...
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Saved searches
Use saved searches to filter your results more quickly
Sign in
Sign up
Reseting focus
{{ message }}
mdn
/
learning-area
Public
Notifications
You must be signed in to change notification settings
Fork
27k
Star
7k
Code
Issues
3
Pull requests
3
Actions
Security
Insights
Additional navigation options
Files
main
.github
.vscode
accessibility
css
css-layout
flexbox
floats
fundamental-layout-comprehension-finish
fundamental-layout-comprehension
grids
0-starting-point.html
1-fixed-columns.html
10-template-completed.html
11-grid-system-starting-point.html
12-grid-system-completed.html
2-fr-tracks.html
3-gaps.html
4-repeat.html
5-auto-rows.html
6-min-max.html
7-auto-fill.html
8-placement-starting-point.html
9-placement-completed.html
css-grid-finished.html
css-grid.html
css-tables-as-grid.html
flexbox-grid.html
fluid-grid-calc.html
fluid-grid-offset.html
fluid-grid.html
html-skeleton-finished.html
html-skeleton.html
normalize.css
simple-grid-finished.html
simple-grid.html
skeleton.css
multicol
positioning
practical-positioning-examples
stacking-and-float
introduction-to-css
styling-boxes
styling-text
html
javascript
tools-testing
.gitignore
.prettierignore
.prettierrc.json
CODE_OF_CONDUCT.md
LICENSE
README.md
Breadcrumbs
learning-area
/
css
/
css-layout
/
grids
/
0-starting-point.html
Blame
Blame
Latest commit
luv2027
and
bsmth
fix: standardize lang attribute usage in HTML tutorial on MDN to 'en-…
Dec 22, 2023
3ecaba0
·
Dec 22, 2023
History
History
39 lines (34 loc) · 829 Bytes
·
Breadcrumbs
learning-area
/
css
/
css-layout
/
grids
/
0-starting-point.html
Top
File metadata and controls
Code
Blame
39 lines (34 loc) · 829 Bytes
·
Raw
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>CSS Grid starting point</title> <style> body { width: 90%; max-width: 900px; margin: 2em auto; font: .9em/1.2 Arial, Helvetica, sans-serif; } .container > div { border-radius: 5px; padding: 10px; background-color: rgb(207,232,220); border: 2px solid rgb(79,185,227); } </style> </head> <body> <h1>Simple grid example</h1> <div class="container"> <div>One</div> <div>Two</div> <div>Three</div> <div>Four</div> <div>Five</div> <div>Six</div> <div>Seven</div> </div> </body> </html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html
>
<
html
lang
="
en-US
"
>
<
head
>
<
meta
charset
="
utf-8
"
>
<
meta
name
="
viewport
"
content
="
width=device-width
"
>
<
title
>
CSS Grid starting point
</
title
>
<
style
>
body {
width: 90%;
max-width: 900px;
margin: 2em auto;
font: .9em/1.2 Arial, Helvetica, sans-serif;
}
.container > div {
border-radius: 5px;
padding: 10px;
background-color: rgb(207,232,220);
border: 2px solid rgb(79,185,227);
}
</
style
>
</
head
>
<
body
>
<
h1
>
Simple grid example
</
h1
>
<
div
class
="
container
"
>
<
div
>
One
</
div
>
<
div
>
Two
</
div
>
<
div
>
Three
</
div
>
<
div
>
Four
</
div
>
<
div
>
Five
</
div
>
<
div
>
Six
</
div
>
<
div
>
Seven
</
div
>
</
div
>
</
body
>
</
html
>
While the code is focused, press Alt+F1 for a menu of operations.