HTML5 New Elements

New Elements in HTML5 Below is a list of the new HTML5 elements, and a description of what they are used for. New Semantic/Structural Elements HTML5 offers new elements for better document structure: Tag Description <article> Defines an article <aside> Defines content aside from the page content <audio> Defines sound content <bdi> Isolates a part […]

HTML DOM Superscript Object

Superscript Object The Superscript object represents an HTML <sup> element. Access a Superscript Object You can access a <sup> element by using getElementById(): Example var x = document.getElementById(“mySup”); Try it Yourself » Create a Superscript Object You can create a <sup> element by using the document.createElement() method: Example var x = document.createElement(“SUP”); Try it Yourself » Standard […]

HTML DOM Figcaption Object

Figcaption Object  The Figcaption Object is new in HTML5. The Figcaption object represents an HTML <figcaption> element. Access a Figcaption Object You can access a <figcaption> element by using getElementById(): Example var x = document.getElementById(“myFigCap”); Try it Yourself » Create a Figcaption Object You can create a <figcaption> element by using the document.createElement() method: Example var x […]

HTML <th> char Attribute

Example Align the content of the first header cell to the “M” character: <table> <tr> <th align=”char” char=”M”>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100.00</td> </tr> <tr> <td>February</td> <td>$10.00</td> </tr> </table> Try it Yourself » Definition and Usage The <th> char attribute is not supported in HTML5. The char attribute specifies the alignment of the content in a header […]

HTML <video> preload Attribute

Example Author thinks that the video should NOT be loaded when the page loads: <video controls preload=”none”> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The preload attribute specifies if and how the author thinks that the video should be loaded when the page loads. The preload […]

HTML <audio> preload Attribute

Example Author thinks that the sound should NOT be loaded when the page loads: <audio controls preload=”none”> <source src=”https://dwfaisalabad.com/downloads/Wild_Pogo.mp3″ type=”audio/mpeg”> Your browser does not support the audio element. </audio> Try it Yourself » Definition and Usage The preload attribute specifies if and how the author thinks that the audio file should be loaded when the page […]

HTML <aside> Tag

Example <p>My family and I visited The Epcot center this summer.</p> <aside> <h4>Epcot Center</h4> <p>The Epcot Center is a theme park in Disney World, Florida.</p> </aside> Try it Yourself » Definition and Usage The <aside> tag defines some content aside from the content it is placed in. The aside content should be related to the […]

HTML <a> rel Attribute

Example A link with a rel attribute: <a rel=”nofollow” href=”https://dwfaisalabad.com/”>DW Fsd</a> Try it Yourself » Definition and Usage The rel attribute specifies the relationship between the current document and the linked document. Only used if the href attribute is present. Differences Between HTML 4.01 and HTML5 Some values are removed, and some new values are added. Syntax […]

HTML5 Style

Style Guide and Coding Conventions HTML Coding Conventions Web developers are often uncertain about the coding style and syntax to use in HTML. Between 2000 and 2010, many web developers converted from HTML to XHTML. With XHTML, developers were forced to write valid and “well-formed” code. HTML5 is a bit more sloppy when it comes […]

HTML and XHTML

XHTML is HTML written as XML. What Is XHTML? XHTML stands for EXtensible HyperText Markup Language XHTML is almost identical to HTML XHTML is stricter than HTML XHTML is HTML defined as an XML application XHTML is supported by all major browsers Why XHTML? Many pages on the internet contain “bad” HTML. This HTML code works fine in […]

HTML Links

Links are found in nearly all web pages. Links allow users to click their way from page to page. HTML Links – Hyperlinks HTML links are hyperlinks. You can click on a link and jump to another document. When you move the mouse over a link, the mouse arrow will turn into a little hand. […]