Rulismith's Posts
Nairaland Forum › Rulismith's Profile › Rulismith's Posts
1 (of 1 pages)
This is the story of a bunch of HTML5 attributes that just made you a rockstar, helping you to accomplish hard stuff in a simpler and easy way. Your mind will blow with too many ideas on how you can and will usem then right now. Lets do it! 1..contenteditable The contenteditable attribute is new in HTML5 and specifies whether the content of an element is editable or not. When the contenteditable attribute is not set on an element, the element will inherit it from its parent. <p contenteditable='true'>Start writing now...</p> 2..draggable The draggable attribute is new in HTML5 as well and specifies whether an element is draggable or not. Drag and drop is a very common feature nowadays improving even more the user interaction and experience to accomplish certain objective in a website or app. It is when you “grab” an object and drag it to a different location. In HTML5, drag and drop is part of the standard: Any element can be draggable. <p draggable='true'>Drag this to another area!</p> 3..hidden The hidden attribute is new in HTML5 that when present, it specifies that an element is not yet, or is no longer, relevant. Browsers should not display elements that have the hidden attribute specified. <p hidden>This paragraph should be hidden!</p> 4...spellcheck The spellcheck attribute specifies whether the element is to have its spelling and grammar checked or not. You can set this attribute in: <input> elements (not password) <textarea> elements contenteditable elements 5..pattern The pattern attribute specifies a regular expression that the <input> element's value is checked against. This attribute works on forms with the following input types: text, search, url, tel, email, and password. <input pattern="[0-9]{4}"> |
1 (of 1 pages)