adobe dreamweaver cs5 on demand part 74 pdf

6 324 0
adobe dreamweaver cs5 on demand part 74 pdf

Đang tải... (xem toàn văn)

Thông tin tài liệu

ptg 456 Chapter 19 The Validator in Dreamweaver allows you to quickly locate tag or syn- tax errors in your code. You can specify the tag-based languages against what the Validator should check, the specific problems that the Validator should check, and the types of errors that the Validator should report. Validating Web pages differs from checking for browser support in that the Validator checks for specific problems such as support for a specific version of HTML, or ColdFusion. Understanding the specific problems associated with a Web page help you to further refine the document to generate compliant code. Validating Web Pages Set Validator Preferences Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences. Click the Validator category. TIMESAVER Click the Validation button on the Validation tab in the Results panel, and then click Settings. Select the items that you want to validate by checking the box, located to the left of the item. Click Options. Select from the following validator options: ◆ Display. Select what options you want to display (Errors, Warnings, Custom Messages, or Nesting Errors). ◆ Check For. Select the options to check for Quotes In Text or Entities In Text. Click OK. Click OK. 7 6 5 4 3 2 1 2 4 3 7 6 5 From the Library of Wow! eBook ptg Chapter 19 Testing a Web Site 457 Validate a Web Page Click the Window menu, point to Results, and then click Validation. Select from the following Validator options: ◆ Validate. Click the Validate button, and then select the validate command you want: Validate Current Document, Validate Entire Current Local Site, and Validate Selected Files In Site, Settings. ◆ Stop. Click the Stop button to stop the current validation check. ◆ More Info. Select an item from the validator list of errors, and then click the More Info button to receive more information on the selected error. ◆ Save Report. Click the Save Report button to save the document as an XML file. ◆ Browse Report. Click the Browse Report button to view an ordered listing of the current errors in your default browser. 2 1 2 Selected validation in the Results panel Selected code related to validation Did You Know? You can do further validation of your Web site online. The World Wide Web Consortium gives you the ability to check your HTML and CSS according to the latest standards. Visit http: //validator.w3.org/ to validate your HTML, or use http://jigsaw.w3.org/ css-validator/ to check your CSS. 1 From the Library of Wow! eBook ptg 458 Chapter 19 Checking for HTML Browser Compatibility Check for HTML Browser Compatibility Click the File menu, point to Check Page, and then click Browser Compatibility. The Results panel appears with the Browser Compatibility tab, indicating any potential problems. Double-click an issue to select it. Information about the potential problem appears to the right in the Results panel. To display the issue in the co de, click the Check Page button on the Document window, and then click Next Issue or Previous Issue. To exclude an issue from future checking, right-click the issue in the Results panel, and then click Ignore Issue. ◆ To edit the Ignore Issues list, click the green arrow in the Results panel, click Edit Ignored Issues List, delete the issue from the Exceptions.xml file, and then save and close the file. 4 3 2 1 The Browser Compatibility Check (BCC) analyzes the HTML and CSS on the open page and determines whether it has problems in certain browsers. When you run the BCC, it scans the open page and reports any potential HTML problems in the Results panel. Each potential prob- lem is given a confidence rating, a circle. The amount of the circle filled in—quarter, half, three-quarter, or full—determines the occurrence probability level of the problem. Browser problems fall into three cate- gories: serious (visible problem), warning (not supported), and informa- tional (no visible effect). You can also check browser compatibility in Code view. When you refresh a page, Dreamweaver checks the code and inserts a wavy red underline under the name of every item creating an error in one of your predefined target browsers. 2 3 1 From the Library of Wow! eBook ptg Chapter 19 Testing a Web Site 459 Check for HTML Browser Compatibility Using Code View Open the document you want to check. Switch to Code view. After making a change in Code view, click the Refresh button in the Properties panel, or press F5. A wavy red underline appears under the name of every item that's an error in one of your pre- defined target browsers. NOTE If Dreamweaver finds no unsupported markup, then nothing is underlined, and the Target Browser Check menu icon in the Document toolbar changes to indicate that there are no errors. 3 2 1 3 1 2 See Also See “Checking for CSS Browser Compatibility” on page 234 for informa- tion on viewing and saving a BCC report. Did You Know? You can check to see exactly what browser is not supported. Simply posi- tion the pointer to point to the red- underlined text, and a tool tip appears, indicating which browsers don't sup- port that item. You can select browsers to check. Click the Check Page button on the Document window, click Settings, select the browser and versions you want, and then click OK. From the Library of Wow! eBook ptg 460 Chapter 19 HTML is a very structured language and needs to follow specific rules to be error free. HTML code includes tags, parentheses (( )), braces ({ }), and square brackets ([ ]) that need to be balanced, meaning every opening tag, parentheses, brace, or bracket has a corresponding clos- ing one. If HTML is not balanced, the code will not work properly and cause errors. You can use commands in Dreamweaver to make sure the tags, parentheses (( )), braces ({ }), and square brackets ([ ]) in a page are correctly balanced. Checking for Balanced Code Check for Balanced Tags Open the Web page in Code view you want to check. Click to place the insertion point in the nested code you want to check. Click the Edit menu, and then click Select Parent Tag. The enclosing matching tags (including the contents) are selected in Code view. Click the Edit menu, and then click Select Parent Tag again to continue checking tags. 4 3 2 1 3 Selected parent tag 1 Click in code 2 From the Library of Wow! eBook ptg Chapter 19 Testing a Web Site 461 Check for Balanced Parentheses, Braces, or Brackets Open the Web page in Code view you want to check. Click to place the insertion point in the code you want to check. Click the Edit menu, and then click Balanced Braces. The code between the enclosing parentheses, braces, or square brackets are selected in Code view. Click the Edit menu, and then click Balanced Braces again to continue checking parentheses, braces, and square brackets. 4 3 2 1 3 Selected code between parentheses, braces, or square brackets 1 Click in code 2 From the Library of Wow! eBook . Preferences Click the Dreamweaver (Mac) or Edit (Win) menu, and then click Preferences. Click the Validator category. TIMESAVER Click the Validation button on the Validation tab in the Results. Stop button to stop the current validation check. ◆ More Info. Select an item from the validator list of errors, and then click the More Info button to receive more information on the selected. Options. Select from the following validator options: ◆ Display. Select what options you want to display (Errors, Warnings, Custom Messages, or Nesting Errors). ◆ Check For. Select the options

Ngày đăng: 02/07/2014, 21:20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan