Chapter 5 - Marking Up Text Flashcards

1
Q

Explain briefly why it is important to choose html elements semantically (in a way that most accurately describes the content’s meaning)

A

First - if you don’t like how it looks in the browser, change it with a style sheet.

But, a semantically marked up doc ensures your content is available and accessible in the widest range of browsing environments, from desktop computers & mobile devices to assistive screen readers - it also allows nonhuman readers, such as search engine indexing programs, to correctly parse your content and make decisions about the relative importance of elements on the page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Discuss the Paragraph element

A

<p>... </p>

…. the most rudimentary elements of a text doc… you open with a <p> and close with a </p>… paragraphs are always displayed as a block…. they may contain text, images and other inline elements (referred to as phrasing content).. however, they may not contain other block elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a naked text?

A

you must assign an element to all text in a doc. In other words, all text must be enclosed in some sort of element. Text that isn’t contained within tags is called a “naked” or “anonymous” text and can cause a document to be invalid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Discuss the Headings element

A

There are 6 levels of headings, from h1 to h6. When you add headings to content, the browser uses them to create a document outline for the page. Search engines look at heading levels as part of their algorithms (information in higher level headings maybe given more priority) - For this reason, it is best practice to start w/ the level 1 heading & work down in numerical order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Discuss the Horizontal Rule <hr> element

A

<hr></hr>

Used if you want to indicate that one topic or thought has completed and another is beginning, you can insert what is called in HTML5 a “paragraph-level thematic” break using the hr element - it is used as a logical divider between sections of a page or paragraphs of a text - hr element adds a logical divider between sections or paragraphs of text w/o introducing a new heading level

Prior html versions (prior to html 5) - hr was defined as an horizontal rule b/c it inserted a horizontal line on the page - browsers still render a shaded rule, put it on a line by itself w/ space above and below by default but it now has a new semantic purpose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Discuss the hgroup element

A
  • For identifying a stack of headings as a group. Browsers that support hgroup know to count only the highest-ranked heading in the outline and ignore the rest

<h1>Creating a Simple Page</h1>

<h2>(HTML Overview)</h2>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List the available Lists elements

A

all list elements & the items that go in them - are displayed as block elements by default, which means that they start on a new line and have some space above and below. Any list can be nested within another list; it just has to be placed within a list item

Unordered Lists: display by default with a bullet before each item. open & close with <ul> </ul> respectively, and each item in the list gets marked up as a list item <li> </li>… there should be no bullets in the source document. the only thing that is permitted within a ul list is one more list items. you can’t put other elements in there or untagged text - however, you can put any type of flow element within a list item (li)

Ordered lists: for items that occur in a particular order, such as step-by-step instructions or driving directions. <ol> </ol>… the browser automatically inserts numbers before ordered list items. Ordered list elements must contain one or more list item elements. Also, if you don’t want an ordered list to start with a 1, you can use the start attribute in the <ol> element i.e. <ol>

Description Lists: Used for any type of name/value pairs such as terms & definitions. The content of a dl is some # of dt elements indicating the names and dd elements for their respective values - dt - terms & dd - definitions… example:

<dl>
<dt>...</dt>
<dd>...</dd> (can contain any type of flow element)
</dl>

</ol></ol>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Discuss the Blockquote element

A

used to indicate a long quotation, a testimonial, or a section of copy from another source…. it is recommended that content within blockquote elements be contained in other elements such as paragraphs, headings, or lists…

<blockquote>
<p> xxxxxx </p>
</blockquote>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Discuss the Preformatted Text element

A

Since browsers ignore whitespace such as line returns and character spaces in the source doc - but some types of info, such as code examples or poetry, the whitespace is important for conveying meaning. <pre>….</pre>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Discuss the Figures element

A

Used for content that illustrates or supports some point in the text. A figure may contain an image, a video, a code snippet, text or even a table - pretty much anything that can go in the flow of web content - and should be treated as a self-contained unit. …

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Discuss the Sections element

A

to divide long web documents into thematic sections. they typcially have a heading (inside the section element) and any other content that has a meaningful reason to be grouped together. ….

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Discuss the Article element

A

used for self-contained works that could stand alone or be reused in a different context. Useful for magazine or newspaper articles, blog posts, comments, or other items that could be extracted for external use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Discuss the Aside (sidebars) element

A

…….. identifies content that is related but tangential to the surrounding content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Discuss the Navigation (nav) element

A

a semantic way to identify navigation for a site. It should be used for links that provide primary navigation around a site or a lengthy section or article

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Discuss the header element

A

used for introductory material that typically appears at the beginning of a web page or at the top of a section or article

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Discuss the footer element

A

used to indicate the type of information that typically comes at the end of a page or an article, such as it’s author, copyright information, related documents, or navigation

17
Q

Discuss the address element

A

used to create an area for contact information for the author or maintainer of the document. it is generally placed at the end of the document or in a section or article within a document. An address would be right at home in a footer element.

18
Q

Discuss the emphasized text element

A

<em>….</em>…. use to highlight the part of the element that needs to be emphasized.

19
Q

Discuss the strong element

A

<strong>….</strong>… indicates that a word or phrase is important

20
Q

Discuss the i element

A

italic - indicates text that is in a different voice or mood than the surrounding text, such a phrase from another language, a technical term, or thought…<i>….</i>

21
Q

Discuss the u element

A

Underline - <u>.... </u>

22
Q

Discuss the s element

A

small…. <small>….</small>

23
Q

Discuss the q element

A

……. short quotations

24
Q

Discuss the Abbreviations element

A

<abbr>….</abbr>… Abbreviation & acronyms provides useful information for search engines, screen readers, and other devices