@ -389,6 +392,7 @@ In this section, we will start writing the DOM tree of an HTML document or file.
### Declaration
Before the root element, there is a declaration. This declaration tells the browser that the document is an HTML. Therefore, the browser render it to the way an HTML suppose to be rendered.
This is the code to declare an HTML. The declaration is not part of the DOM tree.
```html
@ -399,7 +403,7 @@ This is the code to declare an HTML. The declaration is not part of the DOM tree
The _html_ element is the root of the DOM tree and is the parent of _head_ and _body_.
The DOM try has be wrapped by the html tag.
The DOM try has to be wrapped by the html tag.
```html
<!DOCTYPE html>
@ -1192,13 +1196,7 @@ To create a form, we use _form_ element and the _form_ element wrap other input
</form>
```
You can see the output of the above code here.
<form>
<label>First name:</label>
<inputtype="text"/>
<inputtype="submit"value="Submit"/>
</form>
You can try the output of the above code on visual studio code.
The HTML form code below can handle different kind of data. It handles almost any kind of data including file.
@ -1313,121 +1311,7 @@ The HTML form code below can handle different kind of data. It handles almost an
<optionvalue="html-css">Basis of HTML and CSS</option>
<optionvalue="js">Modern JavaScript</option>
<optionvalue="pyhton">Python</option>
<optionvalue="react">React</option>
<optionvalue="data-analysis">
Data Analysis with Python
</option>
</select>
</div>
<divclass="form-group">
<labelfor="message">Leave your message here</label><br/>
<textarea
cols="120"
rows="10"
id="message"
placeholder="Write your message here..."
></textarea>
</div>
<divclass="form-group">
<inputtype="file"id="file-input"/>
<labelfor="file-input"
><iclass="fas fa-upload"></i>Upload File</label
>
</div>
<div>
<inputtype="checkbox"id="agree"/>
<labelfor="agree"
>Be sure that all the information is yours and true.</label
>
</div>
<div>
<inputtype="submit"value="Submit"/>
</div>
</form>
</div>
Try the output the above code on visual studio.
What is matters the most is understanding how the HTML form works, this is not an exhaustive list of all the input fields. Whenever you would like to solve some problem, try to search it on the internet using a key word. Searching is also one the most important skill in software development.
@ -1466,7 +1350,8 @@ Let us see the output of the above code
<td>Finland</td>
</tr>
</table>
However, HTML table has thead, tbody and tfooter. Let us add thead and tbody to the above code. In addition, we can use th in the table head instead to td to make the table heading bold.
However, HTML table has _thead_, \*tbody and tfooter. Let us add thead and tbody to the above code. In addition, we can use th in the table head instead to td to make the table heading bold.
```html
<table>
@ -1487,7 +1372,7 @@ However, HTML table has thead, tbody and tfooter. Let us add thead and tbody to
</table>
```
The out for the above code
Try the output of the above code using visual studio code.
<table>
<thead>
@ -1588,87 +1473,83 @@ The author of this challenge creates different challenges every year. Let us put