0% found this document useful (0 votes)
66 views

HTML Key Points: Tags

HTML documents contain tags that specify the structure and semantics of content. The <!DOCTYPE html> declaration identifies the document as HTML5. The <html> tags enclose all other tags, with <head> containing metadata like the <title> and <body> containing visible content. Common block-level tags include <p> for paragraphs, <h1>-<h6> for headings, <ul>/<ol> for unordered/ordered lists, and <div> for sections. Inline text styling is provided by tags like <b> for bold, <i> for italic, and <br> for breaks.

Uploaded by

Aldo Hall
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

HTML Key Points: Tags

HTML documents contain tags that specify the structure and semantics of content. The <!DOCTYPE html> declaration identifies the document as HTML5. The <html> tags enclose all other tags, with <head> containing metadata like the <title> and <body> containing visible content. Common block-level tags include <p> for paragraphs, <h1>-<h6> for headings, <ul>/<ol> for unordered/ordered lists, and <div> for sections. Inline text styling is provided by tags like <b> for bold, <i> for italic, and <br> for breaks.

Uploaded by

Aldo Hall
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

HTML Key Points

• To specify HTML5 as the document type, add <!DOCTYPE html> at the beginning of the file.
• All the HTML coding in a document (except the DOCTYPE) is enclosed within a two-sided <html>
tag.
• The <html> and </html> tags enclose the <head> and <body> sections.
• The <head> area contains the page title (<title>) and any <meta> tags. The <body> area
contains all the displayable text for the page.
• Enclose each paragraph in a two-sided <p> tag. Most browsers add space between paragraphs
when displaying the page.
• To create a line break without starting a new paragraph, use the one-sided <br> tag.
• Use the <title> and </title> tags to enclose the text that should appear in the browser’s title
bar. Place these in the <head> section of the file.
• Most tags are based on function, not formatting. They specify that text has a certain function,
such as a heading or quotation, rather than specifying a certain way it should appear.
• The exact formatting (the appearance) applied to tagged text is controlled by the default settings
of the browser, by individual user customization, or by styles.
• Define headings by using the tags <h1> through <h6> (largest to smallest).
• To make text bold, use the <b> tag; to italicize it, use the <i> tag.
• The tag for superscript is <sup>; the tag for subscript is <sub>.
• To create a numbered (ordered) list, use the <ol> tags. For a bulleted (unordered) list, use the
<ul> tags.
• Within the <ol> or <ul> tags, use <li> tags for each list item. These tags are all two-sided. HTML
does not require the closing </li>, but XHTML does.
• Ordered and unordered lists can be nested. Enclose the second-level <ul> or <ol> list within a
<li></li> tag inside the main list.
• To use a different bullet character or numbering style, use the style=”list-style-type: type”
attribute in the <ul> or <ol> opening tag.
• To create a definition list, use the <dl></dl> tags. Within the <dl> tags, enclose each term in a
<dt></dt> tag, and enclose each definition in a <dd></dd> tag.
• You can display special characters on a Web page by using HTML character entity references.
• To insert a horizontal line, use the <hr> tag. This is a one-sided tag. Put any specifications for
the line within it, such as color, height, and width.
• You can specify colors by using basic or extended names, RGB values, or hexadecimal values.
• To assign a background color to a page, insert a style=”background-color: color” attribute into
the <body> opening tag. For a foreground color, use style=”color: color”. These attributes can
be combined into a single statement with a semicolon separator, like this: style=”background-
color: red; color: white”.
• To assign a background image to a page, insert a style=”background-image: image” attribute
into the <body> opening tag.

You might also like