HTML

HTML stands for Hypertext Markup Language. HTML was originally based on the Standard Generalized Markup Language (SGML), a much larger, more complicated document-processing system. To write HTML pages, you won't need to know much about SGML.

 

However, knowing that one of the main features of SGML is that it describes the general structure of the content inside documents - rather than its actual appearance on the page or onscreen - does help. This concept might be a bit foreign to you if you're used to working with What You See Is What You Get (WYSIWYG) editors.

👉HTML Describes the Structure of a Page

HTML by virtue of its SGML heritage, is a language for describing the structure of a documents, not its actual presentation. The idea here is that more documents have common elements - for example: titles, paragraphs and lists. HTML defines a set of common elements for web pages: headings, paragraphs, lists, and tables. It also defines character formats such as boldface and code examples. These elements and formats are indicated inside HTML documents using tags. 

If you've worked with word processing programs that use to style sheets (such as Microsoft Word) or paragraph catalogs (such as FrameMaker), you've done something similar; each section of text conforms to one of a set of styles that are predefined before you start working.

👉How Markup Works

HTML is a markup language. Writing in a markup language means that you start with the text of your page and add special tags arounds words and paragraphs. The tags indicate the different parts of the page and produce different effects in the browser. You'll learn more about tags and how they're used in the next section. HTML has a defined set of tags you can use. You can't make up your own tags to create new styles or features. And just to make sure that things are really confusing, various browsers support different sets of tags.

👉HTML Does Not Describe Page Layout

When you're working with a word processor or page layout program, styles are not just named elements of page; they also include formatting information such as the font size and style, indentation, underlining, and so on. So, when you write some text that's supposed to be a heading, You can apply the Heading style to it, and the program automatically formats that paragraph for you in the correct style. HTML doesn't go this far. For the most part, the HTML specification doesn't say anything about how a page looks when it's viewed. HTML tags just indicate that an element is a heading or a list; they say nothing about how that heading or list is to be formatted. The only thing you have to worry about is marking which section is supposed to be a heading, not how that heading should look.

👉Use of HTML

  • Publish documents online
  • Access web resources via Hyperlinks
  • Create forms to get user inputs
  • Create offline version of website that work without internet
  • Store data in user's browser
  • Find current location of website visitor

👉Creating Your First HTML Page

Open the text editor and type the following code. This simple example is just to get you started:

<!DOCTYPE html>     ----- Specifies this is an HTML5 doc
<html>     ----- Root of an HTML page
<head>     ----- Contains page metadata
         <title> Any Title Name </title>     ----- Contains title
</head>
<body>     ----- The main body of the page
          <h1> This is a heading </h1>     ----- Heading tag
          <p> This is a paragraph </p>      ----- Paragraph tag
</body>     ----- Closing body tag
</html>

NOTE.....

Note that the <!DOCTYPE> tag, starting with the fact that it begins with the exclamation point (!). The purpose of the DOCTYPE is to tell validators and browsers which specification your page was written to - in this case HTML5.

After you create your HTML file and save it. When choose a name for the file, follow this two rules:

  • The file name should have an extension of  .html - for example: myfile.htmltext.html or index.html . Most web software requires your files to have these extension. 
  • Use short, simple names. Don't include spaces or special characters (bullets, accented characters) - just letters and numbers are fine. Be sure to choose descriptive, readable  names for your files. They'll help you keep track of what they are used for, and they can help make your site friendlier to search engines.

Previous Post Next Post