SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Shelly Cashman Series, Jessica Minnick
Chapter:
Introduction To The Internet And Web Design
Exercise:
Extend Your Knowledge
Question:1 | ISBN:9781305578166 | Edition: 8

Question

Adding Comments to an HTML Document
Note: To complete this assignment, you will be required to use the Data Files for Students. Visit www.cengage.com/ct/studentdownload for detailed

instructions or contact your instructor for information about accessing the required files.


Instructions: Open your HTML editor and then open the extend01.html file provided in  the Data Files for Students. Add the HTML tags, text, indents,

blank lines, and comments as instructed. Save the page as ski01.html in the same location and view it in a browser. Figure 1–51a shows the completed

HTML document in Notepad++ and Figure 1–51b shows the completed webpage in a browser.

 

Perform the following tasks:
1. HTML comments are inserted into a webpage using special tags with the following syntax:
     <!-- comment goes here -->
     A comment may be placed anywhere in the HTML document after the opening <!DOCTYPE 
     html> statement and may be one or more lines long as needed. The only requirement is
      that the comment opens with the same four characters <!--, and ends with the same three
     characters, -->. In ski01.html, enter a comment after the opening <!DOCTYPE html>
    declaration statement that includes your name and the current date as shown in Figure 1–51a.
2. Enter the remaining tags and text shown in Figure 1–51a without any indents or blank lines.
    Save the file and open it in a browser. In a Word document named ski01.docx, answer these questions:
      a. How do HTML comments appear on the webpage when it is opened in a browser?
      b. How does the content within the <p> … </p> tags appear in a browser?
3. Return to your HTML editor and add blank lines and indents as shown in Figure 1–51a. Save
    the HTML file and refresh it in your browser to see the changes. In your Word document,  answer these questions:
    a. What is the purpose of adding extra lines and indents in the HTML editor?
    b. How do the extra lines and indents change the way the webpage appears in the browser?
4. Add <p>, </p>, and <br> tags as shown in Figure 1–51a so that the content is rendered in the
     browser on multiple lines. In your Word document, answer these questions:
    a. What is the purpose of adding the <p> and </p> tags?
    b. What is the purpose of adding the <br> tags?
5. Save the HTML file and refresh it in your browser to see the changes. Compare Figure 1–51a
    and Figure 1–51b. In your Word document, identify how the following two lines use white space
     in the HTML editor and compare that to how the browser reads and displays the same line.
     a. “Our ski and snowboard…”
     b. “Phone: 1-800…”
6. Submit your assignment in the format specified by your instructor.
7. What would happen if webpage developers did not use comments, indents, and white space?
     Identify a potential problem associated with each.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Sorry the answer is not available at the moment…

If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.

Spread the 'tradition of sharing'.