Codes For HTML
With these HTML codes, the hard work has already been done for you. All you need to do is copy/paste, or copy/modify/paste. Easy!
Text Codes
- HTML Bold
- <p style="font-weight:bold;">font-weight: bold</p>
- Font Code
- <p style="font:italic small-caps bold 18px/24px Garamond, Georgia, Times, Serif;width:200px;">Sample text to demonstrate HTML font code.</p>
- Text Color
- <p style="color:blue;">You can change the text color of a whole sentence or paragraph...</p>
- <p>...or you can change the text color of one <span style="color:green;">word</span> or even a single l<span style="color:red;">e</span>tter.</p>
HTML Tables
- Table Background Color
- <table style="background-color:#FFFFE0;">
- <tr>
- <th>Table Header</th><th>Table Header</th>
- </tr>
- <tr>
- <td>Table cell 1</td><td>Table cell 2</td>
- </tr>
- <tr>
- <td>Table cell 3</td><td>Table cell 4</td>
- </tr>
- </table>
- Table Text
- <table border="1" style="font-family:Georgia, Garamond, Serif;color:blue;font-style:italic;">
- <tr>
- <th>Table Header</th><th>Table Header</th>
- </tr>
- <tr>
- <td>Table cell 1</td><td>Table cell 2</td>
- </tr>
- <tr>
- <td>Table cell 3</td><td>Table cell 4</td>
- </tr>
- </table>
Link Codes
- HTML Image Link
- <a href="https://en.wikipedia.org/wiki/Boracay" target="_blank"><img src="//www.html.am/images/html-codes/links/boracay-white-beach-sunset-300x225.jpg" width="300" height="225" alt="Photo of White Beach in Boracay, Philippines" style="border:1px solid black;" /></a>
- Email Link
- <a href="mail:barney@example.com">email us today Today!</a>
- Open in New Window
- <p><a href="http://phoenx3.blogspot.com" target="_blank">Create a website</a> (Link opens in new window)</p>
- Remove Underline
- <p><a href="//Hydra 007 (hydra007blog.blogspot.com)/">Normal link</a></p>
- <p><a style="text-decoration:none;" href="//Hydra 007 (hydra007blog.blogspot.com)/">Underline removed</a></p>
Image Codes
- Background Image Code
- <div style="background-image:url(//www.html.am/images/image-codes/milford_sound_t.jpg);width:220px;height:140px;color:black;font-size:18px;">
- This text appears in front of the background image.
- </div>
- HTML Image Borders
- <img style="border:1px solid black;" src="//www.html.am/images/image-codes/milford_sound_t.jpg" width="225" height="151" alt="Photo of Milford Sound in New Zealand" />
- Repeat Image
- <div style="background-image:url(//www.html.am/images/backgrounds/background-image-2.gif);width:400px;height:400px;border:1px solid black;padding:10px;">
- <p>This text is displayed in front of the repeating image. That's because it's a <a href="//www.html.am/html-codes/image-codes/background-image-code.cfm">background image</a>, as opposed to a normal image that has been defined using normal <a href="//www.html.am/html-codes/image-codes/">image code</a>.</p>
- </div>
0 Comments