HTML II: Styling

From http://www.codecademy.com/ I didn”t hesitate to post because it is open sourde in that web site too. This is for my looking. (MSY)

Font size

Recall that <p> and </p> are opening and closing tags.

We can give tags more instructions by includingattributes in the opening tag. An attribute is simply a characteristic or some description for the content in the element. You saw this with src in <img>and href in <a>.

Let’s change the size of the text. How? We use thestyle attribute. We make it equal to font-size, followed by a colon, the size you want, and end it with px (short for “pixels”). For example:

<p style = “font-size: 12px”> Read more of this post

HTML basics

 From http://www.codecademy.com HTML Basics. For remembrance.

To learn more HTML, we should learn how to talk about HTML. Already you have seen we use <>s a lot.

  1. Things      inside <>s are      called tags.
  2. Tags      nearly always come in pairs: an opening tag and a closing tag.
  3. Example of      opening tag: <html>
  4. Example of      closing tag: </html>

You can think of tags as being like parentheses: whenever you open one, you should close it. Tags also nest, so you should close them in the right order: the most recently opened tag should be the first one closed, like in the example below. Read more of this post