|
Things this site will teach you...
DHF |
![]() Lesson One Chapter Two - [The Basic Layout]How to Write a TagHTML is made up of tags. They can change the layout, shape, colors, and background and appearance of a web page as well as making things like forms and tables. A tag is a letter or word like 'p' or 'strong' enclosed between a couple of angle brackets like this: <p>, <strong>. The <p> tag means 'paragraph' and the <strong> tag means 'make the text strong'. But somethings missing. Nearly every tag has a partner which is a lmost exactly the same but has a back slash after the first bracket. So <p>'s partner would be </p> and <strong>'s would be </strong>. Pairs of tags affect the the things in between them. Anyway, it's about time for a demo so you can see for yourself how tags work. Hello! This is a paragraph. As you can see it is between the paragraph tags. This is strong text.But that was too easy. The next things to think about are attributes. The <p></p> tag has a title attribute which looks like this <p title="This paragraphs name"></p> and isn't used very often but is a good example. Attributes are written with their name followed by a = sign then their value enclosed by quotes. Quotes have to be used although you'll see some sites that don't. Time for another demo. Hover your mouse over this paragraph to see the title attribute in action. This particular attribute isn't used very often because it isn't very useful, is it? Hey look... This tag is inside another Ha. Rules for Tags
|