It is a special kind of text document
that is used by Web browsers to present text and graphics.
HTML documents are often referred to as "Web pages".
Element: container and content; a piece of a documents, including sentence, paragraph, list, table, head, body, ... Tag: container (thus requires an opening tag and a closing tag), a command to control the format, not case sensitive Example: <p> content </p> where <p> is an opening tag defining a paragraph and
</p> is a closing tag. Attribute: option or parameter to a tag Rendering: a browser formats the text to display on the screen according to the formatting rules This page will introduce you to :
Note: if the web browser does not recognize any specific tags, formats, or settings, the browser will render the content based on its default styles. |
|
Definition listWhat does this look like?
|
Ordered listWhat does this look like? To deploy and test servlet |
Unordered listWhat does this look like? Commonly used HTML tags |
4640 class website
An absolute link: completes URL (e.g.,
href="schedule.html" )
|
Defines an image
<img src="../images/giphy.gif" alt="Happy face" height="50%" width="70%"> <img src="../images/giphy.gif" alt="Happy face" height="220px" width="380px"> Always use an alt attribute to describe the image.
This increases usability -- searchable, and especially when the image cannot be loaded.
Note: try resizing the screen, observe the difference between absolute vs relative height and width [Ref: Image from https://giphy.com] |
What does this look like?
|
What does this look like? Note: notice text upon hovering (Login and Reset buttons) Try autofocus attribute of an <input> element,
observe where the cursor is placed
|
Username: <input type="text" name="username" />
What does this look like? Username: |
<textarea rows="8" cols="60">
Use a disabled attribute
<textarea rows="8" cols="60" disabled>
Use a readonly attribute
<textarea rows="8" cols="60" readonly>
|
Not rendered on the screen Can be used to maintain state of web applications <input type="hidden" name="login_attempt" value="0">
|
Checkbox
<input type="checkbox" name="vehicle" value="Car"> I have a car
What does this look like? I have a car |
Drop down
Select your favorite car:
What does this look like? Select your favorite car: |
Radio button
Select your major:
What does this look like? Select your major:Note: name values must be the same |
What does this look like? What does this look like? |
button tag
<button type="button" onclick="alert('I said, Don\'t click me!')">Don't click Me!</button>
What does this look like? input tag with button type
<input type="button" onclick="alert('I said, Don\'t click me!')" value="Don't click Me!" />
What does this look like? |
<form action="target_component">
How does this look like? |
<meta http-equiv="refresh" content="0; url=http://www.cs.virginia.edu/~up3f/cs4640/schedule.html" />
To redirect a webpage to another page
|