Is HTML a programming language?
HTML is not a programming language because it does not specify logic as scripting (or programming) languages such as Active Server Pages (ASP) or JavaScript do. HTML specifies the structure of a document. So you may think of HTML just as a layout language.

How can I open a local web page in a browser?
An easiest way to open a web page from a local computer is to double click on the file name of the web page. Alternatively, you can drag and drop the web page file to a browser window.

How do I view the HTML code for a particular web page?
In Microsoft Internet Explorer, choose Source from View, located in the top menu bar. Or, right click on the web page and choose View Source.

How do I edit or write HTML code?
To write your HTML code, you can start by using Notepad. To run Notepad in Windows, just type notepad.exe in Windows Run command text box. Although Notepad is simple to use, it is limited in its use because it is not designed to create HTML pages. Visual editors like Dreamweaver and FrontPage are specifically designed to create and manage webpages more efficiently.

How close do the browsers adhere to the World Wide Consortium’s HTML specification?
In the past, the makers of Netscape Navigator and Microsoft Internet Explorer have lagged the HTML specification and included proprietary features that did not work in all browsers. Now, however, browsers are becoming more closer to the official and accepted specification of HTML.

What is the purpose of an <html> tag?
An <html> tag marks the starting point of a web page. The </html> tag marks the end of a web page. Between <html> and </html>, there are two major sections, marked by the <head> and <body> tags. The head section contains information about a web page that is not displayed in the browser. The body section, on the other hand, includes the content that is displayed in the browser.

Where is the <head> tag positioned inside an HTML document?
In an HTML document, the <head> tag must be placed after an <html> tag and before the <body> tag.

What is the purpose of a <title> tag?
The <title> tag contains the title of a web page. The title of a web page appears in the title bar of a browser; for example, the blue bar on top of the menu choices in Internet Explorer.

What happens if you do not include a <title> tag in your HTML document?
If your HTML document is missing a <title> tag or contains no text inside the <title> and </title> tag, then, the browser displays the filename in the title bar.

What happens if your title text is longer than the browser’s title bar?
Any text longer than the browser’s title bar is truncated.

What is the <meta> tags used for?
The <meta> tags are used to include information like title, keywords, description, author and other information about a web page.

How do I add comments to an HTML document?
To mark text as comment in an HTML document, enclose the comment text inside the <!– comments go here –> tags. Note that there must be a space character between the opening tag and the first letter of your comment text. The comment tags can span multiple lines.

What is an empty tag?
An empty tag contains no text between the opening and closing tag. When there is no text between tags, then, there is nothing to format and thus nothing will be shown on a web page.

Can I apply several tags to the same line of text?
Yes, but that should be used carefully. Avoid using redundant tags like <b><b>Some text</b></b> or overlapping tags like <b><i>Some text</b></i>.

Should I always close tags?
All tags that are opened should be closed for clarity and for a well-formed document. However, some tags like <li>, <td>, <tr>, and <p> do not require a closing tag. On the other hand, if you do not close a required tag (like <h1>), the tag’s instruction may be applied to some unintended part of the webpage.

Can I set attribute values to anything or to a predefined value?
It all depends on the type of attribute you are using. Some attributes require one of predefined values like align attribute can be set to left, center, right, or justify. For other attributes, such as rowspan, you can specify any positive integer because it does not have any predefined value.

What is the advantage of using white space in your HTML code?
Because browsers collapse multiple space characters into a single space, you can use this fact to your advantage. For instance, you can indent your code so that it is easier to read and follow. Thus you do not have to worry about multiple spaces being displayed on the browser.

Advertisements