HTML CHEAT SHEET

Transcription

HTML CHEAT SHEETHTML (Hypertext Markup Language) has come a long way since TimBerners-Lee invented it back in 1991. Today HTML5 is the standardversion and it's supported by all modern web browsers. Our HTMLcheat sheet gives you a full list of all the HTML elements, includingdescriptions, code examples and live previews. Simply scroll down tobrowse all HTML tags alphabetically or browse tags by theircategory.a elementabbr elementaddresselementarea elementarticle elementaside elementaudio elementb elementbase elementbdi elementbdo elementblockquoteelementbody elementbr e elementcode elementcol elementcolgroupelementdata elementdatalistelementdd elementdel elementdetails elementdel elementlabel elementscript elementdfn elementelementelementdetails elementdialog elementdiv elementdl elementdt elementem onelementတဠgure elementfooter elementform elementh1 to h6elementhead elementheaderelementhgroupelementhr elementhtml elementi elementiframe elementimg elementinput elementins elementkbd elementlabel elementlegendlegendli elementlink elementmain elementmap elementmark elementmenu elementmeta elementmeter elementnav elementnoscriptelementobject elementol elementoptgroupelementoption elementoutputelementp elementparam elementpre elementprogresselementq elementrp elementrt elementruby elements elementsamp elementscript elementsectionsectionselect elementsmall elementsourceelementspan elementstrong elementstyle elementsub elementsummaryelementsup elementtable elementtbody elementtd elementtextareaelementtfoot elementth elementthead elementtime elementtitle elementtr elementtrack elementul elementvar elementvideo elementwbr element

LIST OF HTML ELEMENTS BҮ CATEGORҮAn HTML element (or tag) is an individual component of an HTMLdocument. Here below is a full list of HTML elements listed bycategory.Basic TMLElementsContentElementsContentTable HTMLImages &HTMLForm HTMLHTMLGroupingElementsText LevelSemanticHTMLElementsTable ltimediaElementsGlobal HTMLAttributesNew Tags inHTML5Images &HTML TAGSpeciတဠes an html document. The HTML html element (or HTMLroot element) represents the root of an HTML document. All otherelements must be descendants of this element. Since the html element is the တဠrst in a document other than comments, it is calledthe root element. Although this tag can be implied, or not required,with HTML, it is required to be opened and closed in XHTML.Attributes (modiတဠers)xmlns global attributesCode example !DOCTYPE html html head . /head body . /body /html Back to categories

BASE TAGSpeciတဠes URL which non-absolute URLs are relative to. The HTML base element speciတဠes the base URL to use for all relative URLscontained within a document. There can be only one base elementin a document.Attributes (modiတဠers)href target ( self blank parent top) global attributesCode example basehref "http://www.DIGITAL.COM/page.html" HEAD TAGFirst element of the HTML document. Collection of metadata for theDocument. The HTML head element provides general information(metadata) about the document, including its title and links to itsscripts and style sheets.Attributes (modiတဠers)Global attributesCode example html head title Document title /title /head /html LINK TAGOther resources related to the document. The HTML link elementspeciတဠes relationships between the current document and anexternal resource. Possible uses for this element include deတဠning arelational framework for navigation. This Element is most used tolink to style sheets.Attributes (modiတဠers)

Attributes (modiတဠers)href rel media hre†ဠang type sizes crossorigin integrity global attributesCode example link href "style.css" rel "stylesheet" META TAGDocument metadata that can't be expressed with other elements.The HTML meta element represents any metadata informationthat cannot be represented by one of the other HTML meta-relatedelements ( base , link , script , style or title ). Depending onthe attributes set, the kind of metadata can be one of the following:If name is set, it is document-level metadata, applying to the wholepage. If http-equiv is set, it is a pragma directive, i.e. informationnormally given by the web server about how the web page should beserved. If charset is set, it is a charset declaration, i.e. the charsetused for the serialized form of the webpage. If itemprop is set, it isuser-deတဠned metadata, transparent for the user-agent as thesemantics of the metadata is user-speciတဠc.Attributes (modiတဠers)charset content http-equiv name global attributesCode example meta charset "utf‐ " STҮLE TAGEmbed style information in the documents. The HTML style element contains style information for a document, or part of adocument. By default, the style instructions written inside thatelement are expected to be CSS.Attributes (modiတဠers)media type title global attributesCode example

style type "text/css" body {color:red;} /style TITLE TAGDocument title or name. The HTML title element deတဠnes the titleof the document, shown in a browser's title bar or on the page's tab.It can only contain text, and any contained tags are ignored.Attributes (modiတဠers)Global attributesCode example title This is the page title /title Back to categoriesADDRESS TAGThe HTML address element supplies contact information for itsnearest article or body ancestor; in the latter case, it applies tothe whole document.Attributes (modiတဠers)Global attributesCode example address Review Squirrel br ElizabethStreet br Sydney br Australia /address ARTICLE TAGSection of the page content, such as a blog or forum post. The HTML

Section of the page content, such as a blog or forum post. The HTML article element represents a self-contained composition in adocument, page, application, or site, which is intended to beindependently distributable or reusable (e.g., in syndication). Thiscould be a forum post, a magazine or newspaper article, a blog entry,an object, or any other independent item of content. Each article should be identiတဠed, typically by including a heading ( h1 - h6 element) as a child of the article element.Attributes (modiတဠers)Global attributesCode example article class "ureview" p I love this tool. /p footer p Posted on time datetime " 0:00" May‐0 ‐ /time by Matt. /p /footer /article ASIDE TAGContent related to surrounding elements that doesn't belong inline,such as a advertising or quotes. The HTML aside elementrepresents a section of the page with content connected tangentiallyto the rest, which could be considered separate from that content.These sections are often represented as sidebars or inserts. Theyoften contain the deတဠnitions on the sidebars, such as deတဠnitionsfrom the glossary; there may also be other types of information,such as related advertisements; the biography of the author; webapplications; proတဠle information or related links on the blog.Attributes (modiတဠers)Global attributesCode example article p The Disney movie em The LittleMermaid /em was

first released to theatres in. /p aside The movie earned million during itsinitial release. /aside p More info about the movie. /p /article BODҮ TAGMain content of the document. The HTML body Elementrepresents the content of an HTML document. There can be only one body element in a document.Attributes (modiတဠers)onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onlanguagechange onload onmessage ono††ine ononline onpopstate onredo onresize onstorage onundo onunload global attributesCode example html head title Here goes the title of thedocument /title /head body Here goes the he content of thedocument. /body /html FOOTER TAGFooter of the current section. The HTML footer elementrepresents a footer for its nearest sectioning content or sectioningroot element. A footer typically contains information about theauthor of the section, copyright data or links to related documents.Attributes (modiတဠers)

Attributes (modiတဠers)Global attributesCode example footer Some copyright info goes here /footer H1 TO H6 TAGHeading for the current section. Heading elements implement sixlevels of document headings, h1 is the most important and h6 isthe least. A heading element brie†ဠy describes the topic of thesection it introduces. Heading information may be used by useragents, for example, to construct a table of contents for a documentautomatically.Attributes (modiတဠers)Global attributesCode example h Heading level /h h Heading level /h h Heading level /h h Heading level /h h Heading level /h h Heading level /h HEADER TAGNavigation or introductory elements for the current section. TheHTML header element represents a group of introductory ornavigational aids. It may contain some heading elements but alsoother elements like a logo, wrapped section's header, a search form,and so on.Attributes (modiတဠers)Global attributesCode example header Logo /header

HGROUP TAGThe HTML hgroup Element (HTML Headings Group Element)represents the heading of a section. It deတဠnes a single title thatparticipates in the outline of the document as the heading of theimplicit or explicit section that it belongs to. Its text for the outlinealgorithm is the text of the တဠrst HTML Heading Element of highestrank (i.e., the တဠrst h1 , h2 , h3 , h4 , h5 or h6 with thesmallest number among its descendants) and the rank is the rank ofthis very same HTML Heading Element. Therefore this elementgroups several headings, contributing only the main one to theoutline of the document. It allows associating secondary titles, likesubheadings, alternative titles, or even taglines, with the mainheading, without polluting the outline of the document.Attributes (modiတဠers)Global attributesCode example hgroup h Main title /h h Secondary title /h /hgroup NAV TAGA section of a page that links to other pages. The HTML nav element (HTML Navigation Element) represents a section of a pagethat links to other pages or to parts within the page: a section withnavigation links.Attributes (modiတဠers)Global attributesCode example nav ul li a href "#" Home /a /li li a href "#" About us /a /li li a href "#" Contact us /a /li /ul /nav

SECTION TAGContains of elements grouped by theme, for example a chapter ortab box. The HTML section element represents a generic section ofa document, i.e., a thematic grouping of content, typically with aheading. Each section should be identiတဠed, typically by including aheading ( h1 - h6 element) as a child of the section element.Attributes (modiတဠers)Global attributesCode example section h Heading /h p Bunch of awesomecontent /p /section BLOCKQUOTE TAGQuote from another source. The HTML blockquote Element (orHTML Block Quotation Element) indicates that the enclosed text is anextended quotation. Usually, this is rendered visually by indentation(see Notes for how to change it). A URL for the source of thequotation may be given using the cite attribute, while a textrepresentation of the source can be given using the cite element.Attributes (modiတဠers)cite global attributesCode example blockquote cite "https://DIGITAL.COM" p This is a quote taken from Review Squirrel. /p /blockquote Back to categoriesBR TAGLine break. The HTML element line break br produces a line break

Line break. The HTML element line break br produces a line breakin text (carriage-return). It is useful for writing a poem or an address,where the division of lines is signiတဠcant. Do not use br to increasethe gap between lines of text; use the CSS margin property or the p element.Attributes (modiတဠers)Global attributesCode example p Review Squirrel br ElizabethStreet br Australia /p DD TAGDescription, deတဠnition, or value, part of a term- description group ina description list. The HTML dd element (HTML DescriptionElement) indicates the description of a term in a description list( dl ) element. This element can occur only as a child element of adescription list and it must follow a dt element.Attributes (modiတဠers)Global attributesCode example dl dt Review Squirrel /dt dd Helps you find the best tools forrunning a small business website /dd /dl DIV TAGContainer or section with no semantic meaning. The HTML div element (or HTML Document Division Element) is the genericcontainer for †ဠow content, which does not inherently representanything. It can be used to group elements for styling purposes(using the class or id attributes), or because they share attributevalues, such as lang. It should be used only when no other semanticelement (such as article or nav ) is appropriate.Attributes (modiတဠers)

Attributes (modiတဠers)Global attributesCode example div p Any kind of content here. Such as p , table . You name it! /p /div DL TAGAn association list consisting of zero or more name-value groups (adescription list). The HTML dl element (or HTML Description ListElement) encloses a list of pairs of terms and descriptions. Commonuses for this element are to implement a glossary or to displaymetadata (a list of key-value pairs). Prior to HTML5, dl was knownas a Deတဠnition List.Attributes (modiတဠers)Global attributesCode example dl dt Review Squirrel /dt dd Helps you find the best tools forrunning a small business website /dd /dl DT TAGTerm, or name, part of a term-description group in a description list.The HTML dt element (or HTML Deတဠnition Term Element) identiတဠesa term in a deတဠnition list. This element can occur only as a childelement of a dl . It is usually followed by a dd element; however,multiple dt elements in a row indicate several terms that are alldeတဠned by the immediate next dd element.Attributes (modiတဠers

HTML CHEAT SHEET Berners-Lee invented it back in 1991. Today HTML5 is the standard version and it's supported by all modern web browsers. Our HTML cheat sheet gives you a full list of all the HTML elements, including descriptions, code examples and live previews. Simply scroll down to browse all HTML tags alphabetically or browse tags by their category. a element abbr element address element .