Exercise
A. Write a one-lin code to do the following.
1. <title> HTML 5 – Summary </title>
2. <body bg color=”red”> </body>
3. <p style=color:blue; font-family:Old bookman style;”>
4. <audio controls>
<source src=”guitar.mp3” type=”audio/mp3”>
</audio>
5. <img src=”school.jpg” align=”right” border=”5px”>
Opt2:
<picture>
<source src=”school.jpg”>
</picture>
B. What happened when?
1. Cannot creat a custom attribute in HTML.
2. The webpage won’t appear, instead the code will appear in browser
3. The font effects will affect to the whole web page.
4. There will be no place to put the picture source.
5. It will not be html 5 version anymore.
C. True of false
1.False
2.True
3.false
4.true
5.false
D. Answer the following question.
1.
Use Proper Doctype: Always start with <!DOCTYPE html> to ensure the browser correctly
interprets your HTML5 code.
Semantic Elements: Use semantic elements like <header>, <nav>, <article>, and <footer> to
structure your content, making it more readable and accessible.
Keep Code Clean: Use proper indentation and spacing to make your code easier to read and
maintain.
2.
Using the <img> Tag:
html
<img src="image.jpg" alt="Description of Image">
Using the CSS background-image Property:
html
<div style="background-image: url('image.jpg'); width: 300px; height: 200px;"></div>
3. Standard attributes in HTML are common attributes that can be used with most HTML elements
to add additional information, behavior, or styling. Example: id , style and alt
4. Backward compatibility means that newer systems or software can work with older versions or
inputs.
HTML5 is backward compatible, meaning that:
Web pages created with older HTML versions still display correctly in modern browsers.
6. Structural elements in HTML are tags that define the layout and structure of a web page.
Example : Header, section and footer