HTML is short for Hyper Text Markup Language and is a language used to create electronic documents, especially pages on the World Wide Web that contain connections called hyperlinks to other pages. Every web page you see on the Internet, including this one contains HTML code that helps format and show text and images in an easy to read format. Without HTML a browser would not know how to format a page and would only display plain text with no formatting that contained no links. Below is an example of a basic web page in HTML code.
2. What is HTML attribute?
Tags can also have attributes, which are extra bits of information. Attributes appear inside the opening tag and their values sit inside quotation marks. They look something like Margarine. We will come across tags with attributes later.
3. What is HTML element?
In common usage, the terms “HTML element” and “HTML tag” are used interchangeably. A tag is an element is a tag.
But according to the W3C HTML specification, an element is the basic building block of HTML and is typically made up of two tags: an opening tag and a closing tag.
For example, the paragraph element is made up of the opening tag
and the closing tag
. The element is the collection of both the starting tag and the ending tag.
In other words, the element is the entire HTML block that creates a paragraph. And the tags are the two pieces of the element—the opening piece and the closing piece.
Most HTML elements have an opening tag and a closing tag. These tags surround the text that will display on the web page. For example, the paragraph tag has an opening tag:
and a closing tag:
. To write a paragraph of text, you write the text to display on the page and then surround it with these tags:
This is a paragraph that will display on the web page. It is surrounded by opening and closing paragraph tags.
Some HTML elements do not have a closing tag. These are called “singleton” or “void” elements. Void elements are easy to use because you only have to include one tag in your web page. For example, to add a line break to your page you would use the BR tag:
Void elements have only one tag as part of the element, but in XHTML, you would also include a trailing slash in the beginning tag to show that it is a void element. For example, in XHTML to add a line break you would use the BR element with a closing slash:
In general, when I refer to an HTML element or tag, I will use the term “element” to indicate that I am referring to all parts of the element (both opening and closing tags). But I may use the term tag to mean the same thing—an HTML item that will define something on your web page.
4. What is a frameset?
5. How do I make a picture as a background on my web pages?
Point the body background to the name of your image you wish to use as the background as shown below. This body line should be the first line after your tag.
You can also have the background image fixed, so it does not move when using the scroll bar in the browser. To do this add the BGPROPERTIES tag as shown below.
6. What lists are commonly used to design a web page?
• unordered list
• ordered list
• directory list
• definition list
• menu list
7. Is there some way to keep list elements organized in an HTML file?
Using indents, you could keep the list elements organized. By indenting each sub-nested list further than the parent list, you could quickly determine the different lists and the elements contained in each.
8. What is an image map?
An image map allows you to link to several web pages through one image. Simply define shapes within images and link these to the pages you want. Here’s a video to help you learn more about images and links in HTML.
9. What code is used to insert a copyright symbol on a web page?