Exercise: Semantic elements
Modify the HTML by adding semantic elements. Your complete document should have the following features:
- A header elementAn element providing heading material for all or part of the contents of the page. This should not be contained in the main element. containing the heading A brief introduction to articles.
- A footer elementAn element providing footer material for all or part of the contents of the page. This should not be contained in the main element. containing The bottom line is that there is a lot to learn about articles.
- A main elementAn element that contains the main content of the page. containing two section elementsAn element used as a thematic grouping of material..
- Each section element should have a header elementAn element providing heading material for all or part of the contents of the page. This should not be contained in the main element., with a heading using
h2
. - Each section element should contain a series of article elementsAn element that designates a self-contained part of the content..
- Each article element should contain a heading elementAn element that gives a heading. using
h3
, and one or more paragraph elementsAn element consisting of text that forms a paragraph..
Note:
Hints:
- undefined
Solution to the exercise
The two sections are Short articles and Articles about articles.
The first section has two articles and the second section has three articles.
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
article {
border: 2pt solid black;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX