<h1> heading
The biggest heading. Use it once for the page title.
<h1>Heading</h1><h1>Robotics Club</h1>
Apps with Vue · In any playground, open Reference to copy these.
The biggest heading. Use it once for the page title.
<h1>Heading</h1><h1>Robotics Club</h1>
Space outside an element, between it and its neighbours.
margin: 10px;<style>
p {
border: 1px solid gray;
margin: 20px;
}
</style>
<p>One</p>
<p>Two</p>
A value worked out from other data. Vue works it out again whenever that data changes, so it never goes stale. Never set it yourself.
const total = computed(() => adults.value * 12);Headings are the page's outline: one h1, then h2 for each part, h3 inside those. Never pick a level for its size; set the size with CSS.
<h1>Page title</h1>
<h2>A part of the page</h2>
<h3>A part of that part</h3>Space inside an element, between its edge and its content.
padding: 10px;<style>
p {
background-color: lightblue;
padding: 20px;
}
</style>
<p>Room inside</p>
A line around an element: thickness, style, colour.
border: 2px solid black;<style>
p {
border: 2px solid black;
}
</style>
<p>Boxed</p>
A tag of your own, made once and used many times: <player-card :name="p.name"></player-card>. The colon passes a value. Make the app with const app = createApp(...), add components, then app.mount("#app").
app.component("player-card", {
props: ["name"],
template: `<p>{{ name }}</p>`
});