Help:Wiki University Wikitext--Div Tag - Introduction

Paragraph tags are not Wikitext
 We are now going to talk about an equivalent tag.
 * Up to this point, we have been showing you how to deal with paragraphs using the paragraph tags Lorem ipsum …...
 * These paragraph tags are not really Wikitext coding.
 * They are actually HTML coding.
 * We have brought up paragraph tags because they are used so often in the FamilySearch Wiki and you need to know how to handle them.
 * As stated previously, there is no Wikitext equivalent to a paragraph tag. Text can be place on pages without any tags at all.  But to separate them you have to use line brake tags.
 * However, you cannot add attributes to line brake tags.
 * All you will have is black text on a white background just as you see in any book. So if you want to change anything in a paragraph, you need to use a paragraph tag or something equivalent.

Div tags

 * What if you wanted to have the paragraphs right next to each other with no spaces between but still have the ability to add attributes to them.
 * Let us introduce you to a new tag which is probably used far more than paragraph tags.
 * It is the  tag commonly referred to as a “div tag”.
 * The “div” stands for “division” and means a division or part of a page.
 * It works just a like a paragraph tag but does not have any built in spacing.

Div tags are containers

 * Div tags can be looked upon as containers.
 * Whatever attributes are applied between the opening and closing div tag will not affect the other parts of the page.
 * The paragraph acts the same way.
 * You can compare div tags to a box of bottles. You can rearrange bottles in a box but it will not affect bottles in other boxes.

How div tags affect paragraphs
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce elementum efficitur faucibus. Curabitur eleifend quis ligula ac ullamcorper. Curabitur eget suscipit turpis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sit amet iaculis metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce elementum efficitur faucibus. Curabitur eleifend quis ligula ac ullamcorper. Curabitur eget suscipit turpis. Lorem ipsum ...    Lorem ipsum ....    In the next chapter we will talk about how to separate them.
 * So lets put two paragraphs on a page using div tags with different background colors and see how they appear on the page:
 * Here is the coding:
 * NOTICE that the borders of the backgrounds are touching.

Try these out
 Exercises Check your answers
 * Load our lorem ipsum paragraphs twice with the first one with a background color of cornsilk and the second one with a color crimson, both with a padding of 20 pixels, but using div tags instead of paragraph tags:

 Quick Quiz
 * The div tag and paragraph tag function the same way.
 * A. True
 * B. False


 * The attributes work the same way in the div tag as in the paragraph tag
 * A. True
 * B. False


 * Div tags put spaces between paragraphs
 * A. True
 * B. False

Check your answers