HTML Font Styles and HTML Linking Attributes

HTML Font Styles and HTML Linking Attributes
Page content

Basic HTML Codes

The

tag defines a paragraph. An extra blank line is added before and after a paragraph.

The
tag differs from the

tag in that it inserts a single line break. Unlike the

tag the
tag is an empty tag, meaning that it has no end tag in HTML i.e.

is incorrect. However, whereas in HTML the
tag has no end tag in XHTML the
tag is closed like this

It is important to note that the
tag is used in an HTML document to enter blank lines and not to separate paragraphs. The latter function is achieved by using the

tag.

HTML Font Styles

The following elements are all font style elements. Although these font styles are still used, more intricate font styles are achieved using cascading style sheets.

  • - teletype or mono spaced text
  • - italic text
  • - bold text
  • - bigger text
  • - smaller text

HTML Phrase Elements

The following elements are all phrase elements. Again it is possible to achieve a richer effect using style sheets.

  • - emphasized text
  • - strong emphasized text
  • - definition term
  • - computer code text
  • - sample computer code
  • - keyboard text
  • - defines a variable
  • - citation

Through HTML, web developers have the ability to link text and images to another document which is stored on the same server or a remote server. A hypertext link is marked by the browser by using a different color or underlining the specified text.

To create a single hypertext-related in HTML the tag (anchor tag) is used. To include an anchor in your document follow the steps outlined below:

The anchor tag can be used to link documents within the same server by using relative links. Relative links refer to links which specify the location of the current file on the server.

Relative links use the standard UNIX syntax. The parent directory is identified as “..” while the directory separator is “/”. For example, to access a file in the parent directory’s misc directory, one would use (../misc/somefile.html).

Alternatively, the anchor tag can be used to specify the absolute pathname (the complete URL) of the file. The World Wide Web uses Uniform Resource Locators (URLs) to specify the location of files on other servers.

It is also possible to use the anchor tag to link to a specific email address on the web by including the mailto attribute in a hyperlink. The format is: Send an email to Someone

Supported linking attributes are:

  • href - The target URL of the link
  • name – Used to create a bookmark in a document. In XHTML, the name attribute is replaced by the id attribute.
  • target – Specifies where to open the target URL.
    • _blank uses a new window
    • _self uses the same frame
    • _parent uses parent frameset
    • _top uses the full body of the window

Stay tuned for more linking attributes in relation to page sections and images in the next article of the HTML Web Page Coding Series.

This post is part of the series: HTML Web Page Coding

This series will guide users through a number of articles that explain basic HTML web page coding starting from the basic elements of an HTML document to advanced HTML coding that includes how to insert a table and build forms in a web page with HTML code.

  1. The Structure of an HTML Document
  2. Basic Formatting Codes in HTML
  3. Advanced Formatting in HTML
  4. How to Build Forms in HTML