Difference between revisions of "HTML"

From wikieduonline
Jump to navigation Jump to search
Line 105: Line 105:
 
         <p><del> deleted text </del></p>
 
         <p><del> deleted text </del></p>
  
==Headings,Lines,Comments==
+
==Headings, Lines and Comments==
 
===Headings===
 
===Headings===
 
HTML includes six levels of headings, which are ranked according to importance.
 
HTML includes six levels of headings, which are ranked according to importance.

Revision as of 10:20, 25 February 2020

HTML stands for HyperText Markup Language.

Learn Basics

Unlike scripting or programming language that uses scripts to perform functions, a markup language uses tags to identify content.

Example:

To define a paragraph

 <p> I'm a paragraph </p> 

The <html> Tag

The structure of an HTML document has been compared with that of a sandwich. As a sandwich has two slices of bread, the HTML document has an opening and closing HTML tags.

<html>
 …
</html>

The <head> Tag

Immediately following the opening HTML tag, you'll find the head of the document, which is identified by opening and closing head tags.

The head of an HTML file contains all of the non-visual elements that help make the page work.

<html>
   <head>…</head>
</html>

Defines information about documents, including metadata and scripts

The <body> Tag

The body tag follows the head tag. All visual-structural elements are contained within the body tag.

Headings, paragraphs, lists, quotes, images, and links are just a few of the elements that can be contained within the body tag.

<html>
   <head>
   </head>
   <body>
   </body>
</html>

The <title> Tag

To place a title on the tab describing the web page, add a <title> element to your head section:

<html>
   <head>
      <title>first page</title>
   </head>
   <body>
      This is a line of text. 
   </body>
</html>

The title element is important because it describes the page and is used by search engines.

Pharagraph

Single Line Break

Use the br tag to add a single line of text without starting a new paragraph:

<html>
   <head>
      <title>first page</title>
   </head>
   
   <body>
      <p>This is a paragraph.</p>
      <p>This is another paragraph. </p>
      <p>This is <br /> a line break </p>
   </body>
</html>

Text Formatting

In HTML, there is a list of elements that specify text style.

<html>
    <head>
        <title>first page</title>
    </head>
   
    <body>
        <p>This is regular text </p>
        <p><b>bold text </b></p>
        <p><big> big text </big></p>
        <p><i> italic text </i></p>
        <p><small> small text </small></p>
        <p><strong> strong text </strong></p>
        <p><sub> subscripted text </sub></p>
        <p><sup> superscripted text </sup></p>
        <p><ins> inserted text </ins></p>
        <p><del> deleted text </del></p>
    </body>
</html>

This is regular text

bold text

big text

italic text

small text

strong text

subscripted text

superscripted text

inserted text

deleted text

Headings, Lines and Comments

Headings

HTML includes six levels of headings, which are ranked according to importance. These are h1, h2, h3, h4, h5, and h6.

<html>
   <head>
      <title>first page</title>
   </head>
   <body>
      <h1>This is heading 1</h1>
      <h2>This is heading 2</h2>
      <h3>This is heading 3</h3>
      <h4>This is heading 4</h4>
      <h5>This is heading 5</h5>
      <h6>This is heading 6</h6>
   </body>
</html>

See also

Advertising: