` elements horizontally. [S1]
*Float* β use `float: left` with percentage widths (e.g. 33% for three columns): [S1]
```css
.mycontainer {
width: 100%;
overflow: auto;
}
.mycontainer div {
width: 33%;
float: left;
}
```
*Inline-block* β change the display property from block to `inline-block`: [S1]
```css
div {
width: 30%;
display: inline-block;
}
```
*Flexbox* β apply `display: flex` on a parent container: [S1]
```css
.mycontainer {
display: flex;
}
.mycontainer > div {
width: 33%;
}
```
*Grid* β use `display: grid` with the `grid-template-columns` property: [S1]
```css
.grid-container {
display: grid;
grid-template-columns: 33% 33% 33%;
}
```
**HTML Tag Reference.** [S1]
| Tag | Description |
|---|---|
| `
` | Defines a section in a document (block-level) |
## π οΈ μ μ© μ¬λ‘ (Applied in summary)
The city-grouping examples (London, Oslo) and the four horizontal-layout techniques (Float, Inline-block, Flexbox, Grid) are the canonical applied examples. No external project/commit applications found in the source.
## π» μ½λ ν¨ν΄ (Code patterns)
Container div (HTML):
```html
```
Centered div (CSS):
```css
div {
width: 300px;
margin: auto;
}
```
Three-column flexbox (CSS):
```css
.mycontainer {
display: flex;
}
.mycontainer > div {
width: 33%;
}
```
## βοΈ λΉκ΅ λ° μ ν κΈ°μ€ (Comparison & decision criteria)
For aligning `
` elements side by side, the source presents four approaches: [S1]
- **Float** β `float: left` with percentage widths; container uses `overflow: auto`.
- **Inline-block** β set `display: inline-block` and a width on each div.
- **Flexbox** β `display: flex` on the parent container (modern, flexible).
- **Grid** β `display: grid` with `grid-template-columns` (advanced layout control).
## βοΈ λͺ¨μ λ° μ
λ°μ΄νΈ (Contradictions & updates)
No contradictions found in the source. [S1]
## β
κ²μ¦ μν λ° μ λ’°λ
- **μν:** draft
- **κ²μ¦ λ¨κ³:** conceptual (μ€μ μ μ© μ¬λ‘ λ°κ²¬ μ applied/validatedλ‘ μΉκ²© κ°λ₯)
- **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference, not a primary standards body)
- **μ λ’° μ μ:** 0.88
- **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery)
## π μ§μ κ·Έλν (Knowledge Graph)
- **μμ/루νΈ:** [[HTML Tutorial]]
- **κ΄λ ¨ κ°λ
:** [[HTML Block and Inline]], [[HTML Classes]], [[HTML Id]], [[HTML Iframes]]
- **μ°Έμ‘° λ§₯λ½:** Referenced whenever grouping or laying out page sections as block-level containers.
## π μΆμ² (Sources)
- [S1] W3Schools β HTML Div Element β https://www.w3schools.com/html/html_div.asp
## π λ³κ²½ μ΄λ ₯ (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "HTML Div Element" page (Astra wiki-curation, P-Reinforce v3.1 format).