Correction
Hard Board
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dev-i-learn</title>
<link rel="stylesheet" href="data/css/style.css">
</head>
<body>
<h1>My home page</h1>
<section>
<div class="section-container">
<div class="section-content">
<h2 class="section-title">My section title</h2>
<img src="data/img/first-image.jpg" alt="first-image" title="First image">
<p title="First paragraph">This is my first paragraph</p>
<h3 id="contact-title">Contact Me</h3>
<form action="contact_form.php">
<label for="first-name">Your first name:</label>
<input type="text" name="first_name" id="first-name">
<label for="first-name">Your last name:</label>
<input type="text" name="last_name" id="last-name">
<label for="email">Your email:</label>
<input type="email" name="email" id="email">
<button type="submit">Send</button>
</form>
</div>
</div>
</section>
</body>
</html>
Explanations
- !DOCTYPE: All HTML documents must start with a declaration. It is an "information" to the browser about what document type to expect.
- <html>: The <html> tag represents the root of an HTML document. It's the container for all other HTML elements.
- lang: You should always include the lang attribute inside the <html> tag, to declare the language of the Web page. This is meant to assist search engines and browsers.
- <meta>: The <meta> tag defines metadata about an HTML document. Metadata is data (information) about data.
- <h1> to <h6>: The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading. <h6> defines the least important heading.
- <section>: The <section> tag defines a section in a document.
- class: The class attribute is used to specify a class for an HTML element. It's often used to point to a class name in a style sheet. It can also be used by a JavaScript to access and manipulate elements with the specific class name.
- alt: In the <img> tag, the alt attribute specifies an alternate text for an image, if the image for some reason cannot be displayed.
- title: The title attribute defines some extra information about an element. The value of the title attribute will be displayed as a tooltip when you mouse over the element.
- id: The id attribute is used to specify a unique id for an HTML element. You cannot have more than one element with the same id in an HTML document.
- action: The action attribute is used to specify where the formdata is to be sent to the server after submission of the form. It must be used in the <form> element.
-
type: For <button> elements, the type attribute specifies the type of button.
For <input> elements, the type attribute specifies the type of <input> element to display. It define the type of data we can put on the field (text, checkbox, email, file, date, image, ...). - <button>: The <button> tag defines a clickable button. Inside a <button> element you can put text, and other tags. That is not possible with a button created with the <input> element!
Get more fun!
Create your own Board
In progress..
Download more Boards
In progress..
Create your own Board
In progress..
Download more Boards
In progress..