Guest User

Untitled

a guest
Jan 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. # HTML & CSS:Design & Build Websites
  2. ## Ch 1 & 2 Questions
  3.  
  4. ### On a website, what is the purpose of HTML code?
  5. The purpose of HTML on a website is to structure its pages, using elements.
  6.  
  7. ### What is the difference between an element and a tag?
  8. In HTML, a *tag* is the character and angled brackets that comprise either an opening or closing portion of an element, while the term *element* refers not only to the tags but also to content that sits within the tag.
  9.  
  10. ### Why do we use attributes in HTML elements?
  11. We use attributes in HTML elements to provide more information about the contents of an element. They are added to the opening tag of the element and are composed of *name* and *value*.
  12.  
  13. ### Describe the purpose of the head, title, and body HTML elements.
  14. The purpose of the *head* element is to provide information about the page that is not shown in the main browser window. The *title* is an element whose text is displayed on the browser bar. The *body* element contains content intended to be seen inside the main browser window.
  15.  
  16. ### In your browser (Chrome), how do you view the source of a website?
  17. Select *View Source* from the *Developer* option on a Mac's *View* menu.
  18.  
  19. ### List five different HTML elements and what they are used for. For example, <p></p> is a paragraph element, and it is used to represent a paragraph of text.
  20. 1. The ```<strong></strong>``` element stresses the importance of a piece of content.
  21. 2. The ```<h1></h1>``` element indicates the main heading of a webpage.
  22. 3. The ```<em></em>``` element changes the implied meaning of a piece of content.
  23. 4. The ```<address></address>``` element refers to the contact details for the author of a webpage.
  24. 5. The ```<cite></cite>``` element is used to reference a piece of work, such as a book.
  25.  
  26. ### What are empty elements?
  27. Empty elements don't have any words between the opening and closing tags. They are usually made up of only one tag and contain a space after the character followed by a forward slash.
  28.  
  29. ### What is semantic markup?
  30. Semantic markup refers to elements that aren't intended to affect the structure of the webpage, but add extra information to the page, which help assistive technologies, such as screen readers, do their jobs better.
  31.  
  32. ### What are three new semantic elements introduced in HTML 5? Use page 431 in the book to find more about these new elements.
  33. 1. ```<header></header>```
  34. 2. ```<nav></nav>```
  35. 3. ```<article></article>```
Add Comment
Please, Sign In to add comment