HTML and CSS Reference
In-Depth Information
To Refresh the View in a Browser
As you continue developing the HTML file in Notepad++, it is a good idea to view the file in your browser as
you make modifications. Clicking the Refresh button when viewing the modified Web page in the browser, ensures
that the latest version of the Web page is displayed. The following step shows how to refresh the view of a Web page
in a browser in order to view the modified Web page.
Refresh
button
1
Explorer button
on the taskbar
to display the
rockclimbing.html
Web page.
Click the Internet
button on the
Address bar
to display the
modified Web page
(Figure 2-35).
Click the Refresh
inserted
image
heading
with color
square bullets
inserted horizontal rule
with color, 50% width,
and increased height
footer centered
and in italics
Other Ways
Figure 2-35
1. In Internet Explorer,
press f 5 to refresh
Validating and Viewing HTML Code
In Chapter 1, you read about validating your HTML code. Many validation services are
available on the Web that can be used to assure that your HTML code follows standards.
This should always be a part of your Web page testing. The validation service used in
this topic is the W3C Markup Validation Service (validator.w3.org). This validator checks
the markup validity of Web documents in HTML and XHTML, along with some other
markup languages. The validator looks at the DOCTYPE statement to see which version
of HTML or XHTML you are using, and then checks to see if the code is valid for that
version. In this chapter, the project uses the HTML5 DOCTYPE.
If validation detects an error in your HTML code, you will see the warning “Errors
found while checking this document as HTML5!” in the header bar, which is in red (Figure
2-36a on the next page). The Result line shows the number of errors that you have. You can
scroll down the page or click the Jump To: Validation Output link to see detailed comments on
each error.
It is important to note that one error can result in more errors. As an example, the
</h2> tag on line 19 in the rockclimbing.html file was removed to show code with an error.
Figure 2-36b shows that in this case, one initial error (that the <ul> tag on line 21 cannot
be used within the <h2> tag on line 19) resulted in a total of three errors and one warning.
HTML and HTML5 Tags
The Web has excellent
sources that list HTML5
tags. For more information
about HTML and HTML5,
search for “HTML tags” or
“HTML5 tags” in a search
engine.
 
Search WWH ::




Custom Search