<data:blog.title/> <data:blog.pageName/> - <data:blog.title/> <body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d5541401714712540614\x26blogName\x3dWebsites+for+beginners\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://forwebsites.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://forwebsites.blogspot.com/\x26vt\x3d-1869690867818899097', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Monday, July 18, 2011

Anatomy of an HTML file

HTML, or hypertext Markup Language, is a language that uses text and a defined set of commands (known as tags) to create a World Wide Web page.

  • HTML
    Every HTML page file has a beginning and an end. These are defined by 'beginning' and 'ending' tags. The tag <HTML> needs to be at the start of the code.
  • HEAD
    The <HEAD> tag doesn't display on the web page, but you should get into the habit of putting it in. This tag is a container for all the head elements. These can include page title, scripts, style sheet instructions and most importantly provide meta information for search engine.
  • TITLE
    The title tag defines the title of the document and is a required element in the head section. Each page should have a descriptive title that clearly identifies the content of the page and the site itself. It's best to use the name of your webpage, for instance: "Beginners Guide to HTML".
  • BODY
    The body tag opens the document's body section. This section contains the main elements of an HTML document, such as hyperlinks text, pictures, tables, forms and lists. A well-written introduction will help to hook the user. When they enter they want a quick idea of whether the page is of interest - it's the text and graphical state of your site that will decide whether they stay or go.
  • /HTML
    </HTML> at the end of the code. Note: The / in the second tag. All HTML end tags need to contain this character. This slash indicates an operation has finished.
  • P
    The <P> tag is a paragraph tag. A <P> tag instructs a browser to create space above and below the tag, thus separating text into paragraphs.
  • H1
    The <H1> to <H6> tags are used to define HTML headings and sub headings. <H1> displays the largest heading and <H6> displays the smallest heading.


<HTML>

<HEAD>

<TITLE>Beginners Guide to HTML</TITLE>

<H1>What is the structure of an HTML Page</H1>

<P>This is the source code (HTML file) used to make your own Web page.</P>

<P> This HTML code, can be saved as an HTML file. To do this write you code using a word processor then go to the file menu, choose SAVE AS and give your document a file name, for instance my homepage. Finally add the extention.html. as myhomepage.html</P>

</BODY>


</HTML>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home