HTML

58K

Solutions

30K

Contributors

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.

Share tech news, updates, or what's on your mind.

Sign up to Post

Lists and Links
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
0
On Demand Webinar: Networking for the Cloud Era
LVL 9
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Flexible Layouts
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
0
Introduction to PHP: Building the Form
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing.

1. Set up your basic HTML file. Open your form tag and set the method and action attributes.


<!DOCTYPE html>
<html>
	<head>
		<title>My first php script</title>
	</head>
	<body>
		<form method="post" action="process.php">

Open in new window

2. Set up your first few inputs one for the name and the gender.

A simple set of radio buttons will do here.
<label>Name: <input type="name" name="fullname" placeholder="Enter your name here."></label>
<label>Gender: <input type="radio" name="gender" value="M" checked>Male  <input type="radio" name="gender" value="F">Female</label>

Open in new window

3. Label the date of birth field, setup a few select boxes that will use PHP to loop through respectively to get the month, day and year.


<label>Birthday: <select name="month">
				<?php for($m=1; $m<=12; $m++){
							echo "<option value=".$m.">".$m."</option>";
				} ?>
				</select>/
				<select name="day">
				<?php for($d=1; $d<=31; $d++){
							echo "<option value=".$d.">".$d."</option>";
				} ?>
				</select>/
				<select name="year">
				<?php for($y=1880; $y<=2014; $y++){
							echo "<option value=".$y.">".$y."</option>";
				} ?></select>
			</label>

Open in new window

4. Set up a field for the email address.


<label>E-mail: <input type="email" name="emailaddy" placeholder="Enter your best email address."></label>

Open in new window

5. Label the randomized ID # as ID #. Set the variable for this ID number and put it into a hidden field.


<label>My ID #: <?php $nyid=rand(0,199999); echo $myid; ?>
			<input type="hidden" value="<?php echo $myid; ?>"></label>"][/step]
[step="6" title="Set your submit button and close out the form and page.

			<label><input type="submit" name="saveme" value="Send Profile"></label>
		</form>
	</body>
</html>

Open in new window

1
Introduction to jQuery (Part 1)
The viewer will learn the basics of jQuery, including how to invoke it on a web page.

1. Reference your jQuery libraries

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

Open in new window

2. Include your new external js/jQuery file

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

Open in new window

3. Write your first lines of code to setup your site for jQuery.

jQuery(document).ready(function($){
});

Open in new window

1
 
LVL 12

Expert Comment

by:Mortaza Doulaty
DOM stands for Document Object Model, not Direct Object Model.
0
Introduction to CSS (Part 2)
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors.

1. Create your external css file by saving it as style.css then set up your style tags


<style>

</style>

Open in new window

2. Reference the nav tag and set your properties.


nav {position relative; left: 0; top:10%;}

Open in new window

3. Set the reference for the UL element and styles for it as well as setting the background color to green


nav>ul {list-style-type: none; width:100%; height:1.5em; padding:0; margin:0; background-color:#00FF00;}

Open in new window

4. Position the list elements in line on one row with a width of 60 pixels making sure to give 5 pixels of padding in between


 nav>ul>li{display:inline; width:60px; padding:5px;}

Open in new window

5. Set a class selector to be used on the links with no underline for the link a background color of purple and text color of white


.navlinks{color:#ffffff; background-color:#FF00FF; text-decoration:none;}

Open in new window

6. Setup your navigation as such:


<nav>
		<ul>
				<li><a class="navlinks" href="#">Home</a></li>
				<li><a class="navlinks" href="#">Contact</a></li>
				<li><a class="navlinks" href="#">About</a></li>
		</ul>
</nav>

Open in new window

0
 
LVL 9

Expert Comment

by:Rowby Goren
Hi

Van you post a link to part one of your series,

Thanks

...RRowby
0
Introduction to CSS (Part 1)
The viewer will receive an overview of the basics of CSS showing inline styles.

1. In the head tags set up your style tags


<style>

</style>

Open in new window

2. Reference the nav tag and set your properties.

nav {position relative; left: 0; top:10%;}

Open in new window

3. Set the reference for the UL element and styles for it to ensure no browser defaults are present

nav>ul {list-style-type: none; width:100%; height:3em; padding:0; margin:0;}

Open in new window

4. Position the list elements in line on one row with a width of 60 pixels

nav>ul>li{display:inline; width:60px;}

Open in new window

5. Create your navigation menu as follows


			<nav>
				<ul>
					<li class="mysite"><a href="#">Home</a></li>
					<li class="mysite"><a href="#">Contact</a></li>
					<li class="mysite"><a href="#">About</a></li>
				</ul>
			</nav>

Open in new window

0
Embedded Flash in HTML5
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5.

1. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>"

2. Use the <object> tag to embed Flash content.

3. To specify that the object is Flash content, define its type using "type='application/x-shockwave-flash'"

4. Define the source of the Flash content by typing "data='Flash.swf'"

5. Other properties of the Flash content can be styled as well, such as width, height, and border

6. Close the object tag using </object>

7. Create a parameter defining the movie by typing <param name="movie". Set the value to the URL of your Flash content by typing value="Flash.swf". Close the tag the same way an <img> tag is close, by typing /> (there is no specific closing tag). Place this <param> tag before the closing </object> tag

8. Optional: Create a parameter defining the playback quality by typing <param name="quality". Set the value of the playback quality by typing value="" and placing either low, medium, or high within the quotation marks. Close the tag the same way an <img> tag is close, by typing /> (there is no specific closing tag). Place this <param> tag before the closing </object> tag

0
Embedded Audio in HTML5
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5.

1. Ensure your DOCTYPE declaration is set to HTML5:

The declaration should display
<!DOCTYPE html>

Open in new window

HTML5 is supported by the most recent versions of all major browsers.

2. Begin your audio tag and define the source of the audio file

The source should reference your audio file's URL inside the single quotation (similar to the <img> tag's src). Complete the tag using a closing audio tag.
<audio src="Audio.mp3">
</audio>

Open in new window

3. Include the player controls if desired

Controls are helpful since they allow visitors to pause and adjust volume on your player. Type "controls" within your opening audio tag after your source file to include them.

4. Add additional properties you'd like the player to have

To loop the audio on the page, type "loop" after the source within the opening tag.
To have the audio autoplay as soon as the page loads, type "autoplay" after the source within the opening tag.

5. Include a message for visitors whose browsers do not support HTML 5.

The message (or image) you use is inserted between the <audio> and </audio> tags
0
Corner Ribbon Effect in CSS
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS

1. Create a new class by typing ".Ribbon"

2. Define the class' "display:" as "inline-block"

3. Define its "position:" as "relative"

4. Define its "overflow:" as "hidden" to achieve the "folded-over" effect

5. Define its "padding:" to specify the distance the ribbon will be from the image (how high it'll "hover")

6. Now style all paragraphs within the class by typing ".Ribbon p" - Define its "display:" as "inline-block", its "position:" as "absolute", and place it 0px from the top and -45px from the left. - Define its "text-align:" as "center" - Define "background-color:" to specify a color for the ribbon - Define "width:" to specify the length of the ribbon; for a shorter ribbon in the very corner go with a smaller value - Create the diagonal ribbon effect by defining the "transform:" property to rotate(-45deg). Note that the degree of transformation is the same as the left positioning - Add a drop shadow with the "box-shadow:" property. Note for maximum browser compatibility, both the "transform:" and "box-shadow:" properties will need to be copied over with compatibility prefixes

7. To use the ribbon, in the HTML place both an image and a paragraph inside the <div> tag for the class you created. Inside the paragraph, type the text you want on the ribbon

3
Box Shadow Effect in CSS
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property

1. Start with a normal styled element, such as a div.

2. In the element's style, type the box shadow property: "box-shadow:"

3. Define the shadow's appearance using four different measurements and a color

4. The first pixel measurement is the horizontal position of the shadow; positive values move the shadow to the right and negative values move the shadow to the left of the lement

5. The second pixel measurement is the vertical position of the shadow; positive values move the shadow down and negative values more the shadow to the top of the element

6. The third pixel measurement is optional, but it adjusts the blur of the shadow; a value of 0 will lead to a shadow with straight edges; a higher value will lead to a blurrier, less defined shadow

7. The third pixel measurement is also optional and adjusts the overall size of the shadow; a larger value will result in a more spread out shadow that is further from the element

8. The color can be defined by a hex code or even an RGBA value

9. For maximum browser compatibility, the box-shadow property should be copied and pasted, each time with a different compatibility prefix (-webkit-, -moz-, and -o-)

4
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Alpha Transparency in CSS
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS

1. Start with a normal styled element, such as a div.

2. Define its "background-color" property as "rgba (255, 255, 255, .5)

3. The numbers in the parentheses symbolize the Red, Green, Blue, and Alpha Transparency values of the color

4. To find the RGB values of a color, you can use Adobe Photoshop in RGB Color mode and use the Color window (Windows > Color)

5. The RGB combination (255, 255, 255) indicates white; (0, 0, 0) would indicate black

6. The Alpha value is for transparency and must be a number from 0 through 1; 0 indicates complete transparency while 1 indicates a completely opaque element so .5 will be 50% transparent

7. Using different numbers for the R, G, and/or B values will result in a colored translucent background

0
Using z-index Positioning in CSS
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.

1. Create a new HTML document with an internal stylesheet.

2. Create a div in CSS and name it Red. Define its position as relative. Define its position as top:10px and left:50px. Define its dimensions 500px by 500px. Define its background-color as red.

3. Create another div and name it Blue. Define its position as absolute. Define its position as top:40px and left:20px. Define its dimensions as 300px by 300px. Define its background-color as blue.

4. Create another div and name it Yellow. Define its position as relative. Define its position as top:30px and left:20px. Define its dimensions as 100px by 100px. Define its background-color as yellow.

5. Create another div and name it Green. Define its position as absolute. Define its position as top:200px and left:100px. Define its dimensions as 50px by 50px. Define its background-color as green.

6. In the HTML, type the tags for all of the divs. Place the Yellow div inside the Red div. Place the Green div before the Blue div.

7. Define div.Red's z-index as 1. Define div.Blue's z-index as 2. Define div.Yellow's z-index as 100. Define div.Green's z-index as 100.

8. When the Green div's z-index is default, it appears below the Blue div because of normal CSS stacking rules. When its z-index is set higher than the Blue z-index, it appears on top of the Blue div. The Yellow div doesn't appear on top of the Blue div despite its higher z-index because its nexted inside the Red div, which has a lower z-index.

0
Navigation Hover Effects with CSS Sprites
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS
(Continuation of the CSS Image Sprite tutorial)

1. Create a parent ID for all the list items - Specify position: absolute and display: block

2. Style all the links in the parent ID to have equal height and display:block as well

3. Specify IDs for each icon - For each ID, specify the width of the icon and the left-position of it - Set the image as the background of the list item, but specify the location of the icon within the image

4. Specify a:hover properties for each ID - Copy the background property of the original IDs, just adjust the y coordinate

5. Set up the list in HTML - Use an unordered list with the parent ID and list items with the IDs created for each icon

1
Creating Scalable Full-Width Header in CSS3
In this tutorial viewers will learn how add a scalable full-width header using CSS3.

1. Create a new HTML document with an internal stylesheet. Set a tiled background.

2. Create a new div and name it Header. Position it with position:absolute at the top left of the page.

3. Define its height as 500px and width as 100%.

4. Define its background image using the background: property. Use a high resolution image. Before closing the background property, specify the image as no-repeat and centered.

5. Define the background-size property as cover.

6. For browser compatibility, copy the background-size property with prefixes of -webkit-, -moz-, and -o-.

7. Add an optional border and box-shadow for effect.

8. In the HTML, type the tag for the Header div.

1
 
LVL 34

Expert Comment

by:Mike Eghtebas
Thank you.
0
Creating Scalable Full-Page Backgrounds in CSS3
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3.

1. Create a new HTML document with an internal stylesheet.

2. In CSS, define the html element to have a background image. Use a high resolution image.

3. In the same background property specify it as no-repeat, centered, and fixed.

4. Define the background-size property (unique to CSS3) as "cover".

5. Redefine the background-size property with prefixes of -webkit-, -moz-, and -o- for browser compatibility.

6. Create a div and name it Content. Set its width as 40%, height as 100%, position to absolute, and left to 25%. Define its background color as white.

7. In the HTML type the tag for the Content div.

1
Creating Gradients in CSS
In this tutorial viewers will learn how to define a gradient in CSS.

1. Create a new HTML document with an internal stylesheet.

2. Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you specify a direction and start and end colors.

3. Create a new div in CSS and name it Gradient2. Define the background as "linear-gradient(45deg, #ee3668, black, rgba(255,0,0,1))" This is an example of multiple color stops and transparency.

4. Create a new div in CSS and name it Gradient3. Define the background as "radial-gradient(#ee3668 10%, white 45%, black)". Ensure you specify colors and percentages. This is an example of a radial gradient with defined color stops.

5. Style the h1 element to be white text.

6. In the HTML, type the tag for the Gradient div. Inside the Gradient div, type some text inside an h1 tag. Do the same for the other divs.

1
HTML Programming: Forms
Learn how to create HTML web forms.

1. Overview of form element

2. Overview of radio button inputs

3. Overview of select elements

4. Overview of checkbox inputs

5. Overview of the label element

6. Overview of text inputs and text areas

7. Overview of submit buttons

1
HTML Programming: Navigation
Learn how to create horizontal web site navigation with HTML and CSS.

1. Download the HTML 5 Boilerplate and open index.html and main.css in your text editor

2. Make an unordered list of links

3. Remove default list styles

4. Style list items

5. Style anchor elements

6. Nest a sub menu

7. Style the sub menu

0

HTML

58K

Solutions

30K

Contributors

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.