Chapter 27: Selection Menu Controls

Select Menu

The <select> element generates a drop-down menu from which the user can choose an option.

<select name="">
 <option value="1">One</option>
 <option value="2">Two</option>
 <option value="3">Three</option>
 <option value="4">Four</option>
</select>

Changing the Size

You can change the size of the selection menu with the size attribute. A size of 0 or 1 displays the standard dropdown style menu. A size greater than 1 will convert the drop-down into a box displaying that many lines, with one
option per line and a scrollbar in order to scroll through the available options.

Read More

Chapter 25: Media Elements

AttributeDetails
widthSets the element’s width in pixels.
heightSets the element’s height in pixels.
<source>Defines resources of the audio or video files
trackDefines the text track for media elements
controlsDisplays controls
autoplayAutomatically start playing the media
loopPlays the media in a repeated cycle
mutedPlays the media without sound
posterAssigns an image to display until a video is loaded

Read More

Chapter 23: Output Element

AttributeDescription
GlobalAttributes that are available to any HTML5 element. For comprehensive documentation of these
attributes see: MDN Global attributes
nameA string representing the name of an output. As a form element, output can be referenced by it’s name
using the document.forms property. This attribute is also used for collecting values on a form submit.
forA space separated list of form element ids (e.g. <inputs id=“inp1”> for value is “inp1”) that the output is meant to display calculations for.
formA string representing the <form> that is associated to the output. If the output is actually outside the , <form> this attribute will ensure that the output still belongs to the <form> and subject to collections and submits of said <form>.

Read More

Chapter 21: Navigation Bars

Basic Navigation Bar

Navigation bars are essentially a list of links, so the ul and li elements are used to encase navigation links.

<ul>
 <li><a href="#">Home</a></li>
 <li><a href="#">About</a></li>
 <li><a href="#">Contact</a></li>
</ul>

HTML5 Navigation Bar

To make a navigation bar using the HTML5 nav element, encase the links within the nav tag.

<nav>
 <a href="#">Home</a>
 <a href="#">About</a>
 <a href="#">Contact</a>
</nav>

Chapter 18: Forms

AttributeDescription
accept-charsetSpecifies the character encodings that are to be used for the form submission.
actionSpecifies where to send the form-data when a form is submitted.
autocompleteSpecifies whether a form should have autocomplete on or off.
enctypeSpecifies how the form-data should be encoded when submitting it to the server (only for
method=”post”).
methodSpecifies the HTTP method to use when sending form-data (POST or GET).
nameSpecifies the name of a form.
novalidateSpecifies that the form should not be validated when submitted.
targetSpecifies where to display the response that is received after submitting the form.

Read More

Pin It on Pinterest