[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/Progressive_web_apps/Tutorials/CycleTracker/HTML_and_CSS [Back]  [Original]

CycleTracker: HTML CSS - (PWA) | MDN

MDN Web Docs

View in English Always switch to English

CycleTracker: HTML CSS

(PWA) HTML CSS

CycleTracker PWA HTML CSS

HTML CSS

HTMLCSSJavaScript MDN

JavaScript PWA

CSS JavaScript <link> <script> HTML

html
<!doctype html>
<html lang="en-US">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Cycle Tracker</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <h1>Period tracker</h1>
    <form>
      <fieldset>
        <legend>Enter your period start and end date</legend>
        <p>
          <label for="start-date">Start date</label>
          <input type="date" id="start-date" required />
        </p>
        <p>
          <label for="end-date">End date</label>
          <input type="date" id="end-date" required />
        </p>
      </fieldset>
      <p>
        <button type="submit">Add Period</button>
      </p>
    </form>
    <section id="past-periods"></section>
    <script src="app.js" defer></script>
  </body>
</html>

HTMLindex.html

HTML

index.html HTML style.css CSS JavaScript app.js

HTML doctype

html
<!doctype html>

<html> lang

html
<!doctype html>
<html lang="en-US">
  <!-- <head>  <body>  -->
</html>

head

<head> <title>

<head> <head> 2 viewport <meta>

html
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width" />
</head>

"Cycle Tracker" <title> <head> <title> <title>

html
<title>Cycle Tracker</title>

2 <meta> <title> HTML <head> 3

<head> style.css HTML <link>

html
<link rel="stylesheet" href="style.css" />

HTML <link> rel 25 rel="stylesheet"

<link> rel

<body>

<body> 1 <h1> <form>

html
<body>
  <h1>Period tracker</h1>
  <form></form>
</body>

<form> <fieldset> <legend>

html
<form>
  <fieldset>
    <legend>Enter your period start and end date</legend>
  </fieldset>
</form>

<input> date required

<label> <input> id <label> for <input>

html
<label for="start-date">Start date</label>
<input type="date" id="start-date" required />

<fieldset> 2 <p> <label> <button> "Add period" type="submit" submit <button>

html
<form>
  <fieldset>
    <legend>Enter your period start and end date</legend>
    <p>
      <label for="start-date">Start date</label>
      <input type="date" id="start-date" required />
    </p>
    <p>
      <label for="end-date">End date</label>
      <input type="date" id="end-date" required />
    </p>
  </fieldset>
  <p>
    <button type="submit">Add Period</button>
  </p>
</form>

<section> JavaScript

html
<section id="past-periods"></section>

JavaScript

CSS <section> <h2>

html
<section id="past-periods">
  <h2>Past periods</h2>
  <ul>
    <li>From 01/01/2024 to 01/06/2024</li>
    <li>From 01/29/2024 to 02/04/2024</li>
  </ul>
</section>

<section id="past-periods"></section> CSS

JavaScript

</body> JavaScript app.js defer JavaScript HTML

html
<script src="app.js" defer></script>

app.js <button>

HTML

CSS

CSS HTML CSS

css
body {
  margin: 1vh 1vw;
  background-color: #efe;
}
ul,
fieldset,
legend {
  border: 1px solid;
  background-color: #fff;
}
ul {
  padding: 0;
  font-family: monospace;
}
li,
legend {
  list-style-type: none;
  padding: 0.2em 0.5em;
  background-color: #cfc;
}
li:nth-of-type(even) {
  background-color: inherit;
}

CSS CSS style.css HTML CSS CSS

22 [22]

CSS

background-color body (#efe) (#fff) border background-color (#cfc)

:nth-of-type(even) #fff

css
body {
  background-color: #efe;
}
ul,
fieldset,
legend {
  border: 1px solid;
  background-color: #fff;
}
li,
legend {
  background-color: #cfc;
}
li:nth-of-type(even) {
  background-color: inherit;
}

ul padding: 0 list-style-type: none

css
ul {
  padding: 0;
}
li {
  list-style-type: none;
}

body margin vw vh li legend ul monospace

css
body {
  margin: 1vh 1vw;
}
ul {
  font-family: monospace;
}
li,
legend {
  padding: 0.2em 0.5em;
}

li legend legend list-style-type

css
body {
  margin: 1vh 1vw;
  background-color: #efe;
}
ul,
fieldset,
legend {
  border: 1px solid;
  background-color: #fff;
}
ul {
  padding: 0;
  font-family: monospace;
}
li,
legend {
  list-style-type: none;
  padding: 0.2em 0.5em;
  background-color: #cfc;
}
li:nth-of-type(even) {
  background-color: inherit;
}

CSS CSS CSS

CSS CSS style.css index.html

PWA HTML CSS

html
<section id="past-periods">
  <!--
  <h2>Past periods</h2>
  <ul>
    <li>From 01/01/2024 to 01/06/2024</li>
    <li>From 01/29/2024 to 02/04/2024</li>
  </ul>
  -->
</section>

JavaScript

CycleTracker GitHub CycleTracker HTML CSS


Web Proxy Viewer  |  New URL  |  Original Page