< Back
Page 6 of 6
This chapter is from the book
Workshop
The workshop contains quiz questions to help you process what you’ve learned in this lesson. Try to answer all the questions before you read the answers.
Q&A
- Q This hour seems focused on writing HTML from scratch, but I like using a WYSIWYG editor. Will that work?
- A The best editors give you access to the HTML so that you can make sure there aren’t extra tags or attributes that you don’t want. But as long as you can edit the HTML directly, you shouldn’t have a problem using a visual editor rather than a text editor. Hour 21, “Tools for Creating Responsive Web Designs,” discusses some other tools, including editors, that you can use to create responsive designs.
- Q My system uses XHTML. Can I create RWD with that?
- A As long as you can add style sheets to your HTML or XHTML, you can use it to build RWD.
- Q You mention microformats, but I already use RDF or Microdata. Is that okay?
- A Using RDF and using Microdata are both acceptable ways to add semantics to your HTML. Microdata is a standard proposed by the W3C, and RDF is a more complicated system for defining metadata of all kinds.
Quiz
- Is this well-formed HTML: <strong><em>My dog is</strong> big</em>?
- Is it better to use a <p> or a <div> tag when marking up a paragraph?
- Is the <header> element semantic?
Answers
- No, this is not well-formed HTML because the <strong> and <em> tags do not nest correctly. Designers commonly make the error of closing the outermost tag first. Here’s the correct version of this HTML: <em><strong>My dog is</strong> big</em>.
- When you’re marking up a paragraph, you should use the <p> tag because it defines paragraphs.
- The <header> element is semantic because it describes the content as being the header section of a web page, section, or element.
Exercise
Go through the HTML for the site you are evaluating. Convert it as much as possible to semantic HTML5. Remove unnecessary tags and then validate it with an HTML5 validator. If the validator finds errors, fix them until the page is valid.
< Back
Page 6 of 6