Instructions
- Create an HTML Document
- Start with a proper <!DOCTYPE> declaration for HTML5.
- Include the <html>, <head>, and <body> tags.
- Include the <html> After the <!DOCTYPE>
- Inside the <head> Section
- Add a <title> tag with the title: “My First HTML Document.”
- Include a <meta> tag for character encoding set to UTF-8.
- Link an external CSS file (you don’t need to create the file for now; just include the link):
<link rel=”stylesheet” href=”styles.css”>
- Inside the <body> Section
- Add a main heading using <h1> with the text: “Welcome to My HTML Page.”
- Add a subheading using <h2> with the text: “A Journey into Web Development.”
- Add two paragraphs:
- The first paragraph should introduce yourself and explain your interest in learning HTML.
- The second paragraph should describe what you hope to achieve through this course.
- Use Other Elements
- Insert a line break (<br>) in one of the paragraphs to split the text into two lines.
- Add a horizontal rule (<hr>) between the two paragraphs.
- Attributes Usage
- Apply a lang attribute to the <html> tag, specifying the document language as English.
- Assign a class attribute to the second paragraph with the value “highlight.”
- Add an id attribute to the main heading with the value “main-title.”
To complete this test, you will use the EduCourse Code Editor below to write the provided HTML code. The editor is specifically designed to help you practice coding with immediate feedback. After writing your code, click the Test Your Code button. If your code is correct, you will receive a green success message indicating that everything is written properly. This confirmation ensures your code is free of errors and follows the required structure. Once you see the green message, you can preview the outcome of your code in the built-in browser preview tool. This feature allows you to see how your webpage will look and function, giving you a clear understanding of how your code translates into a visual format. If your code is incorrect you will receive an error message with what needs to be added again. You may start the task again. By completing this task, you’ll gain confidence in coding and see the results of your work instantly.
Build Your HTML Document
Write a valid HTML document following the instructions and click “Test Your Code”.