Structural HTML Tags

Filter Course


Structural HTML Tags

Published by: Sujan

Published date: 14 Jun 2021

Structural HTML Tags - Photo

Structural HTML Tags

Structured HTML tags are like keywords define that how a web browser will format and display the content. With the help of tags, a web browser can distinguish between HTML content and simple content. HTML tags contain three main parts: an opening tag, content, and closing tag. But some HTML tags are unclosed tags. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties. All HTML tags must enclosed within < > these brackets.

 

 

...
Defines the beginning and the end of the document body. The body contains the content of the document (the part that is displayed in the browser window). Attributes to thetag affect the entire document.

Attributes
alink="#rrggbb" or color name
Sets the color of active links (i.e., the color while the mouse button is held down during a “click”). Color is specified in hexadecimal RGB values or by standard web color name. Chapter 5, HTML Overview, explains how to specify color in HTML.

background=url
Provides the URL to a graphic file to be used as a tiling graphic in the background of the document. bgcolor="#rrggbb" or color name
Sets the color of the background for the document. Color is specified in hexadecimal RGB values or by standard web color name.

link="#rrggbb" or color name
Sets the default color for all the links in the document. Color is specified in hexadecimal RGB values or by standard web color name.

text="#rrggbb" or color name
Sets the default color for all the text in the document. Color is specified in hexadecimal RGB values or by standard web color name.

vlink="#rrggbb" or color name
Sets the color of the visited links for the document. Color is specified in hexadecimal RGB values or by standard web color name.

 

 

...
Defines the head (also called “header”) portion of the document that contains information about the document. Thetag has no attributes, but serves only as a container for the other header tags, such as, , and.

 

...
Placed at the beginning and end of the document, this tag tells the browser that the entire document is composed in HTML.

 


Defines a relationship between the current document and another document. This tag goes within theportion of the document. It is often used to refer to an external stylesheet.

Attributes
href=url
Identifies the target document.

methods=list
Specifies a browser-dependent list of comma-separated display methods for this link. It is not commonly used.

rev=relation
Specifies the relationship from the target document to the source.

rel=relation
Specifies the relationship from the current source document to the target.

rel=stylesheet
This attribute is used within the

tag to create a relationship with an external stylesheet.

title=text
Provides a title for the target document.

type=resource
Shows the type of outside link. The value text/CSS indicates that the linked document is an external cascading style sheet

 

 


Provides additional information about the document. It should be placed within thetags at the beginning of the document. It is commonly used for making documents searchable (by adding keywords) and may be used for client pull functions.

Attributes

content=text
Specifies the value of the meta tag and is always used in conjunction with name= or http-equiv=. http-equiv=text
Specifies information to be included in the HTTP header that the server appends to the document. It is used in conjunction with the name attribute.

name=text
Specifies a name for the meta information.

scheme=text
Provides additional information for the interpretation of meta data. This is a new attribute introduced in HTML 4.0.

 

 

...
Specifies the title of the document. The title generally appears in the top bar of the browser window

Setting Up an HTML Document

The standard skeletal structure of an HTML document is as follows:


Document TitleContents of Document


The HTML standard requires that the entire document appears within the

container, however, most browsers can properly display the contents of the document even if these tags are omitted. All HTML documents are made up of two main structures, the head (also called the “header”) and the body. The exception to this rule is when the document contains a frameset in place of the body.

The Document Header

The header, delimited by the

tag, contains information that describes the HTML document. The head tag has no attributes of its own but merely serves as a container for other tags that help define and manage the document’s contents.
Titles

The most commonly used elements within the header is the document title (within

tags, as shown in the example above), which provides a description of the page’s contents. The title is also used as the name of the link as displayed in a user’s bookmarks or “hot list.” Search engines rely heavily on document titles as well. For all these reasons, it is important to provide thoughtful and descriptive titles for all your documents and avoid vague titles such as “Welcome,” or “MyPage.”

Other header elements

Other useful HTML elements are also placed within the

tags of a document:

 


This tag establishes the document’s base location, which serves as a reference for all the links in the document.

Creating Links.

 


This tag defines the relationship between the current document and another document. Although it can signify relationships such as index, next, and previous, it is most often used today to link a document to an external style sheet.

 


“Meta” tags are used to provide information about a document, such as
keywords or descriptions to aid search engines. It may also be used for clientpull
functions. The tag is discussed later in this chapter.