SlideShare a Scribd company logo
1 of 18
How to create a Radio
button for a form in HTML
5 with CSS styling
By Elke Dunn
Creating the form….
First thing we need to do is open either notepad or notepad ++.
If you choose notepad ++ you need to set the language to
HTML and save the document as a .html document.

Now we need to define the document type. You do this at the
top of the page by using

<!DOCTYPE html>
The next step . . .
Now you need to set up the basics of your code.
Every piece of code you open you need to close.

<html>
          <head>
                   <title>Put the name of your website here</title>
          </head>
          <body>
          <h1>Your heading here</h1>
          </body>
</html>
Now to create the form
The form is apart of the <body>
Under your heading you have put in your body you need to
declare that it is a form.

<body>
         <h1>your heading here</h1>
<form>
       *form info here*
</form>
</body>
The radio button
We will create a radio button group. With this you need to pick
what your options are going to say.
Below is the question and the options that we are going to
code.
Who is your favourite sports personal?
- Ian Thorpe
- Harry Kewell
- Rodger Feddera
- Lance Armstrong
- Other
Radio button in HTML
We need to create a <fieldset> and also a <legend> that
contains our question for the form.

Then we also need to put the radio button in the form by using
the following code.
<input type="radio" name="sports" value="Harry Kewell"
id="HarryKewell" />
<label for="Harry Kewell">Harry Kewell </label><br />

(continued on next page)
What it should look like in the form
<form>
     <fieldset>
               <legend>Who is your favourite sports personal?</legend>

                <input type="radio" name="sports" value="Harry Kewell" id="HarryKewell" />
                 <label for="Harry Kewell">Harry Kewell </label><br />
                 <input type="radio" name="sports" value="Ian Thorpe“ id=“IanThorpe” />
                 <label for="Ian Thorpe">Ian Thorpe </label><br />
                 <input type="radio" name="sports" value="Rodger Feddera" id=“RodgerFeddera” />
                 <label for="Rodger Feddera">Rodger Feddera </label><br />
                 <input type="radio" name="sports" value="Lance Armstrong“ id=“LanceArmstrong” />
                 <label for="Lance Armstrong">Lance Armstrong </label><br />
                 <input type="radio" name="sports" value="Other" id=“Other“ />
                 <label for="Other"> Other </label><br />
      </fieldset>
      </br>
</form>
Controls
You can add some controls into your form. So that if you select
an option you can submit it or reset the form.
The code below goes just before the bottom of the form.



     <p>Form controls</p>
     <input type="reset" value="Reset"/>
     <input type="submit" value="Submit"/> <br>
</form>
Footer
Now before we finish up the html code and move on to the CCS
styling there is one more thing. You can have a footer.

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 Elke Dunn Incorporated
          </p>
        </div>
        </body>
</html>
Now your code should look
like……
<!DOCTYPE html>
<html>

      <head>
             <title> QUIZZZZZZZ! </title>
      </head>
      <body>
             <h1> Sports Quiz </h1>
      <form>
             <fieldset>
                       <legend>Who is your favourite sports personal?</legend>

                                 <input type="radio" name="sports" value="Harry Kewell" id="HarryKewell" />
                                 <label for="Harry Kewell">Harry Kewell </label><br />
                                 <input type="radio" name="sports" value="Ian Thorpe" id="IanThorpe" />
                                 <label for="Ian Thorpe">Ian Thorpe </label><br />
                                 <input type="radio" name="sports" value="Rodger Feddera" id="RodgerFeddera"/>
                                 <label for="Rodger Feddera">Rodger Feddera </label><br />
                                 <input type="radio" name="sports" value="Lance Armstrong" id="LanceArmstrong"/>
                                 <label for="Lance Armstrong">Lance Armstrong </label><br />
                                 <input type="radio" name="sports" value="Other" id="Other"/>
                                 <label for="Other"> Other </label><br />
                </fieldset>
                <br />

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

      <div id="footer">
      <p> Made by Elke Dunn Incorporated
      </p>
      </div>

      </body>

</html>
CSS
Now you need to create another notepad document and save it
as a .css document

In our html document you know need to link the two notepad
documents together. By adding in the following code under our
<title> QUIZZZZZ</title>

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

We are also going to make our heading a separate colour.

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

The following code will help you style this. Colour is spelt color
because of its background.
CSS elements

body
{
       background:#000000;
       color:#FFFFFF;
       width: 300px;
}

h1
{
       color:#9999FF;
}
CSS elements continued….
legend
{
           color:#FFFFFF;
}

fieldset
{
           color:#FFFFFF;
}
Elements continued…
#footer
{
          background-color:#FFFFFF;
          color:#000000;

}
Viewing in a web page
To view your website you need to go to the file location and
double click the html file.

Once you have done this try and open it in a verity of different
web browsers.

Hopefully this starts to help you develop your website.
The End . . .

More Related Content

What's hot

Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML FormsMike Crabb
 
Html5 structure tags
Html5 structure tagsHtml5 structure tags
Html5 structure tagsSEO SKills
 
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II  Html 5 Tables, Forms and MediaFYBSC IT Web Programming Unit II  Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and MediaArti Parab Academics
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginnersjeroenvdmeer
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssArti Parab Academics
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratchecobold
 
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetAbdulla-al Baset
 
HTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by MukeshHTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by MukeshMukesh Kumar
 
Web designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic CodingWeb designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic CodingRabiul robi
 

What's hot (19)

Getting Information through HTML Forms
Getting Information through HTML FormsGetting Information through HTML Forms
Getting Information through HTML Forms
 
Html5 structure tags
Html5 structure tagsHtml5 structure tags
Html5 structure tags
 
1.1 html lec 1
1.1 html lec 11.1 html lec 1
1.1 html lec 1
 
Css colors
Css   colorsCss   colors
Css colors
 
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II  Html 5 Tables, Forms and MediaFYBSC IT Web Programming Unit II  Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 
Html Basic Tags
Html Basic TagsHtml Basic Tags
Html Basic Tags
 
HTML presentation for beginners
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginners
 
Css pseudo classes
Css   pseudo classesCss   pseudo classes
Css pseudo classes
 
Html cia
Html ciaHtml cia
Html cia
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcss
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratch
 
HTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al BasetHTML [Basic] --by Abdulla-al Baset
HTML [Basic] --by Abdulla-al Baset
 
webDen Hi-Fi
webDen Hi-FiwebDen Hi-Fi
webDen Hi-Fi
 
HTML
HTML HTML
HTML
 
Html tags or elements
Html tags or elementsHtml tags or elements
Html tags or elements
 
HTML
HTMLHTML
HTML
 
HTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by MukeshHTML (Hyper Text Markup Language) by Mukesh
HTML (Hyper Text Markup Language) by Mukesh
 
Web designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic CodingWeb designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic Coding
 

Viewers also liked

CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...
CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...
CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...Brian Del Bono
 
Boletim Informativo - SE/PRST - 66ª RO
Boletim Informativo - SE/PRST - 66ª ROBoletim Informativo - SE/PRST - 66ª RO
Boletim Informativo - SE/PRST - 66ª ROPresbitério de Santos
 
Konfor Alanı - Comfort Zone
Konfor Alanı - Comfort ZoneKonfor Alanı - Comfort Zone
Konfor Alanı - Comfort ZoneEnder Aydin Orak
 
Pérez yeximar tema1b.doc
Pérez yeximar tema1b.docPérez yeximar tema1b.doc
Pérez yeximar tema1b.docyeximar perez
 
Ing romano isack ortiz
Ing romano isack ortizIng romano isack ortiz
Ing romano isack ortizisack ortiz
 
新世代的媒體製作 新聞廣告廣播電視與電影
新世代的媒體製作     新聞廣告廣播電視與電影新世代的媒體製作     新聞廣告廣播電視與電影
新世代的媒體製作 新聞廣告廣播電視與電影Monbaza Chang
 
Permendikbud tahun2014 nomor104
Permendikbud tahun2014 nomor104Permendikbud tahun2014 nomor104
Permendikbud tahun2014 nomor104Harddisk Hombing
 
методичка по олимпиаде
методичка по олимпиадеметодичка по олимпиаде
методичка по олимпиадеallex335
 
niconicogakkai_8th_TetsuyaSato
niconicogakkai_8th_TetsuyaSatoniconicogakkai_8th_TetsuyaSato
niconicogakkai_8th_TetsuyaSatoTetsuya Sato
 
From Food Idea to Local Food Shelf Presentation of Aug 2014
From Food Idea to Local Food Shelf Presentation of Aug 2014From Food Idea to Local Food Shelf Presentation of Aug 2014
From Food Idea to Local Food Shelf Presentation of Aug 2014Michel Algazi
 
MTC Recruitment Volunteers Presentation - March 2014
MTC Recruitment Volunteers Presentation - March 2014MTC Recruitment Volunteers Presentation - March 2014
MTC Recruitment Volunteers Presentation - March 2014Pedro Aguirre
 
disseration presentation
disseration presentation disseration presentation
disseration presentation Priya Herian
 
Fremtidens-Projektleder-JacobN
Fremtidens-Projektleder-JacobNFremtidens-Projektleder-JacobN
Fremtidens-Projektleder-JacobNJacob Nørgaard
 
Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip
Raspberry pi-spectrum-analyzer-display-on-rgb-led-stripRaspberry pi-spectrum-analyzer-display-on-rgb-led-strip
Raspberry pi-spectrum-analyzer-display-on-rgb-led-stripStefan Oprea
 

Viewers also liked (18)

CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...
CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...
CITY OF SAN JOSE- ENFORCING WAGE STANDARDS THROUGH LABOR COMPLAINTS AND CONTR...
 
Ghazawi-CV updat - April 2016
Ghazawi-CV updat - April 2016Ghazawi-CV updat - April 2016
Ghazawi-CV updat - April 2016
 
Boletim Informativo - SE/PRST - 66ª RO
Boletim Informativo - SE/PRST - 66ª ROBoletim Informativo - SE/PRST - 66ª RO
Boletim Informativo - SE/PRST - 66ª RO
 
Konfor Alanı - Comfort Zone
Konfor Alanı - Comfort ZoneKonfor Alanı - Comfort Zone
Konfor Alanı - Comfort Zone
 
Pérez yeximar tema1b.doc
Pérez yeximar tema1b.docPérez yeximar tema1b.doc
Pérez yeximar tema1b.doc
 
Ing romano isack ortiz
Ing romano isack ortizIng romano isack ortiz
Ing romano isack ortiz
 
新世代的媒體製作 新聞廣告廣播電視與電影
新世代的媒體製作     新聞廣告廣播電視與電影新世代的媒體製作     新聞廣告廣播電視與電影
新世代的媒體製作 新聞廣告廣播電視與電影
 
Permendikbud tahun2014 nomor104
Permendikbud tahun2014 nomor104Permendikbud tahun2014 nomor104
Permendikbud tahun2014 nomor104
 
методичка по олимпиаде
методичка по олимпиадеметодичка по олимпиаде
методичка по олимпиаде
 
niconicogakkai_8th_TetsuyaSato
niconicogakkai_8th_TetsuyaSatoniconicogakkai_8th_TetsuyaSato
niconicogakkai_8th_TetsuyaSato
 
alvine_somaroo_cv
alvine_somaroo_cvalvine_somaroo_cv
alvine_somaroo_cv
 
From Food Idea to Local Food Shelf Presentation of Aug 2014
From Food Idea to Local Food Shelf Presentation of Aug 2014From Food Idea to Local Food Shelf Presentation of Aug 2014
From Food Idea to Local Food Shelf Presentation of Aug 2014
 
MTC Recruitment Volunteers Presentation - March 2014
MTC Recruitment Volunteers Presentation - March 2014MTC Recruitment Volunteers Presentation - March 2014
MTC Recruitment Volunteers Presentation - March 2014
 
Cartas de control
Cartas de controlCartas de control
Cartas de control
 
disseration presentation
disseration presentation disseration presentation
disseration presentation
 
Fremtidens-Projektleder-JacobN
Fremtidens-Projektleder-JacobNFremtidens-Projektleder-JacobN
Fremtidens-Projektleder-JacobN
 
Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip
Raspberry pi-spectrum-analyzer-display-on-rgb-led-stripRaspberry pi-spectrum-analyzer-display-on-rgb-led-strip
Raspberry pi-spectrum-analyzer-display-on-rgb-led-strip
 
Tech n’More PPT
Tech n’More PPTTech n’More PPT
Tech n’More PPT
 

Similar to Creating a radiobutton

[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSSBeckhamWee
 
CSS Selector
CSS SelectorCSS Selector
CSS SelectorCalos Kao
 
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV481101
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSdanpaquette
 
Introduction to web development - HTML 5
Introduction to web development - HTML 5Introduction to web development - HTML 5
Introduction to web development - HTML 5Ayoub Ghozzi
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Formstina1357
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 formH K
 
Enjoy the vue.js
Enjoy the vue.jsEnjoy the vue.js
Enjoy the vue.jsTechExeter
 
Creating web api and consuming part 2
Creating web api and consuming part 2Creating web api and consuming part 2
Creating web api and consuming part 2Dipendra Shekhawat
 
Web Design Assignment 1
Web Design Assignment 1 Web Design Assignment 1
Web Design Assignment 1 beretta21
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghAnkitkumar Singh
 

Similar to Creating a radiobutton (20)

[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS
 
HTML & CSS 2017
HTML & CSS 2017HTML & CSS 2017
HTML & CSS 2017
 
Print this
Print thisPrint this
Print this
 
CSS Selector
CSS SelectorCSS Selector
CSS Selector
 
Capstone Website Code
Capstone Website CodeCapstone Website Code
Capstone Website Code
 
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptx
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
 
Web technology lab manual
Web technology lab manualWeb technology lab manual
Web technology lab manual
 
Html ,css,xml
Html ,css,xmlHtml ,css,xml
Html ,css,xml
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Introduction to web development - HTML 5
Introduction to web development - HTML 5Introduction to web development - HTML 5
Introduction to web development - HTML 5
 
Css1
Css1Css1
Css1
 
HTML5 - Forms
HTML5 - FormsHTML5 - Forms
HTML5 - Forms
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 form
 
Enjoy the vue.js
Enjoy the vue.jsEnjoy the vue.js
Enjoy the vue.js
 
Creating web api and consuming part 2
Creating web api and consuming part 2Creating web api and consuming part 2
Creating web api and consuming part 2
 
Web Design Assignment 1
Web Design Assignment 1 Web Design Assignment 1
Web Design Assignment 1
 
Introduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar SinghIntroduction to Html by Ankitkumar Singh
Introduction to Html by Ankitkumar Singh
 
HTML 5 Web Design
HTML 5 Web DesignHTML 5 Web Design
HTML 5 Web Design
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

Creating a radiobutton

  • 1. How to create a Radio button for a form in HTML 5 with CSS styling By Elke Dunn
  • 2. Creating the form…. First thing we need to do is open either notepad or notepad ++. If you choose notepad ++ you need to set the language to HTML and save the document as a .html document. Now we need to define the document type. You do this at the top of the page by using <!DOCTYPE html>
  • 3. The next step . . . Now you need to set up the basics of your code. Every piece of code you open you need to close. <html> <head> <title>Put the name of your website here</title> </head> <body> <h1>Your heading here</h1> </body> </html>
  • 4. Now to create the form The form is apart of the <body> Under your heading you have put in your body you need to declare that it is a form. <body> <h1>your heading here</h1> <form> *form info here* </form> </body>
  • 5. The radio button We will create a radio button group. With this you need to pick what your options are going to say. Below is the question and the options that we are going to code. Who is your favourite sports personal? - Ian Thorpe - Harry Kewell - Rodger Feddera - Lance Armstrong - Other
  • 6. Radio button in HTML We need to create a <fieldset> and also a <legend> that contains our question for the form. Then we also need to put the radio button in the form by using the following code. <input type="radio" name="sports" value="Harry Kewell" id="HarryKewell" /> <label for="Harry Kewell">Harry Kewell </label><br /> (continued on next page)
  • 7. What it should look like in the form <form> <fieldset> <legend>Who is your favourite sports personal?</legend> <input type="radio" name="sports" value="Harry Kewell" id="HarryKewell" /> <label for="Harry Kewell">Harry Kewell </label><br /> <input type="radio" name="sports" value="Ian Thorpe“ id=“IanThorpe” /> <label for="Ian Thorpe">Ian Thorpe </label><br /> <input type="radio" name="sports" value="Rodger Feddera" id=“RodgerFeddera” /> <label for="Rodger Feddera">Rodger Feddera </label><br /> <input type="radio" name="sports" value="Lance Armstrong“ id=“LanceArmstrong” /> <label for="Lance Armstrong">Lance Armstrong </label><br /> <input type="radio" name="sports" value="Other" id=“Other“ /> <label for="Other"> Other </label><br /> </fieldset> </br> </form>
  • 8. Controls You can add some controls into your form. So that if you select an option you can submit it or reset the form. The code below goes just before the bottom of the form. <p>Form controls</p> <input type="reset" value="Reset"/> <input type="submit" value="Submit"/> <br> </form>
  • 9. Footer Now before we finish up the html code and move on to the CCS styling there is one more thing. You can have a footer. 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 Elke Dunn Incorporated </p> </div> </body> </html>
  • 10. Now your code should look like……
  • 11. <!DOCTYPE html> <html> <head> <title> QUIZZZZZZZ! </title> </head> <body> <h1> Sports Quiz </h1> <form> <fieldset> <legend>Who is your favourite sports personal?</legend> <input type="radio" name="sports" value="Harry Kewell" id="HarryKewell" /> <label for="Harry Kewell">Harry Kewell </label><br /> <input type="radio" name="sports" value="Ian Thorpe" id="IanThorpe" /> <label for="Ian Thorpe">Ian Thorpe </label><br /> <input type="radio" name="sports" value="Rodger Feddera" id="RodgerFeddera"/> <label for="Rodger Feddera">Rodger Feddera </label><br /> <input type="radio" name="sports" value="Lance Armstrong" id="LanceArmstrong"/> <label for="Lance Armstrong">Lance Armstrong </label><br /> <input type="radio" name="sports" value="Other" id="Other"/> <label for="Other"> Other </label><br /> </fieldset> <br /> <p>Form controls</p> <input type="reset" value="Reset"/> <input type="submit" value="Submit"/> <br> </form> <div id="footer"> <p> Made by Elke Dunn Incorporated </p> </div> </body> </html>
  • 12. CSS Now you need to create another notepad document and save it as a .css document In our html document you know need to link the two notepad documents together. By adding in the following code under our <title> QUIZZZZZ</title> <link rel="stylesheet" type="text/css" href="css.css" media="all"/> continued….
  • 13. Style In our CSS document we are going to make our back ground of the form Black and the text White. We are also going to make our heading a separate colour. Our footer is going to be a White back ground with Black text. The following code will help you style this. Colour is spelt color because of its background.
  • 14. CSS elements body { background:#000000; color:#FFFFFF; width: 300px; } h1 { color:#9999FF; }
  • 15. CSS elements continued…. legend { color:#FFFFFF; } fieldset { color:#FFFFFF; }
  • 16. Elements continued… #footer { background-color:#FFFFFF; color:#000000; }
  • 17. Viewing in a web page To view your website you need to go to the file location and double click the html file. Once you have done this try and open it in a verity of different web browsers. Hopefully this starts to help you develop your website.
  • 18. The End . . .