Вы находитесь на странице: 1из 2

HTML CHEAT SHEET

STANDARD HTML DOCUMENT STRUCTURE

<!DOCTYPE>
 HTML 4.01
o <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
o <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
o <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
 XHTML 1.0
o <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
o <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
o <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html [if it uses an XHTML doctype xmlns="http://www.w3.org/1999/xhtml"]>


 Parent element of an HTML document; defines an HTML document.
 Has 2(two) child elements: head and body

<head>
<title>title of the document</title>
<meta http-equiv=”content-type” content=”text/html; charset=UTF-8”>
</head>

<body>
<!--
Visible content of the document goes here
-->
</body>
</html>

ANATOMY OF AN HTML TAG

<TAG-NAME ATTRIBUTE=”VALUE”></TAG-NAME>
 TAG-NAME = name of the HTML element
 Attributes
o Common attributes are: title(tooltip), id(unique identifier), class(class
identifier for stylesheet use) and style(for inline stylesheet)

BASIC HTML ELEMENTS

Comment <!—comment goes here -->


Document Structure
 <h[1-6]> heading
 <div> empty container block-level element
 <span> empty container inline-level element
 <p> paragraph
 <br/> line break
 <hr/> horizontal rule

Text markup
 <strong> strong emphasis
 <em> emphasis
 <blockquote> long quotation
 <q> short quotation
 <abbr> abbreviation
 <acronym> acronym
 <address> address
 <pre> pre-formatted text
 <dfn> definition
 <code> code
 <cite> citation
 <del> deleted text
 <ins> inserted text
 <sub> subscript
 <sup> superscript
 <bdo> text direction

List elements

 <ol> ordered list


 <ul> unordered list
 <li> list item
 <dl> definition list
 <dt> definition term
 <dd> term description

Table elements

 <table> table
 <caption> caption
 <thead> table header
 <tbody> table body
 <tfoot> table footer
 <colgroup> column group
 <col /> column
 <tr> table row
 <th> header cell
 <td> table cell

Image element

<img src=”” title=”” alt=””>

Src = URL of image file


Title = tooltip of image
Alt = alternative text

Вам также может понравиться