SlideShare a Scribd company logo
1 of 21
How to code Radio
Buttons in HTML5
and CSS Styling
Introduction
• This slide show is designed to explain how to use the <input
  type=“radio”> tag in HTML, how to use CSS to format the
  radio button and how to use both CSS and HTML together to
  achieve a desired look.
Hints
There are 2 important hints that we need to remember:
• To open and close each tag
• To indent 3 spaces
What are Radio Buttons?
• Radio Buttons are used to represent one of a set of options,
  only one of which can be selected at any time. Example is the
  quiz we are about to make.
Creating the form
 We need to define the document type. You do this at the top of
the page by using

<!DOCTYPE html>
<html>
       <head>
              <title> Radio Buttons</title>
       </head>
       <body>
       <h1> Animals Quiz</h1>
       </body>
</html>
We need to declare it’s a form. Underneath <body> we insert
 <h1>Animals Quiz</h1>
  <form>
  <fieldset>
       <legend> What is your favourite animal?</legend>



  </fieldset>
  <br>
  </form>
The Radio button
We will create a radio button group. Below is the question and
the set of options that we are going to code.

What is your favourite animal?
• Tiger
• Monkey
• Eagle
Radio Button in HTML
To achieve the function of the radio button, we have the input
type which indicates what the element will be, for ours we put
“radio”
• <input type=“radio”
The name is the group of buttons. In this case it will be
• name=“animal”
We are going to add a value= usually defines something that’s
going to be written.
• value=“Tiger”
The id is the same name as the value
• id=“Tiger”/>
We are going to put a label on the button so they know which
one to pick.
• <label for=“Tiger”>Tiger</label><br/>
What our form should look like
<form>
         <fieldset>
                   <legend> What is your favourite animal?</legend>

                   <input type="radio" name="animal" value="Tiger" id="Tiger"/>
                   <label for="Tiger">Tiger</label><br/>
                   <input type="radio" name="animal" value="Bear" id="Bear"/>
                   <label for="Bear">Bear</label><br/>
                   <input type="radio" name="animal" value=“Eagle id=“Eagle"/>
                   <label for=“Eagle">Eagle</label><br/>
         </fieldset>
         <br>
<form>
Form Controls
We are going to put in Form Controls. This allows the user to
Reset and Submit the form. We write
<p> Form Controls</p>
<input type=“submit” value=“Submit” /><br>
<input type=“reset” value=“Reset”/>
Footer
We can enter a <div> tag, this defines a section in the page. This
goes just after the close of the form and before the closing of the
body as shown below.

<div id="footer">
         <p> Made by AimeeKyra</p>
        </div>
        </body>
</html>
What your code should look
like
<!DOCTYPE html>
<html>

     <head>
           <title> Radio Buttons </title>
     </head>
     <body>
                 <h1> Animals Quiz </h1>
     <form>
                 <fieldset>
                          <legend> What is your favourite animal?</legend>

                                     <input type="radio" name=“animal" value=“Tiger id=“Tiger” />
                                     <label for=“Tiger” >Tiger </label><br />
                                     <input type="radio" name=“animal” value="Monkey" id=“Monkey" />
                                     <label for=“Monkey”>Monkey</label><br />
                                     <input type="radio" name=“animal" value=“Eagle id=“Eagle
                                     <label for=“Eagle” >Eagle</label><br />
                  </fieldset>
                  </br>

                  <p>Form controls </p>
                  <input type="submit" value="Submit"/> <br>
                  <input type="reset" value="Reset"/>
     </form>

     <div id="footer">
     <p> Made by AimeeKyra</p>
     </div>
     </body>

</html>
Validating the HTML code
• We need to validate our code to check for any errors.
• I am going to use http://validator.w3.org/
• If the banner is green, it means there are no errors and it was
  passed. If it is a different colour (red/orange) it means there
  are errors.
Lets have a look
• So at this point, lets have a look at our form. Save the file.
• If you notice, if you select one or the other the radio button
  becomes deactivated
CSS Styling
In our html document you need to link the two notepad
documents together. By adding in the following code under our
<title> Radio Buttons</title>

<link rel="stylesheet" type="text/css" href="css.css"
media="all"/>
Style
In our CSS document we are going to make our back ground of
the form a Dark Grey and the text White.

The heading will be a Blue colour.

Our footer is going to be a White back ground with Black text.

Hint: Colour is spelt color.
I'm using Hex colour numbers
CSS Elements
body
{
background:#696969;
color:#FFFFFF;
width: 300px;
}

h1
{
color:#000080;
}
Continued…
legend
{
color:#FFFFFF;
}

fieldset
{
color:#FFFFFF;
}

#Footer
{
background-color:#FFFFFF;
color:#000000;
}
Viewing it in a webpage
Now that your code has got some style, you can view your
website. In Notepad++, go to Run in the toolbar and select the
correct Browser.
Once you have done this try and open it in a verity of different
web browsers.
Testing the form in 3 web browsers


            Internet
            Explorer 9
                                     Opera




              Google
              Chrome
The End
• Hope this tutorial has given you an idea on how to create
  Radio Buttons and style using CSS.

More Related Content

What's hot

Google plus chapter 1 - introduction
Google plus   chapter 1 - introductionGoogle plus   chapter 1 - introduction
Google plus chapter 1 - introductionBobby Wan
 
iGoogle Gadgets @ Your Library
iGoogle Gadgets @ Your LibraryiGoogle Gadgets @ Your Library
iGoogle Gadgets @ Your LibraryEdward Metz
 
September 2018 calendar
September 2018 calendarSeptember 2018 calendar
September 2018 calendarFloodwoodvern
 
Handout2 formatting tags
Handout2 formatting tagsHandout2 formatting tags
Handout2 formatting tagsNadine Guevarra
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTMLSun Technlogies
 
Anadhikar-probesh-Robindranath_Thakur
Anadhikar-probesh-Robindranath_ThakurAnadhikar-probesh-Robindranath_Thakur
Anadhikar-probesh-Robindranath_Thakurbdkites
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to htmlpalhaftab
 
UrbanScouts | Global Service Jam Berlin 2011
UrbanScouts | Global Service Jam Berlin 2011UrbanScouts | Global Service Jam Berlin 2011
UrbanScouts | Global Service Jam Berlin 2011Service Jam Berlin
 

What's hot (17)

Html coding
Html codingHtml coding
Html coding
 
Html
HtmlHtml
Html
 
HTML Lesson 5
HTML Lesson 5HTML Lesson 5
HTML Lesson 5
 
Google plus chapter 1 - introduction
Google plus   chapter 1 - introductionGoogle plus   chapter 1 - introduction
Google plus chapter 1 - introduction
 
iGoogle Gadgets @ Your Library
iGoogle Gadgets @ Your LibraryiGoogle Gadgets @ Your Library
iGoogle Gadgets @ Your Library
 
September 2018 calendar
September 2018 calendarSeptember 2018 calendar
September 2018 calendar
 
Handout2 formatting tags
Handout2 formatting tagsHandout2 formatting tags
Handout2 formatting tags
 
Demo lecture ppt
Demo lecture pptDemo lecture ppt
Demo lecture ppt
 
Html
HtmlHtml
Html
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
 
Anadhikar-probesh-Robindranath_Thakur
Anadhikar-probesh-Robindranath_ThakurAnadhikar-probesh-Robindranath_Thakur
Anadhikar-probesh-Robindranath_Thakur
 
Html presentation
Html presentationHtml presentation
Html presentation
 
HTML
HTMLHTML
HTML
 
Handout1 intro to html
Handout1 intro to htmlHandout1 intro to html
Handout1 intro to html
 
3 php forms
3 php forms3 php forms
3 php forms
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
 
UrbanScouts | Global Service Jam Berlin 2011
UrbanScouts | Global Service Jam Berlin 2011UrbanScouts | Global Service Jam Berlin 2011
UrbanScouts | Global Service Jam Berlin 2011
 

Viewers also liked

8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay KumarVijay Kumar
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Ganesh Ram
 
Signal & systems
Signal & systemsSignal & systems
Signal & systemsAJAL A J
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051Rashmi
 

Viewers also liked (6)

8051 tutorial
8051 tutorial8051 tutorial
8051 tutorial
 
8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar8051 microcontroller by K. Vijay Kumar
8051 microcontroller by K. Vijay Kumar
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
 
Signal & systems
Signal & systemsSignal & systems
Signal & systems
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 

Similar to How to code radio buttons in HTML5 and CSS Styling

Similar to How to code radio buttons in HTML5 and CSS Styling (20)

HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
 
Html and css
Html and cssHtml and css
Html and css
 
Print this
Print thisPrint this
Print this
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
 
Html ppt
Html pptHtml ppt
Html ppt
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
Lecture-5.pptx
Lecture-5.pptxLecture-5.pptx
Lecture-5.pptx
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 form
 
Html Hands On
Html Hands OnHtml Hands On
Html Hands On
 
INTRODUCTION TO HTML & CSS .pptx
INTRODUCTION TO HTML & CSS .pptxINTRODUCTION TO HTML & CSS .pptx
INTRODUCTION TO HTML & CSS .pptx
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Html cia
Html ciaHtml cia
Html cia
 
Web Design Assignment 1
Web Design Assignment 1 Web Design Assignment 1
Web Design Assignment 1
 
Web technology lab manual
Web technology lab manualWeb technology lab manual
Web technology lab manual
 
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptx
 
Caracteristicas Basicas De Htlm
Caracteristicas Basicas De HtlmCaracteristicas Basicas De Htlm
Caracteristicas Basicas De Htlm
 
Html5 101
Html5 101Html5 101
Html5 101
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

How to code radio buttons in HTML5 and CSS Styling

  • 1. How to code Radio Buttons in HTML5 and CSS Styling
  • 2. Introduction • This slide show is designed to explain how to use the <input type=“radio”> tag in HTML, how to use CSS to format the radio button and how to use both CSS and HTML together to achieve a desired look.
  • 3. Hints There are 2 important hints that we need to remember: • To open and close each tag • To indent 3 spaces
  • 4. What are Radio Buttons? • Radio Buttons are used to represent one of a set of options, only one of which can be selected at any time. Example is the quiz we are about to make.
  • 5. Creating the form We need to define the document type. You do this at the top of the page by using <!DOCTYPE html> <html> <head> <title> Radio Buttons</title> </head> <body> <h1> Animals Quiz</h1> </body> </html>
  • 6. We need to declare it’s a form. Underneath <body> we insert <h1>Animals Quiz</h1> <form> <fieldset> <legend> What is your favourite animal?</legend> </fieldset> <br> </form>
  • 7. The Radio button We will create a radio button group. Below is the question and the set of options that we are going to code. What is your favourite animal? • Tiger • Monkey • Eagle
  • 8. Radio Button in HTML To achieve the function of the radio button, we have the input type which indicates what the element will be, for ours we put “radio” • <input type=“radio” The name is the group of buttons. In this case it will be • name=“animal” We are going to add a value= usually defines something that’s going to be written. • value=“Tiger” The id is the same name as the value • id=“Tiger”/> We are going to put a label on the button so they know which one to pick. • <label for=“Tiger”>Tiger</label><br/>
  • 9. What our form should look like <form> <fieldset> <legend> What is your favourite animal?</legend> <input type="radio" name="animal" value="Tiger" id="Tiger"/> <label for="Tiger">Tiger</label><br/> <input type="radio" name="animal" value="Bear" id="Bear"/> <label for="Bear">Bear</label><br/> <input type="radio" name="animal" value=“Eagle id=“Eagle"/> <label for=“Eagle">Eagle</label><br/> </fieldset> <br> <form>
  • 10. Form Controls We are going to put in Form Controls. This allows the user to Reset and Submit the form. We write <p> Form Controls</p> <input type=“submit” value=“Submit” /><br> <input type=“reset” value=“Reset”/>
  • 11. Footer We can enter a <div> tag, this defines a section in the page. This goes just after the close of the form and before the closing of the body as shown below. <div id="footer"> <p> Made by AimeeKyra</p> </div> </body> </html>
  • 12. What your code should look like <!DOCTYPE html> <html> <head> <title> Radio Buttons </title> </head> <body> <h1> Animals Quiz </h1> <form> <fieldset> <legend> What is your favourite animal?</legend> <input type="radio" name=“animal" value=“Tiger id=“Tiger” /> <label for=“Tiger” >Tiger </label><br /> <input type="radio" name=“animal” value="Monkey" id=“Monkey" /> <label for=“Monkey”>Monkey</label><br /> <input type="radio" name=“animal" value=“Eagle id=“Eagle <label for=“Eagle” >Eagle</label><br /> </fieldset> </br> <p>Form controls </p> <input type="submit" value="Submit"/> <br> <input type="reset" value="Reset"/> </form> <div id="footer"> <p> Made by AimeeKyra</p> </div> </body> </html>
  • 13. Validating the HTML code • We need to validate our code to check for any errors. • I am going to use http://validator.w3.org/ • If the banner is green, it means there are no errors and it was passed. If it is a different colour (red/orange) it means there are errors.
  • 14. Lets have a look • So at this point, lets have a look at our form. Save the file. • If you notice, if you select one or the other the radio button becomes deactivated
  • 15. CSS Styling In our html document you need to link the two notepad documents together. By adding in the following code under our <title> Radio Buttons</title> <link rel="stylesheet" type="text/css" href="css.css" media="all"/>
  • 16. Style In our CSS document we are going to make our back ground of the form a Dark Grey and the text White. The heading will be a Blue colour. Our footer is going to be a White back ground with Black text. Hint: Colour is spelt color. I'm using Hex colour numbers
  • 19. Viewing it in a webpage Now that your code has got some style, you can view your website. In Notepad++, go to Run in the toolbar and select the correct Browser. Once you have done this try and open it in a verity of different web browsers.
  • 20. Testing the form in 3 web browsers Internet Explorer 9 Opera Google Chrome
  • 21. The End • Hope this tutorial has given you an idea on how to create Radio Buttons and style using CSS.