Presentation is loading. Please wait.

Presentation is loading. Please wait.

LAB Work 01 MBA 61062: E-Commerce

Similar presentations


Presentation on theme: "LAB Work 01 MBA 61062: E-Commerce"— Presentation transcript:

1 LAB Work 01 MBA 61062: E-Commerce

2 Step 1: Open Notepad Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.

3 Step 2: Write Some HTML <html> <head> <title> My first </title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>

4 Step 3: Save the HTML Page
Save the file on your computer. Select File > Save as in the Notepad menu. Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).

5 Step 4: View the HTML Page in Your Browser
Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with"). The result will look much like this:

6 HTML Elements An HTML element usually consists of a start tag and end tag, with the content inserted in between: <tagname>Content goes here...</tagname> The HTML element is everything from the start tag to the end tag: <p>My first paragraph.</p> HTML elements with no content are called empty elements. Empty elements do not have an end tag, such as the <br> element (which indicates a line break).

7 HTML Attributes All HTML elements can have attributes
Attributes provide additional information about an element Attributes are always specified in the start tag Attributes usually come in name/value pairs like: name="value“ E.g.: The href Attribute. HTML links are defined with the <a> tag. The link address is specified in the href attribute: <a href=" is a link</a>

8 HTML Headings HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading:  <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6>

9 HTML Paragraphs HTML paragraphs are defined with the <p> tag: Note: Browsers automatically add some white space (a margin) before and after a paragraph.

10 Exercise: Add a horizontal rule between the heading and the paragraph.

11 Answer

12 Exercise: Mark up the following text with appropriate tags: "Universal Studios Presents" is the most important content. "Jurassic Park" is the next most important content. "About" is of lesser importance than Jurassic Park. The last sentence is just a paragraph.

13 Answer

14 HTML Paragraphs… HTML Display You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results. With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code. The browser will remove any extra spaces and extra lines when the page is displayed.

15 HTML Paragraphs…

16 HTML Line Breaks The HTML <br> element defines a line break. Use <br> if you want a line break (a new line) without starting a new paragraph. The <br> tag is an empty tag, which means that it has no end tag. <p>This is<br>a paragraph<br>with line breaks.</p>

17 This poem will display on a single line:

18 The HTML <pre> Element
The HTML <pre> element defines preformatted text. The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:

19 HTML Styles: The HTML Style Attribute
Setting the style of an HTML element, can be done with the style attribute. The HTML style attribute has the following syntax: <tagname style="property:value;"> The property is a CSS property. The value is a CSS value.

20 HTML Background Color The background-color property defines the background color for an HTML element. This example sets the background color for a page to powderblue:

21 HTML Text Color The color property defines the text color for an HTML element:

22 HTML Fonts The font-family property defines the font to be used for an HTML element:

23 HTML Text Size The font-size property defines the text size for an HTML element:

24 HTML Text Alignment The text-align property defines the horizontal text alignment for an HTML element:

25 HTML Formatting Elements
HTML also defines special elements for defining text with a special meaning. HTML uses elements like <b> and <i> for formatting output, like bold or italic text. Formatting elements were designed to display special types of text:

26 HTML Formatting Elements

27 HTML Links - Hyperlinks
Links are found in nearly all web pages. Links allow users to click their way from page to page. HTML links are hyperlinks. You can click on a link and jump to another document. When you move the mouse over a link, the mouse arrow will turn into a little hand. In HTML, links are defined with the <a> tag: <a href="url">link text</a> <a href=" This is a link to SEUSL </a> Local Links <a href=“about.htm">About Us</a>

28 HTML Links - Hyperlinks
The target attribute specifies where to open the linked document. The target attribute can have one of the following values: _blank - Opens the linked document in a new window or tab _self - Opens the linked document in the same window/tab as it was clicked (this is default) <a href=" target="_blank“> This is a link to SEUSL </a>

29 HTML Links - Hyperlinks

30 HTML Images In HTML, images are defined with the <img> tag.
The <img> tag is empty, it contains attributes only, and does not have a closing tag. The src attribute specifies the URL (web address) of the image: <img src="url" alt="some_text" >

31 HTML Images

32 HTML Links - Image as Link

33 HTML Lists

34 Unordered HTML List An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items will be marked with bullets (small black circles) by default:

35 Unordered HTML List - Choose List Item Marker
The CSS list-style-type property is used to define the style of the list item marker: Value Description disc Sets the list item marker to a bullet (default) circle Sets the list item marker to a circle square Sets the list item marker to a square none The list items will not be marked

36 Ordered HTML List An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items will be marked with numbers by default:

37 Ordered HTML List - Choose List Item Marker
Ordered HTML List - The Type Attribute The type attribute of the <ol> tag, defines the type of the list item marker: Type Description type="1" The list items will be numbered with numbers (default) type="A" The list items will be numbered with uppercase letters type="a" The list items will be numbered with lowercase letters type="I" The list items will be numbered with uppercase roman numbers type="i" The list items will be numbered with lowercase roman numbers

38 Ordered HTML List - Choose List Item Marker


Download ppt "LAB Work 01 MBA 61062: E-Commerce"

Similar presentations


Ads by Google