Dokumentacja HTML pod egzamin INF.03. Każda sekcja zawiera opis, zastosowanie, przykłady i najczęstsze błędy.
Co robi?
Podstawowy szablon każdej strony.
<!DOCTYPE html> <html lang="pl"> <head> <meta charset="UTF-8"> <title>Strona</title> </head> <body> </body> </html>
Częstotliwość: ~100%
Służą do tworzenia tytułów.
<h1>Tytuł główny</h1> <h2>Podtytuł</h2> <h3>Mniejszy nagłówek</h3>
<p> To jest akapit. </p>
<a href="https://google.pl"> Google </a>
<img src="zdjecie.jpg" alt="Opis">
Typowe polecenie CKE:
Wyświetl obraz o nazwie kot.jpg.
<ul>
<li>Element 1</li>
<li>Element 2</li>
</ul>
<ol>
<li>Pierwszy</li>
<li>Drugi</li>
</ol>
<table>
<tr>
<th>ID</th>
<th>Nazwa</th>
</tr>
<tr>
<td>1</td>
<td>Laptop</td>
</tr>
</table>
Częstotliwość: ~70%
<form action="" method="post"> </form>
Częstotliwość: ~90%
<input type="text" name="imie">
<input type="number" name="wiek">
<input type="password" name="haslo">
<input type="date" name="data">
<input type="email" name="email">
<input type="radio" name="plec" value="K"> Kobieta <input type="radio" name="plec" value="M"> Mężczyzna
Częstotliwość: ~40%
<input type="checkbox" name="zgoda">
<select name="miasto"> <option>Poznań</option> <option>Warszawa</option> </select>
Częstotliwość: ~50%
<textarea name="opis"> </textarea>
<button>
Wyślij
</button>
<div>
Treść
</div>
Częstotliwość: ~95%
<header></header> <main></main> <section></section> <article></article> <footer></footer>
Przykładowe polecenie CKE:
Wykonaj formularz zawierający pole tekstowe oraz przycisk.
<form method="post">
<input type="text" name="imie">
<button>
Wyślij
</button>
</form>
Przykładowe polecenie CKE:
Wykonaj tabelę z nagłówkami.
<table>
<tr>
<th>ID</th>
<th>Nazwa</th>
</tr>
<tr>
<td>1</td>
<td>Laptop</td>
</tr>
</table>
Przykładowe polecenie CKE:
Wyświetl zdjęcie i podpis pod nim.
<img src="obraz.jpg" alt="Zdjęcie"> <p> Opis zdjęcia </p>