Linggo, Hulyo 10, 2011

What I've Learned ? ^^

                  First of all, I’d like to introduce our Computer Teacher who teaches us well.  Ernani Mañalac is his name but we call him “Sir Nhanie” for short. I’ve learned more about HTML, which describes web pages and contains HTML tags and plain text. The HTML tags are usually come in pairs [opening tags and closing tags] like <br> and </br>.

These are three topics we’ve dicussed:

*Minimal HTML Document 

            Every HTML document should start with a <!DOCTYPE> declaration that tells the browser what version of HTML the document is written in. In practical terms, this tells browsers like Internet Explorer and Firefox to use their most standards-compliant (and therefore cross-browser-compatible) rendering mode. The exact form of the <!DOCTYPE> declaration depends on whether your document is HTML 4.

*Inline Elements and Block elements [HTML Elements]
          

Inline Elements are elements that define text or data in the document like STRONG makes the enclosed text strongly emphasized. They don't start new lines when you use them, and they generally only contain other inline tags and text or data.

Examples:
      ·         <span></span>
·         <strong></strong>
·         <br></br>



Block Elements are elements that create blocks or large groupings of text and it cannot be nested within inline elements.
    Examples :
      ·         <div></div>
      ·         <h1> </h1>
      ·         <p> <p>


*DiV and SPAN

The Primary Difference between the <span> and <div> tags is that <span> doesn't do any formatting of it's own. The <div> tag acts includes a paragraph break, because it is defining a logical division in the document.

<div> also gives you the chance to define the style of whole sections of HTML. You could define a section of your page as a call out and give that section a different style from the surrounding text. 

* When you want to change the style of elements without placing them in a new block-level element in the document use the <span>. For example, if you had a Level 3 Heading (<h3>) that you wanted the second word to be red, you could surround that word with  <span style="color : #f00;">2ndWord</span>  and it would still be a part of the <h3> tag, just red.

Walang komento:

Mag-post ng isang Komento