Open main menu

Exam 98-383: Introduction to Programming using HTML and CSS/Understand HTML Fundamentals

ReadingsEdit

ActivitiesEdit

Construct markup that uses metadata elementsEdit

Includes script; noscript; style; link; meta tags, including encoding, keywords, viewport, and translate.

scriptEdit

The HTML <script> element is used to embed or refer to an executable code; this is typically used to embed or refer to JavaScript code.[2]

Examples:

<script src="javascript.js"></script>

<script>
  document.write("Hello Wikiversity!");
</script>

noscriptEdit

The HTML <noscript> element defines a section of HTML to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.[3][4]

Example:

<noscript>Your browser does not support JavaScript!</noscript>

styleEdit

The HTML <style> element contains style information for a document, or part of a document.[5]

Example:

<style>
body {
  color: blue;
}
</style>

linkEdit

The HTML <link> element specifies relationships between the current document and an external resource.[6]

Example:

<head>
  <link href="style.css" rel="stylesheet" type="text/css">
</head>

meta tagsEdit

The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements.[7][8][9][10]

Examples:

<head>
  <meta charset="UTF-8">
  <meta name="keywords" content="HTML,CSS">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="google" content="notranslate">
  <meta http-equiv="refresh" content="60">
</head>

Construct well-formed markup that conforms to industry best practicesEdit

Includes DOCTYPE declaration; HTML; head; body; proper syntax, including closing tags and commonly used symbols; comments

DOCTYPEEdit

In HTML, the doctype is the required <!DOCTYPE html> preamble found at the top of all documents.[11]

Example:

<!DOCTYPE html>

htmlEdit

The HTML <html> element represents the root (top-level element) of an HTML document.[12]

Example:

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
  </body>
</html>

headEdit

The HTML <head> element provides general information (metadata) about the document, including its title and links to its scripts and style sheets.[13]

Example:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Page Title</title>
    <link href="style.css" rel="stylesheet">
    <script src="javascript.js"></script>
  </head>
  <body>
  </body>
</html>

bodyEdit

The HTML <body> Element represents the content of an HTML document.[14]

Example:

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <h1>Heading</h1>
    <p>Content</p>
  </body>
</html>

Common SymbolsEdit

An HTML entity is a piece of text ("string") that begins with an ampersand (&) and ends with a semicolon (;). Entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces).[15][16]

Example:

&nbsp;  <!-- non-breaking space -->
&lt;    <!-- less than -->
&gt;    <!-- greater than -->
&amp;   <!-- ampersand -->
&quot;  <!-- double quote -->
&apos;  <!-- single quote -->

CommentsEdit

Comments are represented in HTML and XML as content between <!-- and -->.[17][18]

Example:

<!-- This is a comment. -->

See AlsoEdit

ReferencesEdit