Tuesday, February 18, 2014

2: What is HTML?
HTML stands for Hypertext Markup Language
HTML is a set of Tags with opening and closing symbols which are intended for use with a web browser, such as chrome.

An example of an HTML Script


<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

3: Define Tag, Element and Attribute


Tag: A tag is the opening and/or closing of an HTML script, eg <p> to open and </p> to close.


Element: An HTML Element is everything from the start tag to the end tag, eg <p>My first paragraph.</p>


Attribute: Attributes are what is within the tag and they help provide additional information about the element, an example of this is <p>.

<p> is used to define a Paragraph.


4: Hello World!

Typing <p> Hello world! </p> into a notepad and saving it as an html file results in a web browser(chrome in this case) displaying the text "Hello world!" when opened.








5: Tab Titles 

The following text in an HTML script makes the text "My First Page" appear in the tab title.

<html>

  <head>
    <title>My First Page</title>
  </head>
</html>








6: Replacing "My First Page" with my name


<html>

  <head>
    <title>Brendan Smith</title>
  </head>
</html>







6b: Same as 7

6a: Very Simple HTML Script

<!DOCTYPE html>
<html>
<body>

<h1>Brendan Smith</h1>

<p>This is a body paragraph.</p>

</body>
</html>

<!DOCTYPE html>












6d, e & f: Comments

<!DOCTYPE html>
<html>
<body>

<!-- Comments are made by using ! in the opening tag and are not required in the end tag -->
<p>This is a paragraph.</p>
<!-- Comments are helpful for debugging lines of HTML code as you may quickly change them to and from a comment -->
<!-- Comments are also helpful to keep track or make a note of your HTML coding -->

</body>
</html>


No comments:

Post a Comment